Skip to content

Commit

Permalink
[new package] edyn 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
podsvirov committed Dec 27, 2024
1 parent 2716cb0 commit d201789
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions mingw-w64-edyn/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>

_realname=edyn
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.3.0
pkgrel=1
pkgdesc='Edyn is a real-time physics engine organized as an ECS (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/xissburg/edyn'
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-entt")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('ddd2d48ab9cbde018aad736cc59a22fd5ced05af2e5e92ae36d4bf89cf7e1910')

build() {
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-S "${_realname}-${pkgver}" \
-B "build-${MSYSTEM}-static"

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

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=ON \
-S "${_realname}-${pkgver}" \
-B "build-${MSYSTEM}-shared"

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

package() {
DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}-static"
DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}-shared"
}

0 comments on commit d201789

Please sign in to comment.