diff options
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 90 | ||||
-rw-r--r-- | patches.tar.gz | bin | 0 -> 50258 bytes |
3 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6889bd0bdf2f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = mingw-w64-python + pkgdesc = Next generation of the python high-level scripting language (mingw-w64) + pkgver = 3.4.2 + pkgrel = 1 + url = http://www.python.org/ + arch = any + license = PSF + makedepends = mingw-w64-gcc + makedepends = mingw-w64-pkg-config + makedepends = python>=3.4.2 + makedepends = wine + depends = mingw-w64-crt + depends = mingw-w64-expat + depends = mingw-w64-bzip2 + depends = mingw-w64-gdbm + depends = mingw-w64-openssl + depends = mingw-w64-libffi + depends = mingw-w64-zlib + options = staticlibs + options = !buildflags + options = !strip + source = http://www.python.org/ftp/python/3.4.2/Python-3.4.2.tar.xz + source = patches.tar.gz + sha1sums = 0727d8a8498733baabe6f51632b9bab0cbaa9ada + sha1sums = 72f1405420d4d756c90eee77f630c50e52234a21 + +pkgname = mingw-w64-python + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6d23df5a501d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,90 @@ +# Maintainer: xantares <xantares09 at hotmail dot com> +# Contributor: Ray Donnelly <mingw.android@gmail.com> + +pkgname=mingw-w64-python +pkgver=3.4.2 +_pybasever=3.4 +pkgrel=1 +pkgdesc="Next generation of the python high-level scripting language (mingw-w64)" +arch=('any') +license=('PSF') +url="http://www.python.org/" +depends=('mingw-w64-crt' + 'mingw-w64-expat' + 'mingw-w64-bzip2' + 'mingw-w64-gdbm' + 'mingw-w64-openssl' + 'mingw-w64-libffi' + 'mingw-w64-zlib') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' "python>=${pkgver}" 'wine') +options=('staticlibs' '!buildflags' '!strip') +source=("http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz" + 'patches.tar.gz') +sha1sums=('0727d8a8498733baabe6f51632b9bab0cbaa9ada' + '72f1405420d4d756c90eee77f630c50e52234a21') +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/Python-${pkgver}" + + # these are created by patches + rm -f Misc/config_mingw Misc/cross_mingw32 Python/fileblocks.c + + PATCHES=$(find "${srcdir}/${pkgver}" -maxdepth 1 -name "*.patch" | sort) + for PATCH in $PATCHES; do + patch -Np1 -i $PATCH + done + + # run PGEN through wine + sed -i "s|\\\$(PGEN) \\\$(GRAMMAR_INPUT)|wine \\\$(PGEN) \\\$(GRAMMAR_INPUT)|g" Makefile.pre.in + + autoreconf -vfi + + # FS#23997 + sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py + + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), + # rather than copies shipped in the tarball + rm -r Modules/expat + rm -r Modules/zlib + rm -r Modules/_ctypes/{darwin,libffi}* +} + +build() { + cd "${srcdir}/Python-${pkgver}" + unset LDFLAGS + for _arch in ${_architectures}; do + mkdir -p "build-${_arch}" && pushd "build-${_arch}" + export LIBFFI_INCLUDEDIR=`${_arch}-pkg-config libffi --cflags-only-I | sed "s|\-I||g"` + ../configure \ + --prefix=/usr/${_arch} \ + --host=${_arch} \ + --build=$CHOST \ + --enable-shared \ + --with-threads \ + --with-computed-gotos \ + --with-system-expat \ + --with-dbmliborder=gdbm:ndbm \ + --with-system-ffi + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/Python-${pkgver}/build-${_arch}" + make install DESTDIR="$pkgdir" + chmod 755 "$pkgdir"/usr/${_arch}/bin/*.dll + install -m 644 libpython${_pybasever}m.a "$pkgdir"/usr/${_arch}/lib + install -m 644 libpython${_pybasever}m.dll.a "$pkgdir"/usr/${_arch}/lib + rm -rf "$pkgdir"/usr/${_arch}/share + rm "$pkgdir"/usr/${_arch}/bin/2to3* + rm "$pkgdir"/usr/${_arch}/bin/idle* + rm "$pkgdir"/usr/${_arch}/bin/pydoc* + rm "$pkgdir"/usr/${_arch}/bin/pyvenv* + ${_arch}-strip "$pkgdir"/usr/${_arch}/bin/*.exe + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} diff --git a/patches.tar.gz b/patches.tar.gz Binary files differnew file mode 100644 index 000000000000..10d4b5abc58b --- /dev/null +++ b/patches.tar.gz |