From 7db9b6d14f8f6c700bf80ed5606de772f20356bd Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Tue, 21 Oct 2014 19:31:43 +0200 Subject: [PATCH] New package: sip-4.16.3 with python{,3.4}-sip subpkgs; replaces old python-sip --- srcpkgs/python-sip | 1 + srcpkgs/python-sip-devel | 1 + srcpkgs/python-sip/template | 57 --------------------- srcpkgs/python3.4-sip | 2 +- srcpkgs/python3.4-sip-devel | 1 + srcpkgs/sip/template | 98 +++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 58 deletions(-) create mode 120000 srcpkgs/python-sip create mode 120000 srcpkgs/python-sip-devel delete mode 100644 srcpkgs/python-sip/template create mode 120000 srcpkgs/python3.4-sip-devel create mode 100644 srcpkgs/sip/template diff --git a/srcpkgs/python-sip b/srcpkgs/python-sip new file mode 120000 index 00000000000..633f7c0bcce --- /dev/null +++ b/srcpkgs/python-sip @@ -0,0 +1 @@ +sip \ No newline at end of file diff --git a/srcpkgs/python-sip-devel b/srcpkgs/python-sip-devel new file mode 120000 index 00000000000..633f7c0bcce --- /dev/null +++ b/srcpkgs/python-sip-devel @@ -0,0 +1 @@ +sip \ No newline at end of file diff --git a/srcpkgs/python-sip/template b/srcpkgs/python-sip/template deleted file mode 100644 index 758497d0b85..00000000000 --- a/srcpkgs/python-sip/template +++ /dev/null @@ -1,57 +0,0 @@ -# Template file for 'python-sip' -pkgname=python-sip -version=4.16.2 -revision=2 -wrksrc="sip-${version}" -maintainer="Dominik Honnef " -hostmakedepends="python-devel python3.4-devel" -makedepends="${hostmakedepends}" -depends="python" -license="GPL" -homepage="http://www.riverbankcomputing.co.uk/software/sip/intro" -short_desc="Python extension module generator for C and C++ libraries" -distfiles="http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.2/sip-4.16.2.tar.gz" -checksum=a55a2324a46ab42e42ae57c52ef06583b17d25c987973fe2e7ff2e8a649294ce - -_do_sip_build() { - local v=$1 suffix=$2 - - python${v} configure.py \ - --bindir="/usr/bin" \ - --sipdir="/usr/share/sip${v}" \ - --destdir="/usr/lib/python${v}/site-packages" \ - --incdir="/usr/include/python${v}${suffix}" \ - INCDIR="${XBPS_CROSS_BASE}/usr/include/python${v}${suffix}" \ - CC="${CC}" \ - CFLAGS="${CFLAGS}" \ - CXX="${CXX}" \ - CXXFLAGS="${CXXFLAGS}" \ - LINK="${CXX}" \ - LINK_SHLIB="${CXX}" \ - LFLAGS="${LDFLAGS}" \ - STRIP="" - - make $makejobs - make DESTDIR=${DESTDIR} install - mv ${DESTDIR}/usr/bin/sip ${DESTDIR}/usr/bin/sip${v} -} - -do_build() { - _do_sip_build 2.7 - _do_sip_build 3.4 "m" -} - -do_install() { - ln -s /usr/bin/sip2.7 ${DESTDIR}/usr/bin/sip -} - -python3.4-sip_package() { - depends="python3.4" - pkg_install() { - sed -i -e "s|'/usr/bin/sip'|'/usr/bin/sip3.4'|g" ${DESTDIR}/usr/lib/python3.4/site-packages/sipconfig.py - mkdir -p ${PKGDESTDIR}/usr/{lib,bin,include} - mv ${DESTDIR}/usr/bin/sip3.4 ${PKGDESTDIR}/usr/bin/ - mv ${DESTDIR}/usr/lib/python3.4 ${PKGDESTDIR}/usr/lib/ - mv ${DESTDIR}/usr/include/python3.4m ${PKGDESTDIR}/usr/include/ - } -} diff --git a/srcpkgs/python3.4-sip b/srcpkgs/python3.4-sip index a934e10e92a..633f7c0bcce 120000 --- a/srcpkgs/python3.4-sip +++ b/srcpkgs/python3.4-sip @@ -1 +1 @@ -python-sip \ No newline at end of file +sip \ No newline at end of file diff --git a/srcpkgs/python3.4-sip-devel b/srcpkgs/python3.4-sip-devel new file mode 120000 index 00000000000..633f7c0bcce --- /dev/null +++ b/srcpkgs/python3.4-sip-devel @@ -0,0 +1 @@ +sip \ No newline at end of file diff --git a/srcpkgs/sip/template b/srcpkgs/sip/template new file mode 100644 index 00000000000..52dc215bc3b --- /dev/null +++ b/srcpkgs/sip/template @@ -0,0 +1,98 @@ +# Template file for 'sip' +pkgname=sip +version=4.16.3 +revision=1 +wrksrc="sip-${version}" +hostmakedepends="python-devel python3.4-devel" +makedepends="${hostmakedepends}" +replaces="python-sip<4.16.2_2" +short_desc="Python extension module generator for C and C++ libraries" +maintainer="Alessio Sergi " +homepage="http://www.riverbankcomputing.co.uk/software/sip/intro" +license="GPL-2, GPL-3, SIP" +distfiles="${SOURCEFORGE_SITE}/pyqt/${pkgname}-${version}.tar.gz" +checksum=fd8a65693612f1d0c5dcd41881cd92496d770b3b9e03a138e533e3afc892f421 + +_do_sip_build() { + local v=$1 suffix=$2 + + python${v} configure.py \ + CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ + LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \ + INCDIR="${XBPS_CROSS_BASE}/usr/include/python${v}${suffix}" + make ${makejobs} +} + +post_extract() { + cp -a ${wrksrc} /tmp/python3.4-sip-build + mv /tmp/python3.4-sip-build ${wrksrc} +} + +do_build() { + # build python-sip + _do_sip_build 2.7 + + # build python3.4-sip + cd ${wrksrc}/python3.4-sip-build + _do_sip_build 3.4 "m" +} + +do_install() { + # install sip + make DESTDIR=${DESTDIR} install -C sipgen + + # install python-sip + make DESTDIR=${DESTDIR} install -C siplib + vinstall sipconfig.py 644 usr/lib/python2.7/site-packages + vinstall sipdistutils.py 644 usr/lib/python2.7/site-packages + + # install python3.4-sip + cd ${wrksrc}/python3.4-sip-build + make DESTDIR=${DESTDIR} install -C siplib + vinstall sipconfig.py 644 usr/lib/python3.4/site-packages + vinstall sipdistutils.py 644 usr/lib/python3.4/site-packages +} + +python-sip_package() { + replaces="python-sip<4.16.2_2" + depends="sip python" + pycompile_module="sipconfig.py" + short_desc+=" - Python2 SIP bindings" + pkg_install() { + vmove usr/lib/python2.7/site-packages/sipconfig.py + } +} + +python-sip-devel_package() { + replaces="python-sip<4.16.2_2" + depends="python-sip>=${version}_${revision}" + pycompile_module="sipdistutils.py" + short_desc+=" - Python2 SIP development files" + pkg_install() { + vmove usr/include/python2.7 + vmove usr/lib/python2.7/site-packages/sipdistutils.py + } +} + +python3.4-sip_package() { + replaces="python3.4-sip<4.16.2_2" + depends="sip python3.4" + pycompile_version="3.4" + pycompile_module="sipconfig.py" + short_desc+=" - Python3.4 SIP bindings" + pkg_install() { + vmove usr/lib/python3.4/site-packages/sipconfig.py + } +} + +python3.4-sip-devel_package() { + replaces="python3.4-sip<4.16.2_2" + depends="python3.4-sip>=${version}_${revision}" + pycompile_version="3.4" + pycompile_module="sipdistutils.py" + short_desc+=" - Python3.4 SIP development files" + pkg_install() { + vmove usr/include/python3.4m + vmove usr/lib/python3.4/site-packages/sipdistutils.py + } +}