Commit 5bb8b3f9 authored by Carlo Landmeter's avatar Carlo Landmeter

main/py-gobject3: add support for py3

parent 81bc97b7
......@@ -2,40 +2,73 @@
pkgname=py-gobject3
pkgver=3.24.1
pkgrel=0
pkgdesc="Python bindings for the GObject library"
pkgdesc="Python bindings for the GObject library"
url="http://www.pygtk.org/"
arch="all"
license="GPL"
depends="py-cairo"
depends_dev="libffi-dev glib-dev"
makedepends="$depends_dev python2-dev py-cairo-dev gobject-introspection-dev"
depends_dev="libffi-dev glib-dev"
makedepends="$depends_dev python2-dev py-cairo-dev gobject-introspection-dev
python3-dev py3-cairo-dev gnome-common automake autoconf libtool"
install=
subpackages="$pkgname-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-dev"
source="http://ftp.gnome.org/pub/GNOME/sources/pygobject/${pkgver%.*}/pygobject-$pkgver.tar.xz"
builddir="$srcdir"/pygobject-$pkgver
_builddir="$srcdir"/pygobject-$pkgver
prepare() {
cd "$_builddir"
# apply patches here
default_prepare
cp -r "$builddir" "$srcdir"/python2
cp -r "$builddir" "$srcdir"/python3
}
build() {
cd "$_builddir"
CFLAGS="$CFLAGS -D_GNU_SOURCE" ./configure \
build() {
_build python2
_build python3
}
package() {
mkdir -p "$pkgdir"
}
dev() {
local pkgdir="${pkgdir%/*}/py2-gobject3"
default_dev
}
_build() {
local python="$1"
export PYTHON=$python
cd "$srcdir"/$python
# do not include headers with py3
[ "$python" = "python3" ] && local _no_dev="--without-common"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-compile-warnings=minimum \
|| return 1
make || return 1
$_no_dev
make
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install
_py2() {
depends="${depends//py-/py2-}"
_py python2
}
_py3() {
depends="${depends//py-/py3-}"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$srcdir"/"$python"
make DESTDIR="$subpkgdir" install
}
sha512sums="f35968ab12b872c85af6b2410cadedcf9fa7e17352a40f3dc557c86203aa1c38753710aab9ce55e986ee2c98b64e14123c65083655445e993d0b53431db6dc93 pygobject-3.24.1.tar.xz"
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