diff --git a/mingw-w64-python-pyglm/PKGBUILD b/mingw-w64-python-pyglm/PKGBUILD new file mode 100644 index 0000000000000..b3e3555cdf2f8 --- /dev/null +++ b/mingw-w64-python-pyglm/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Konstantin Podsvirov + +_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: