~alpine/aports

main/glib: add system pcre support, bash completion moved to subpackage v2 PROPOSED

Valery Kartel: 1
 main/glib: add system pcre support, bash completion moved to subpackage

 1 files changed, 29 insertions(+), 32 deletions(-)
2016-02-23 14:05 GMT+02:00 Timo Teras <timo.teras@iki.fi>:
> Hi,
> 
> Sorry for the late response on this one. We've been backlogged.
> 
> On Wed, 27 Jan 2016 17:37:42 +0200
> Valery Kartel <valery.kartel@gmail.com> wrote:
> 
> > diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
> > index 930e54f..f73ffe5 100644
> > @@ -40,41 +38,40 @@ build() {
> >               --mandir=/usr/share/man \
> >               --disable-gtk-doc \
> >               --disable-compile-warnings \
> > +             --with-pcre=system \
> > +             --with-pic \
> 
> --with-pic is probably not required. And the system PCRE is kind of
> discouraged by glib.
> 
> Yes, you are right --with-pic does not need there.
I just test to compile latest version of glib (2.47.6) And it requires
system pcre by default (minimal required version is 8.13) a bundled pcre
now stays as workaround.

What do you think to be better: bump to latest glib or just add
bash-completion to current one?

PS: as an upstream wrote 2.46 and 2.47 ABI-s 100% compatible
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/2179/mbox | git am -3
Learn more about email & git

[alpine-aports] [PATCH v2] main/glib: add system pcre support, bash completion moved to subpackage Export this patch

---
 main/glib/APKBUILD | 61 ++++++++++++++++++++++++++----------------------------
 1 file changed, 29 insertions(+), 32 deletions(-)

diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 930e54f..f73ffe5 100644
--- a/main/glib/APKBUILD
+++ b/main/glib/APKBUILD
@@ -1,7 +1,8 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.46.2
pkgrel=0
pkgrel=1
pkgdesc="Common C routines used by Gtk+ and other libs"
url="http://www.gtk.org"
arch="all"
@@ -9,15 +10,13 @@ license='GPL'
depends=
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
depends_dev="perl python gettext-dev zlib-dev bzip2-dev libffi-dev"
makedepends="$depends_dev"
source="http://ftp.gnome.org/pub/gnome/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
makedepends="$depends_dev pcre-dev"
source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
	0001-Revert-Move-quark-initialization-to-a-constructor.patch
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang"


_builddir="$srcdir/$pkgname-$pkgver"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
@@ -30,7 +29,6 @@ prepare() {
	touch -r docs/reference/glib/Makefile.am gtk-doc.make
}


build() {
	cd "$_builddir"
	./configure \
@@ -40,41 +38,40 @@ build() {
		--mandir=/usr/share/man \
		--disable-gtk-doc \
		--disable-compile-warnings \
		--with-pcre=system \
		--with-pic \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir/" install
	make DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/charset.alias
}

# move the stuff in /usr/bin to the glib-dev package
dev() {
	default_dev
	replaces="glib"
	mkdir -p "$subpkgdir"/usr/bin/ \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	cd "$pkgdir"/usr/bin
	mv \
		gdbus-codegen \
		glib-compile-resources \
		glib-genmarshal \
		glib-gettextize \
		glib-mkenums \
		gobject-query \
		gresource \
		gtester \
		gtester-report \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/gdb \
		"$pkgdir"/usr/share/glib-2.0 \
		"$subpkgdir"/usr/share/ || return 1
	mv "$pkgdir"/usr/share/bash-completion/completions/gresource \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share
		find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \
		-name "gdbus-codegen" -o \
		-name "gobject-query" -o \
		-name "gresource" -o \
		-name "gtester*" -o \
		-name "glib-*" \) \
		-exec mv {} "$subpkgdir"/usr/bin \;
	mv "$pkgdir"/usr/share/gdb "$pkgdir"/usr/share/glib-2.0 \
		"$subpkgdir"/usr/share
}

bashcomp() {
	pkgdesc="Bash completion for $pkgname"
	arch="noarch"
	depends=
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
	[ "$(ls -A "$pkgdir"/usr/share)" ] || rmdir "$pkgdir"/usr/share
}

md5sums="7f815d6e46df68e070cb421ed7f1139e  glib-2.46.2.tar.xz
-- 
2.7.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Hi,

Sorry for the late response on this one. We've been backlogged.

On Wed, 27 Jan 2016 17:37:42 +0200
Valery Kartel <valery.kartel@gmail.com> wrote: