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
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 -3Learn more about email & git
--- 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 \
Timo Teras <timo.teras@iki.fi>--with-pic is probably not required. And the system PCRE is kind of discouraged by glib. https://developer.gnome.org/glib/stable/glib-building.html sayeth: ... GRegex uses the PCRE library for regular expression matching. The default is to use the internal version of PCRE that is patched to use GLib for memory management and Unicode handling. If you prefer to use the system-supplied PCRE library you can pass the --with-pcre=system option to, but it is not recommended. ... and ... --with-pcre. Specify whether to use the internal or the system-supplied PCRE library. 'internal' means that GRegex will be compiled to use the internal PCRE library. 'system' means that GRegex will be compiled to use the system-supplied PCRE library. Using the internal PCRE is the preferred solution: System-supplied PCRE has a separated copy of the big tables used for Unicode handling. Some systems have PCRE libraries compiled without some needed features, such as UTF-8 and Unicode support. PCRE uses some global variables for memory management and other features. In the rare case of a program using both GRegex and PCRE (maybe indirectly through a library), this variables could lead to problems when they are modified. ... While generally we prefer to use system libraries. But I'm wondering is it useful in this case as upstream has modified package, and they spend lot of paragaphs explaining why it's not good idea. I suppose if our PCRE has utf8 in good condition. The real reason would be the pcre's global state. Do you know if this is fixed in pcre releases, or if the above concern is valid? All this said, the other package splitting changes and bash-completion stuff looks good. Perhaps you could send that separately first? I'm happy to apply it right away. But this --with-pcre=system probably needs comments from others and a bit more of discussion. Thanks, Timo --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---
|| 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 ---
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: