~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[alpine-aports] [PATCH] main/glib: add system pcre support, strip to subpackages

Details
Message ID
<1453725673-10081-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1453725673
DKIM signature
missing
Download raw message
Patch: +24 -24
- bash completion moved to subpackage
- libraries moved to subpackage
---
 main/glib/APKBUILD | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 930e54f..4366112 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-libs $pkgname-lang $pkgname-bash-completion:bashcomp"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
@@ -40,13 +39,15 @@ 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
}

@@ -54,27 +55,26 @@ package() {
dev() {
	default_dev
	replaces="glib"
	mkdir -p "$subpkgdir"/usr/bin/ \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	mkdir -p "$subpkgdir"/usr/bin/ "$subpkgdir"/usr/share
	cd "$pkgdir"/usr/bin
	mv \
		gdbus-codegen \
		glib-compile-resources \
		glib-genmarshal \
		glib-gettextize \
		glib-mkenums \
		gobject-query \
		gresource \
		gtester \
		gtester-report \
		"$pkgdir"/usr/bin/gdbus-codegen \
		"$pkgdir"/usr/bin/gobject-query \
		"$pkgdir"/usr/bin/gtester* \
		"$pkgdir"/usr/bin/glib-* \
		"$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
		"$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
}

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
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20160126222444.7e1d30a2@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1453725673-10081-1-git-send-email-valery.kartel@gmail.com> (view parent)
Sender timestamp
1453843484
DKIM signature
missing
Download raw message
Hi,

Thanks for your persistant clean up patches!

On Mon, 25 Jan 2016 14:41:13 +0200
Valery Kartel <valery.kartel@gmail.com> wrote:

> - bash completion moved to subpackage

good!

> - libraries moved to subpackage

This I am very sceptic to.

Don't you think moving the libs to subpackage will break things?

Those are the binaries shipped with glib:

usr/bin/glib-compile-schemas
usr/bin/gio-querymodules
usr/bin/gdbus
usr/bin/gapplication
usr/bin/gsettings


With your change, those binaries will not be installed unless you
explicitly add a dependency for them. As far I know, we don't have
*any* package that have the explicit depend on glib, they all rely on
glib being pulled in as a shared object dependency. Even the -dev
packages will not pull in those.

Before we make a change like this that I am most certain will break
something, I would like an list of the exact packages that will break,
add glib as explicit dependency for those and after that I will
consider the above change.

Personally, I believe this job is very time consuming, and it is
probably easy to miss something so I will not do it. Not worth it in
other words.

I think the other changes are good, so if you still think its worth it,
then please do the -libs subpackage in separate commit.

thanks!

-nc

> ---
>  main/glib/APKBUILD | 48 ++++++++++++++++++++++++------------------------
>  1 file changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
> index 930e54f..4366112 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-libs $pkgname-lang $pkgname-bash-completion:bashcomp"
>  
> +_builddir="$srcdir"/$pkgname-$pkgver
>  prepare() {
>  	cd "$_builddir"
>  	for i in $source; do
> @@ -40,13 +39,15 @@ 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
>  }
>  
> @@ -54,27 +55,26 @@ package() {
>  dev() {
>  	default_dev
>  	replaces="glib"
> -	mkdir -p "$subpkgdir"/usr/bin/ \
> -		"$subpkgdir"/usr/share/bash-completion/completions \
> -		|| return 1
> +	mkdir -p "$subpkgdir"/usr/bin/ "$subpkgdir"/usr/share
>  	cd "$pkgdir"/usr/bin
>  	mv \
> -		gdbus-codegen \
> -		glib-compile-resources \
> -		glib-genmarshal \
> -		glib-gettextize \
> -		glib-mkenums \
> -		gobject-query \
> -		gresource \
> -		gtester \
> -		gtester-report \
> +		"$pkgdir"/usr/bin/gdbus-codegen \
> +		"$pkgdir"/usr/bin/gobject-query \
> +		"$pkgdir"/usr/bin/gtester* \
> +		"$pkgdir"/usr/bin/glib-* \
>  		"$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
> +		"$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
>  }
>  
>  md5sums="7f815d6e46df68e070cb421ed7f1139e  glib-2.46.2.tar.xz



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)