Skip to content

Commit

Permalink
add new meshoptimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
felixaszx authored and lazka committed Jan 26, 2025
1 parent 6d2a914 commit d0aa0f4
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions mingw-w64-meshoptimizer/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Maintainer: Felix Xing (Felixaszx) <[email protected]>

_realname=meshoptimizer
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.22
pkgrel=1
pkgdesc="Mesh optimization library that makes meshes smaller and faster to render (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://meshoptimizer.org/"
msys2_repository_url="https://github.com/zeux/meshoptimizer"
msys2_references=()
license=("spdx:MIT")
depends=()
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja")
optdepends=()
source=("${_realname}"-${pkgver}.tar.gz"::https://codeload.github.com/zeux/${_realname}/zip/refs/tags/v${pkgver}")
sha256sums=('505489a12eb48d20a3eaa4c5f92d67d2b848a463891a5118cd142b6c64144cd4')

build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DMESHOPT_BUILD_DEMO=OFF \
-DMESHOPT_BUILD_SHARED_LIBS=ON \
-DMESHOPT_BUILD_GLTFPACK=ON \
-S "${_realname}-${pkgver}" \
-B "build-${MSYSTEM}"

cmake --build "build-${MSYSTEM}"
}

package() {
cd "${srcdir}"

DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.md" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

0 comments on commit d0aa0f4

Please sign in to comment.