aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-sip
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-08 07:19:11 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-08 10:40:39 -0300
commit65c5673cf5268b618151a320ebf5e3acfcd7d820 (patch)
tree8127ca675cc4b78147a8fb90e7385d83fbdc61c7 /community/py3-sip
parentcaf4eee835d870c84da8a8d38ed13f43819ac83e (diff)
downloadaports-65c5673cf5268b618151a320ebf5e3acfcd7d820.tar.bz2
aports-65c5673cf5268b618151a320ebf5e3acfcd7d820.tar.xz
community/py3-sip: rename from py-sip
Diffstat (limited to 'community/py3-sip')
-rw-r--r--community/py3-sip/APKBUILD94
1 files changed, 94 insertions, 0 deletions
diff --git a/community/py3-sip/APKBUILD b/community/py3-sip/APKBUILD
new file mode 100644
index 0000000000..782dc6704b
--- /dev/null
+++ b/community/py3-sip/APKBUILD
@@ -0,0 +1,94 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-sip
+_pkgname=sip
+pkgver=4.19.18
+pkgrel=1
+pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
+url="http://www.riverbankcomputing.com/software/sip/"
+arch="all"
+license="custom:sip"
+makedepends="python2-dev python3-dev"
+subpackages="
+ py2-${pkgname#py-}:_py2
+ py2-${pkgname#py-}-pyqt5:_py2qt5
+ py3-${pkgname#py-}:_py3
+ py3-${pkgname#py-}-pyqt5:_py3qt5
+ $pkgname-dev:_dev:noarch
+ $pkgname-doc"
+source="https://www.riverbankcomputing.com/static/Downloads/${_pkgname}/$pkgver/${_pkgname}-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+prepare() {
+ default_prepare
+ mkdir -p "$srcdir"/python2-sip
+ mkdir -p "$srcdir"/python3-sip
+ mkdir -p "$srcdir"/python2-PyQt5.sip
+ mkdir -p "$srcdir"/python3-PyQt5.sip
+}
+
+build() {
+ cd "$srcdir"/python2-sip
+ python2 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
+
+ cd "$srcdir"/python2-PyQt5.sip
+ python2 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt5.sip --no-tools
+
+ cd "$srcdir"/python3-sip
+ python3 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
+
+ cd "$srcdir"/python3-PyQt5.sip
+ python3 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt5.sip --no-tools
+}
+
+package() {
+ install -Dm644 "$builddir"/LICENSE "${pkgdir}"/usr/share/licenses/custom/${pkgname}/LICENSE
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2 sip
+}
+
+_py3() {
+ _py python3 sip
+}
+
+_py2qt5() {
+ _py python2 PyQt5.sip
+}
+
+_py3qt5() {
+ _py python3 PyQt5.sip
+}
+
+_py() {
+ local python="$1" module="$2"
+ pkgdesc="$python SIP bindings for C and C++ libraries"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$srcdir/$python-$module"
+
+ make DESTDIR="$pkgdir" install
+
+ if [ "$module" = "sip" ]; then
+ # Conflicts with py-sip-dev
+ rm -r "$pkgdir"/usr/bin
+ rm -r "$pkgdir"/usr/include
+ fi
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
+}
+
+_dev() {
+ cd "$srcdir"/python3-sip
+ make DESTDIR="$pkgdir" install -C sipgen
+ mv "$pkgdir"/usr/include/python*/sip.h "$pkgdir"/usr/include
+ rm -r "$pkgdir"/usr/include/python*
+
+ depends_dev="py-sip" # Depend on the package that provides the sip binary
+ default_dev
+}
+
+sha512sums="e3c58cc6c38b277b3b9fd7adf33df91b47e0385e59d52c543e630a194d73d04d91e0a3845cb3973d1955f77049e75246fa7e6f544e02e1efe0086a297cf1d887 sip-4.19.18.tar.gz"