main/glib: upgrade to 2.60.4

This commit is contained in:
Natanael Copa 2019-06-14 17:53:50 +00:00
parent 92d93c6729
commit 35653be643
2 changed files with 54 additions and 36 deletions

View File

@ -1,8 +1,8 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.58.1
pkgrel=3
pkgver=2.60.4
pkgrel=0
pkgdesc="Common C routines used by Gtk+ and other libs"
url="https://developer.gnome.org/glib/"
arch="all"
@ -11,41 +11,39 @@ depends=
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
depends_dev="python3 gettext-dev zlib-dev bzip2-dev libffi-dev
util-linux-dev libxml2-utils libxslt docbook-xml docbook-xsl"
makedepends="$depends_dev pcre-dev autoconf automake libtool"
source="https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
makedepends="$depends_dev pcre-dev meson ninja"
source="https://download.gnome.org/sources/glib/${pkgver%.*}/$pkgname-$pkgver.tar.xz
0001-gquark-fix-initialization-with-c-constructors.patch
deprecated-no-warn.patch
musl-libintl.patch
"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp:noarch"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
default_prepare
cd "$builddir"
NOCONFIGURE=1 ./autogen.sh
}
# secfixes:
# 2.60.4-r0:
# - CVE-2019-12450
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
meson \
--default-library=both \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--disable-compile-warnings \
--disable-selinux \
--with-pcre=system \
--with-python=/usr/bin/python3 \
--with-pic \
--enable-static \
--enable-man
make
--localstatedir=/var \
--buildtype=release \
-Dman=true \
-Dsystemd=false \
. output
ninja -C output
# FIXME: meson adds -lintl first in Libs: in th e.pc file but it needs tobe
# last for static builds (eg qemu)
sed -i -e '/^Libs:/s/-lintl \(.*\)/\1 -lintl/' output/meson-private/glib-2.0.pc
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/lib/charset.alias
DESTDIR="$pkgdir" ninja -C output install
}
dev() {
@ -69,15 +67,7 @@ static() {
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
bashcomp() {
pkgdesc="Bash completion for $pkgname"
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
}
sha512sums="115b74fcd43241e3c4b4babfb8170453b2a002ff02d5996f3c097876199cadccc1cf67b017c10c14c0d2a1bb4228027b743f4926bda0ef7d74012ed712ccd155 glib-2.58.1.tar.xz
sha512sums="614d25652ec9e8387f7865777e128b7f6fd68ff4a1a000868117cbcf5210b5f6aa476eb2b795a6dde56b997906aeb2157c83308f1421a27c4e379522d0ed0afc glib-2.60.4.tar.xz
32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch
744239ea2afb47e15d5d0214c37d7c798edac53797ca3ac14d515aee4cc3999ef9716ba744c64c40198fb259edc922559f77c9051104a568fc8ee4fc790810b1 deprecated-no-warn.patch"
744239ea2afb47e15d5d0214c37d7c798edac53797ca3ac14d515aee4cc3999ef9716ba744c64c40198fb259edc922559f77c9051104a568fc8ee4fc790810b1 deprecated-no-warn.patch
6ec43e76bb973367bd99c5e2077113e86df2b120b3788aeeb4692a572392bba7227e8217b28a918e02ad82fcb8ca6d260c3221b84688774d86779755af51a847 musl-libintl.patch"

View File

@ -0,0 +1,28 @@
diff --git a/meson.build b/meson.build
index 8320449..1d05edd 100644
--- a/meson.build
+++ b/meson.build
@@ -1785,10 +1785,10 @@ endif
# proxy-libintl subproject.
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
# implementations. This could be extended if issues are found in some platforms.
-if cc.has_function('ngettext')
- libintl = []
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
-else
+#if cc.has_function('ngettext')
+# libintl = []
+# have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
+#else
libintl = cc.find_library('intl', required : false)
if not libintl.found()
libintl = subproject('proxy-libintl').get_variable('intl_dep')
@@ -1797,7 +1797,7 @@ else
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset',
dependencies : libintl)
endif
-endif
+#endif
glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset)