summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2018-07-16 18:53:42 +0200
committerMichel Zou2018-07-16 18:53:42 +0200
commit4432c1ce44445238515afb86d7b272a3465dbcc2 (patch)
tree775e25ee905eabcafd373febf7954eb9c5225a20
parent0fc2365b2c35a05ffeab95f4d345ee61506d8b91 (diff)
downloadaur-4432c1ce44445238515afb86d7b272a3465dbcc2.tar.gz
wine wrapper
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD12
-rw-r--r--wine-python.sh8
3 files changed, 21 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index df8b2f79bba..b72818e9167 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Thu Jun 28 16:41:59 UTC 2018
pkgbase = mingw-w64-python2-bin
pkgdesc = A high-level scripting language (native MSVC version) (mingw-w64)
pkgver = 2.7.15
- pkgrel = 1
+ pkgrel = 2
url = http://www.python.org/
arch = any
license = PSF
@@ -11,6 +9,7 @@ pkgbase = mingw-w64-python2-bin
makedepends = mingw-w64-tools
makedepends = mingw-w64-binutils
depends = mingw-w64-crt
+ optdepends = mingw-w64-wine: runtime support
provides = mingw-w64-python2
conflicts = mingw-w64-python2
options = staticlibs
@@ -18,8 +17,10 @@ pkgbase = mingw-w64-python2-bin
options = !strip
source = http://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
source = http://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi
+ source = wine-python.sh
sha256sums = 1afa1b10cf491c788baa340066a813d5ec6232561472cfc3af1664dbc6f29f77
sha256sums = 5e85f3c4c209de98480acbf2ba2e71a907fd5567a838ad4b6748c76deb286ad7
+ sha256sums = SKIP
pkgname = mingw-w64-python2-bin
diff --git a/PKGBUILD b/PKGBUILD
index 7bda325e9af..d1ee52883b6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
pkgname=mingw-w64-python2-bin
pkgver=2.7.15
_pybasever=27
-pkgrel=1
+pkgrel=2
pkgdesc="A high-level scripting language (native MSVC version) (mingw-w64)"
arch=('any')
license=('PSF')
@@ -9,12 +9,15 @@ url="http://www.python.org/"
provides=('mingw-w64-python2')
conflicts=('mingw-w64-python2')
depends=('mingw-w64-crt')
+optdepends=('mingw-w64-wine: runtime support')
makedepends=('wine' 'mingw-w64-tools' 'mingw-w64-binutils')
options=('staticlibs' '!buildflags' '!strip')
source=("http://www.python.org/ftp/python/${pkgver}/python-${pkgver}.msi"
- "http://www.python.org/ftp/python/${pkgver}/python-${pkgver}.amd64.msi")
+ "http://www.python.org/ftp/python/${pkgver}/python-${pkgver}.amd64.msi"
+ wine-python.sh)
sha256sums=('1afa1b10cf491c788baa340066a813d5ec6232561472cfc3af1664dbc6f29f77'
- '5e85f3c4c209de98480acbf2ba2e71a907fd5567a838ad4b6748c76deb286ad7')
+ '5e85f3c4c209de98480acbf2ba2e71a907fd5567a838ad4b6748c76deb286ad7'
+ SKIP)
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -30,6 +33,7 @@ build() {
msiexec /i "${srcdir}"/python-${pkgver}${target}.msi /qb TARGETDIR=$PWD
gendef python${_pybasever}.dll
${_arch}-dlltool --dllname python${_pybasever}.dll --def python${_pybasever}.def --output-lib libs/libpython${_pybasever}.dll.a
+ sed "s|@TRIPLE@|${_arch}|g;s|@PYVER@|${_pybasever}|g" "${srcdir}"/wine-python.sh > ${_arch}-python${_pybasever}-bin
popd
done
}
@@ -46,6 +50,8 @@ package() {
cp -r Lib "$pkgdir"/usr/${_arch}/lib/python${_pybasever}
install -m644 DLLs/*.pyd "$pkgdir"/usr/${_arch}/lib/python${_pybasever}
install -m755 python.exe "$pkgdir"/usr/${_arch}/bin/python${_pybasever}.exe
+ install -d "$pkgdir"/usr/bin
+ install -m755 ${_arch}-python${_pybasever}-bin "$pkgdir"/usr/bin
pushd "$pkgdir"/usr/${_arch}/bin/
ln -s python${_pybasever}.exe python2.exe
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
diff --git a/wine-python.sh b/wine-python.sh
new file mode 100644
index 00000000000..19bb168e7b9
--- /dev/null
+++ b/wine-python.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+export PYTHONHOME=/usr/@TRIPLE@
+export PYTHONPATH=/usr/@TRIPLE@/lib/python@PYVER@
+
+@TRIPLE@-wine /usr/@TRIPLE@/bin/python@PYVER@.exe "$@"