# Maintainer: Lubosz Sarnecki _realname=gst-python pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-gst-python" "${MINGW_PACKAGE_PREFIX}-gst-python2") pkgver=1.14.4 pkgrel=1 pkgdesc="GStreamer GObject Introspection overrides for Python 3 (mingw-w64)" arch=('any') license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gstreamer" "${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-pygobject-devel" "${MINGW_PACKAGE_PREFIX}-python2-gobject" "${MINGW_PACKAGE_PREFIX}-python3-gobject") url='https://gstreamer.freedesktop.org/modules/gst-python.html' source=(https://gstreamer.freedesktop.org/src/gst-python/${_realname}-${pkgver}.tar.xz '0001-msys2-python3-config-returns-1-so-use-which.patch' '0002-msys2-fix-linking-errors.patch') sha256sums=('d0fdb24f93b6d889f309d2f526b8ea9577e0084ff0a62b4623ef1aed52e85a1b' '836cf2e9e713705e5fd0f09d4e38d3de839a3c663eb6fa85f0a3f9a5f0b224ee' '9b4400e0e468888cded57c7269e2deb8f8c6dae9491282469a8c631fc33f7183') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-msys2-python3-config-returns-1-so-use-which.patch patch -p1 -i ${srcdir}/0002-msys2-fix-linking-errors.patch NOCONFIGURE=1 ./autogen.sh } build() { rm -rf python{2,3}-build devel || true mkdir python{2,3}-build devel for builddir in python{2,3}-build; do pushd ${builddir} > /dev/null PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-silent-rules make popd > /dev/null done } package_gst-python() { pkgdesc="GStreamer GObject Introspection overrides for Python 3 (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gstreamer" "${MINGW_PACKAGE_PREFIX}-python3-gobject") cd python3-build make DESTDIR="${pkgdir}" install mv "${pkgdir}${MINGW_PREFIX}"/lib/bin/*.dll "${pkgdir}${MINGW_PREFIX}"/lib/gstreamer-1.0/ rm -rf "${pkgdir}${MINGW_PREFIX}/lib/bin" # The python plugin loader makes problems because it links against libpython # which might be in conflict one already used loading the plugin. # The overrides don't need it so just remove it for now. # https://github.com/Alexpux/MINGW-packages/issues/2034 rm -r "${pkgdir}${MINGW_PREFIX}/lib/gstreamer-1.0" } package_gst-python2() { pkgdesc="GStreamer GObject Introspection overrides for Python 2 (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gstreamer" "${MINGW_PACKAGE_PREFIX}-python2-gobject") cd python2-build make DESTDIR="${pkgdir}" install # See other package() rm -r "${pkgdir}${MINGW_PREFIX}/lib/gstreamer-1.0" } package_mingw-w64-i686-gst-python2() { package_gst-python2 } package_mingw-w64-i686-gst-python() { package_gst-python } package_mingw-w64-x86_64-gst-python2() { package_gst-python2 } package_mingw-w64-x86_64-gst-python() { package_gst-python }