aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-01-27 17:37:42 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-02-23 11:55:43 +0000
commit06354fc6bd7f9a8a887a005c91b066906ed017ec (patch)
tree1b4c7ebab13aee0329233f258c5e4526233e33ce
parentfa9b37d63ddfb697e4399d0b2501b0e91059edd0 (diff)
downloadaports-06354fc6bd7f9a8a887a005c91b066906ed017ec.tar.bz2
aports-06354fc6bd7f9a8a887a005c91b066906ed017ec.tar.xz
main/glib: add system pcre support, bash completion moved to subpackage
-rw-r--r--main/glib/APKBUILD61
1 files changed, 29 insertions, 32 deletions
diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 930e54f854..f73ffe5c06 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