Date: Saturday, September 26, 2020 @ 20:47:56 Author: heftig Revision: 396624
copy old pygobject PKGBUILDs Added: python2-gobject/trunk/PKGBUILD (from rev 396623, pygobject/trunk/PKGBUILD) python2-gobject2/trunk/PKGBUILD (from rev 396623, pygobject2/trunk/PKGBUILD) ------------------+ 2/trunk/PKGBUILD | 44 +++++++++++++++++++++++++++ trunk/PKGBUILD | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) Copied: python2-gobject/trunk/PKGBUILD (from rev 396623, pygobject/trunk/PKGBUILD) =================================================================== --- trunk/PKGBUILD (rev 0) +++ trunk/PKGBUILD 2020-09-26 20:47:56 UTC (rev 396624) @@ -0,0 +1,85 @@ +# Maintainer: Jan Alexander Steffens (heftig) <jan.steff...@gmail.com> +# Contributor: Ionut Biru <ib...@archlinux.org> + +pkgbase=pygobject +pkgname=(python-gobject python2-gobject pygobject-devel) +pkgver=3.36.1 +pkgrel=1 +pkgdesc="Python Bindings for GLib/GObject/GIO/GTK+" +url="https://wiki.gnome.org/Projects/PyGObject" +arch=(x86_64) +license=(LGPL) +depends=(gobject-introspection-runtime) +makedepends=(python{,2}-cairo gobject-introspection git meson) +checkdepends=(python{,2}-pytest gtk3 xorg-server-xvfb) +optdepends=('cairo: Cairo bindings') +_commit=5c6bee1c2a0d08cf367aa61784b5b967128e68b2 # tags/3.36.1^0 +source=("git+https://gitlab.gnome.org/GNOME/pygobject.git#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd $pkgbase + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $pkgbase + # tests: don't use strict mode for xfail with the excepthook plugin + git cherry-pick -n dae0500166068d78150855bdef94f0bee18b31dd +} + +_build() { + arch-meson $pkgbase build-$1 -D python=/usr/bin/$1 + ninja -C build-$1 +} + +_check() { + xvfb-run meson test -C build-$1 --print-errorlogs +} + +_package() { + DESTDIR="$pkgdir" meson install -C build-$1 + $1 -m compileall -d /usr/lib "$pkgdir/usr/lib" + $1 -O -m compileall -d /usr/lib "$pkgdir/usr/lib" +} + +build() { + _build python + _build python2 +} + +check() { + _check python + _check python2 +} + +package_python-gobject() { + depends=("pygobject-devel=$pkgver" python) + + _package python + +### Split -devel + mkdir -p "$srcdir/devel" + mv "$pkgdir"/usr/{include,lib/pkgconfig} "$srcdir/devel" +} + +package_python2-gobject() { + pkgdesc="${pkgdesc/Python/Python2}" + depends=("pygobject-devel=$pkgver" python2) + + _package python2 + +### Remove -devel + rm -r "$pkgdir"/usr/{include,lib/pkgconfig} +} + +package_pygobject-devel() { + pkgdesc="Common development files for pygobject" + optdepends=() + + mkdir -p "$pkgdir/usr/lib" + mv devel/include "$pkgdir/usr" + mv devel/pkgconfig "$pkgdir/usr/lib" +} + +# vim:set sw=2 et: Copied: python2-gobject2/trunk/PKGBUILD (from rev 396623, pygobject2/trunk/PKGBUILD) =================================================================== --- 2/trunk/PKGBUILD (rev 0) +++ 2/trunk/PKGBUILD 2020-09-26 20:47:56 UTC (rev 396624) @@ -0,0 +1,44 @@ +# Maintainer: Jan Alexander Steffens (heftig) <jan.steff...@gmail.com> +# Maintainer: Jan de Groot <j...@archlinux.org> + +pkgbase=pygobject2 +pkgname=(python2-gobject2) +pkgver=2.28.7 +pkgrel=5 +pkgdesc="Legacy Python 2 bindings for GObject" +url="https://wiki.gnome.org/Projects/PyGObject" +arch=(x86_64) +license=(LGPL) +depends=(glib2 python2) +makedepends=(git) +provides=("pygobject2-devel=$pkgver-$pkgrel") +conflicts=('pygobject2-devel') +replaces=('pygobject2-devel<=2.28.7-3') +_commit=c9594b6a91e6ca2086fedec2ed8249e0a9c029fc # tags/PYGOBJECT_2_28_7^0 +source=("git+https://gitlab.gnome.org/GNOME/pygobject.git#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd pygobject + git describe --tags | sed 's/^PYGOBJECT_//;s/_/./g;s/-/+/g' +} + +prepare() { + cd pygobject + find . \( -name '*.py' -o -name '*.py.in' \) -exec sed -i '1s|python$|&2|' {} + + autoreconf -fvi +} + +build() ( + cd pygobject + CPPFLAGS+=' -Wno-deprecated-declarations' + ./configure --prefix=/usr --disable-introspection PYTHON=/usr/bin/python2 + sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +) + +package_python2-gobject2() { + cd pygobject + make DESTDIR="$pkgdir" install + rm -r "$pkgdir/usr/share/gtk-doc" +}