blob: 65a8a8f878e67f8d42950a5e6fb4484377997f26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-sip
_pkgname=sip
pkgver=4.19.13
pkgrel=0
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 py3-${pkgname#py-}:_py3 $pkgname-dev"
source="https://sourceforge.net/projects/pyqt/files/$_pkgname/$_pkgname-$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
default_prepare
cp -r "$builddir" "$srcdir"/python2
cp -r "$builddir" "$srcdir"/python3
}
build() {
_build python2
_build python3
}
_build() {
local python="$1"
export PYTHON=$python
cd "$srcdir"/$python
local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h.in)
$python configure.py
make CC="${CC:-gcc}" \
CXX="${CXX:-g++}" \
CFLAGS="$CFLAGS -fPIC" \
CXXFLAGS="$CXXFLAGS"
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$srcdir/$python"
make DESTDIR="$pkgdir" install
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE
}
sha512sums="eb456e1f7efa463f859047acc5301e19279e1627629d0bad3ac7a0a52b77575126bc3f2c64bb4278ae11d415c13d2731dfc8c816bba71307173d393a414aae98 sip-4.19.13.tar.gz"
|