Commit f86e5779 authored by Francesco Colista's avatar Francesco Colista

community/py-sip: fixed the build for PyQt5.sip and sip binary

cherry-piecked from edge
parent 30fb1b2b
......@@ -3,37 +3,34 @@
pkgname=py-sip
_pkgname=sip
pkgver=4.19.13
pkgrel=0
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"
makedocdepends="py-sphinx"
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"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-dev::noarch $pkgname-doc"
source="https://www.riverbankcomputing.com/static/Downloads/${_pkgname}/${_pkgname}-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
default_prepare
cp -r "$builddir" "$srcdir"/python2
cp -r "$builddir" "$srcdir"/python3
default_prepare
cp -r "$builddir" "$srcdir"/python2
cp -r "$builddir" "$srcdir"/python3
}
build() {
_build python2
_build python3
_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"
local python="$1"
export PYTHON=$python
cd "$srcdir"/$python
$python configure.py --sip-module PyQt5.sip
make
}
package() {
......@@ -42,22 +39,23 @@ package() {
_py2() {
replaces="$pkgname"
_py python2
_py python2
}
_py3() {
_py python3
_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/
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$srcdir/$python"
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
}
sha512sums="eb456e1f7efa463f859047acc5301e19279e1627629d0bad3ac7a0a52b77575126bc3f2c64bb4278ae11d415c13d2731dfc8c816bba71307173d393a414aae98 sip-4.19.13.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment