mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 20:36:40 +02:00
community/py3-sip: drop py2
This commit is contained in:
parent
65c5673cf5
commit
ce78abdb30
@ -1,39 +1,32 @@
|
||||
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
|
||||
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
|
||||
pkgname=py-sip
|
||||
pkgname=py3-sip
|
||||
_pkgname=sip
|
||||
pkgver=4.19.18
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
|
||||
options="!check" # No testsuite
|
||||
url="http://www.riverbankcomputing.com/software/sip/"
|
||||
arch="all"
|
||||
license="custom:sip"
|
||||
makedepends="python2-dev python3-dev"
|
||||
makedepends="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-pyqt5
|
||||
$pkgname-dev::noarch
|
||||
$pkgname-doc"
|
||||
source="https://www.riverbankcomputing.com/static/Downloads/${_pkgname}/$pkgver/${_pkgname}-$pkgver.tar.gz"
|
||||
source="https://www.riverbankcomputing.com/static/Downloads/$_pkgname/$pkgver/$_pkgname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pkgname-$pkgver
|
||||
|
||||
replaces="py-sip" # Backwards comptibility
|
||||
provides="py-sip=$pkgver-r$pkgrel" # Backwards comptibility
|
||||
|
||||
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"
|
||||
|
||||
@ -42,52 +35,31 @@ build() {
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
cd "$srcdir"/python3-sip
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
if [ "$module" = "sip" ]; then
|
||||
# Conflicts with py-sip-dev
|
||||
rm -r "$pkgdir"/usr/bin
|
||||
rm -r "$pkgdir"/usr/include
|
||||
fi
|
||||
# Move sip.h to /usr/include
|
||||
mv "$pkgdir"/usr/include/python3*/sip.h "$pkgdir"/usr/include/sip.h
|
||||
rm -rf "$pkgdir"/usr/include/python3*
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
|
||||
install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/custom/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
_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*
|
||||
pyqt5() {
|
||||
pkgdesc="Python3 SIP bindings for C and C++ libraries"
|
||||
|
||||
depends_dev="py-sip" # Depend on the package that provides the sip binary
|
||||
replaces="" # Reset
|
||||
provides="" # Reset
|
||||
|
||||
cd "$srcdir"/python3-PyQt5.sip
|
||||
make DESTDIR="$subpkgdir" install
|
||||
}
|
||||
|
||||
dev() {
|
||||
replaces="py-sip-dev" # Backwards compatibility
|
||||
provides="py-sip-dev=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
depends_dev="py3-sip" # Depend on the package that provides the sip binary
|
||||
default_dev
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user