~alpine/aports

[alpine-aports] [PATCH 1/6] testing/shiboken: new aport

Details
Message ID
<20180116002328.14193-2-sir@cmpwn.com>
Sender timestamp
1516062203
DKIM signature
missing
Download raw message
Patch: +89 -0
---
 testing/shiboken/APKBUILD         | 78 +++++++++++++++++++++++++++++++++++++++
 testing/shiboken/python-3.6.patch | 11 ++++++
 2 files changed, 89 insertions(+)
 create mode 100644 testing/shiboken/APKBUILD
 create mode 100644 testing/shiboken/python-3.6.patch

diff --git a/testing/shiboken/APKBUILD b/testing/shiboken/APKBUILD
new file mode 100644
index 0000000000..75426e753d
--- /dev/null
+++ b/testing/shiboken/APKBUILD
@@ -0,0 +1,78 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=shiboken
pkgver=1.2.4
pkgrel=0
pkgdesc="CPython bindings generator for C++ libraries"
url="http://www.pyside.org"
arch="all"
license="LGPL"
depends="qt"
makedepends="cmake python2 python2-dev python3 python3-dev qt-dev libxslt-dev"
subpackages="py2-$pkgname:_py2 py3-$pkgname:_py3 $pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/PySide/Shiboken/archive/$pkgver.tar.gz
	python-3.6.patch
"
builddir="$srcdir/Shiboken-$pkgver"

build() {
	cd "$builddir"
	mkdir -p build-py2 build-py3
	cd build-py2
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_TESTS=OFF \
		-DPYTHON_EXECUTABLE=/usr/bin/python2 \
		-DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
		-DPYTHON_INCLUDE_DIR=/usr/include/python2.7
	make
	cd ../build-py3
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_TESTS=OFF \
		-DUSE_PYTHON3=yes
	make
}

package() {
	cd "$builddir/build-py3"
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir/usr/lib/python"*
	rm -rf "$pkgdir/usr/lib/libshiboken"*
	rm -rf "$pkgdir/usr/lib/pkgconfig/"
	rm "$pkgdir"/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig*python*.cmake
}

_py2() {
	depends="python2 $pkgname"
	cd "$builddir/build-py2"
	make DESTDIR="$subpkgdir" install
	install -Dm 644 \
		data/ShibokenConfig-python2.7.cmake \
		"$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/"
	mv "$subpkgdir"/usr/lib/pkgconfig/shiboken.pc \
		"$subpkgdir"/usr/lib/pkgconfig/shiboken-py2-pc
	rm -rf "$subpkgdir"/usr/{include,bin,share}
	rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfigVersion.cmake"
	rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig.cmake"
	rm -rf "$subpkgdir"/usr/bin
	rm -rf "$subpkgdir"/usr/include
	rm -rf "$subpkgdir"/usr/share
}

_py3() {
	depends="python3 $pkgname"
	cd "$builddir/build-py3"
	make DESTDIR="$subpkgdir" install
	rm -rf "$subpkgdir"/usr/{include,bin,share}
	rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfigVersion.cmake"
	rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig.cmake"
	rm -rf "$subpkgdir"/usr/bin
	rm -rf "$subpkgdir"/usr/include
	rm -rf "$subpkgdir"/usr/share
}

sha512sums="daa3fadf3daffaec52f199c0285a37431a4b6b0d450a43a035f49e5505a35b666a1cb0b334c7267af7530841dadbf0b97296812141c93de3b7cd07c7d9016a2a  shiboken-1.2.4.tar.gz
6d92335e8b37c3ce3c48b0d466b57365b8e32b80fe8540566d36bab16035dc783532fdd107c7cfd39dca5fdd487976bf7e14d11373e3ae069ec1bbb81f907788  python-3.6.patch"
diff --git a/testing/shiboken/python-3.6.patch b/testing/shiboken/python-3.6.patch
new file mode 100644
index 0000000000..8eeff540af
--- /dev/null
+++ b/testing/shiboken/python-3.6.patch
@@ -0,0 +1,11 @@
--- a/cmake/Modules/FindPython3Libs.cmake   2014-04-22 23:42:48.000000000 +0800
+++ b/cmake/Modules/FindPython3Libs.cmake   2015-09-21 15:17:27.014598399 +0800
@@ -27,7 +27,7 @@
 # Search for the python framework on Apple.
 # CMAKE_FIND_FRAMEWORKS(Python)
 
-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0)
+FOREACH(_CURRENT_VERSION 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
   IF(_CURRENT_VERSION GREATER 3.1)
       SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "")
   ELSE()
-- 
2.15.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)