glib: sync with gentoo

This commit is contained in:
blshkv 2017-04-21 16:37:22 +08:00
parent db82a235db
commit fb7eabc1c8
No known key found for this signature in database
GPG key ID: 9CCF6FCB8D8A14BF
3 changed files with 89 additions and 14 deletions

View file

@ -0,0 +1,52 @@
From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
From: Iain Lane <iain@orangesquash.org.uk>
Date: Mon, 13 Mar 2017 16:52:11 +0000
Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
The tzdata maintainers had previously invented abbreviations for
timezones. As of their 2017a release, the one we were testing ("BRT")
has been dropped.
Switch to testing PST, which is a real timezone abbreviation.
https://bugzilla.gnome.org/show_bug.cgi?id=779799
---
glib/tests/gdatetime.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index dcb8a8f..c54031d 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
g_date_time_unref (dt);
#ifdef G_OS_UNIX
- tz = g_time_zone_new ("America/Recife");
+ tz = g_time_zone_new ("America/Tijuana");
#elif defined G_OS_WIN32
- tz = g_time_zone_new ("E. South America Standard Time");
+ tz = g_time_zone_new ("Pacific Standard Time");
#endif
- dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
+ dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
g_time_zone_unref (tz);
g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
- g_assert_cmpint (5, ==, g_date_time_get_month (dt));
+ g_assert_cmpint (11, ==, g_date_time_get_month (dt));
g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
g_assert_cmpint (0, ==, g_date_time_get_second (dt));
#ifdef G_OS_UNIX
- g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
+ g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
#elif defined G_OS_WIN32
- g_assert_cmpstr ("E. South America Standard Time", ==,
+ g_assert_cmpstr ("Pacific Standard Time", ==,
g_date_time_get_timezone_abbreviation (dt));
#endif
g_assert (!g_date_time_is_daylight_savings (dt));
--
2.10.1

View file

@ -1,6 +1,5 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
# adding new dependencies end up making stage3 to grow. Every addition needs
@ -12,7 +11,7 @@ PYTHON_COMPAT=( python2_7 )
# pkg-config
GNOME2_LA_PUNT="yes"
inherit autotools bash-completion-r1 eutils flag-o-matic gnome2 libtool linux-info \
inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
DESCRIPTION="The GLib library of C routines"
@ -22,13 +21,13 @@ SRC_URI="${SRC_URI}
LICENSE="LGPL-2+"
SLOT="2"
IUSE="dbus debug fam kernel_linux livecd +mime pentoo selinux static-libs systemtap test utils xattr"
IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
REQUIRED_USE="
utils? ( ${PYTHON_REQUIRED_USE} )
test? ( ${PYTHON_REQUIRED_USE} )
"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
RDEPEND="
!<dev-util/gdbus-codegen-${PV}
@ -113,6 +112,8 @@ src_prepare() {
sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
fi
eapply "${FILESDIR}"/${PN}-2.50.3-fix-gdatetime-tests.patch
# gdbus-codegen is a separate package
eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch

View file

@ -1,6 +1,5 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
# adding new dependencies end up making stage3 to grow. Every addition needs
@ -12,8 +11,8 @@ PYTHON_COMPAT=( python2_7 )
# pkg-config
GNOME2_LA_PUNT="yes"
inherit autotools bash-completion-r1 eutils flag-o-matic gnome2 libtool linux-info \
multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="http://www.gtk.org/"
@ -28,7 +27,11 @@ REQUIRED_USE="
test? ( ${PYTHON_REQUIRED_USE} )
"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
# Added util-linux multilib dependency to have libmount support (which
# is always turned on on linux systems, unless explicitly disabled, but
# this ebuild does not do that anyway) (bug #599586)
RDEPEND="
!<dev-util/gdbus-codegen-${PV}
@ -37,6 +40,7 @@ RDEPEND="
>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
@ -113,6 +117,9 @@ src_prepare() {
sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
fi
# Fix tests with timezone-data-2017a and newer
eapply "${FILESDIR}"/${P}-fix-gdatetime-tests.patch
# gdbus-codegen is a separate package
eapply "${FILESDIR}"/${PN}-2.50.0-external-gdbus-codegen.patch
@ -141,6 +148,8 @@ multilib_src_configure() {
fi
export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
export LIBFFI_LIBS="-lffi"
export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
export PCRE_LIBS="-lpcre"
fi
# These configure tests don't work when cross-compiling.
@ -168,6 +177,7 @@ multilib_src_configure() {
$(usex debug --enable-debug=yes ' ') \
$(use_enable xattr) \
$(use_enable fam) \
$(use_enable kernel_linux libmount) \
$(use_enable selinux) \
$(use_enable static-libs static) \
$(use_enable systemtap dtrace) \
@ -191,6 +201,7 @@ multilib_src_test() {
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
unset GSETTINGS_BACKEND # bug #596380
python_setup
# Related test is a bit nitpicking
@ -252,7 +263,7 @@ pkg_preinst() {
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="usr/$(get_libdir)/gio/giomodule.cache"
local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
@ -261,7 +272,11 @@ pkg_preinst() {
fi
}
multilib_foreach_abi multilib_pkg_preinst
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
@ -274,7 +289,14 @@ pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
multilib_foreach_abi multilib_pkg_postinst
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
}
pkg_postrm() {
@ -282,7 +304,7 @@ pkg_postrm() {
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"usr/$(get_libdir)/gio/giomodule.cache
rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled