Skip to content

Commit

Permalink
Merge pull request msys2#18840 from podsvirov/python-pyglm-new-package
Browse files Browse the repository at this point in the history
python-pyglm: New package
  • Loading branch information
lazka authored Oct 13, 2023
2 parents e38c29b + 3c752ea commit f709351
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions mingw-w64-python-pyglm/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Maintainer: Konstantin Podsvirov <[email protected]>

_basename=PyGLM
_realname=${_basename,,}
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=2.7.0
_glmver=fcda03b54596adda543bcdccc6c1879e380c86a7
_typver=f47636b86d07d4f91692235e8dfe0af1bd22e883
pkgrel=1
pkgdesc='OpenGL Mathematics library for Python (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://github.com/Zuzu-Typ/PyGLM'
license=('ZLIB')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("${_basename}-${pkgver}.tar.gz"::"${url}/archive/${pkgver}.tar.gz"
"glm-${_glmver}.tar.gz::https://github.com/Zuzu-Typ/glm/archive/${_glmver}.tar.gz"
"pyglm-typing-${_glmver}.tar.gz::https://github.com/esoma/pyglm-typing/archive/${_typver}.tar.gz")
sha256sums=('1199788f7d4d5959e29bead9cb4a2533f512cc802467c150fa3b9a1f7f58f799'
'425cb233477847abc24f8655eff54fd8d3da4209162ef36acc0152736ce32976'
'5e2ca233ffafe7be9b6b4549869b7ac3b5e5e33b2c72a9c5d315c99b6475a62c')

prepare() {
cd "${srcdir}"
rm -rf "python-build-${MSYSTEM}" | true
rm -rf "${_basename}-${pkgver}"/{glm,pyglm-typing} | true
cp -r "${_basename}-${pkgver}" "python-build-${MSYSTEM}"
cp -r "glm-${_glmver}" "python-build-${MSYSTEM}/glm"
cp -r "pyglm-typing-${_typver}" "python-build-${MSYSTEM}/pyglm-typing"
}

build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"

${MINGW_PREFIX}/bin/python setup.py build
}

package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}

# vim: ts=2 sw=2 et:

0 comments on commit f709351

Please sign in to comment.