libgweather: updated to 3.16.1.

This commit is contained in:
Andrea Zagli
2015-04-20 18:11:59 +02:00
parent 6fe86aaabe
commit 8dddbd5909
5 changed files with 112 additions and 73 deletions

View File

@@ -1,68 +0,0 @@
=== modified file 'Makefile.in.in'
--- a/po-locations/Makefile.in.in 2012-01-18 16:37:06 +0000
+++ b/po-locations/Makefile.in.in 2013-05-12 17:12:40 +0000
@@ -33,8 +33,7 @@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+localedir = @localedir@
subdir = po-locations
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
@@ -108,7 +107,7 @@
install-data-yes: all
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
@@ -142,8 +141,8 @@
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
=== modified file 'intltool.m4'
--- a/m4/intltool.m4 2012-02-20 14:50:33 +0000
+++ b/m4/intltool.m4 2013-05-12 17:12:40 +0000
@@ -155,31 +155,6 @@
# Substitute ALL_LINGUAS so we can use it in po/Makefile
AC_SUBST(ALL_LINGUAS)
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[]],
- [[extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr]])],
- [DATADIRNAME=share],
- [case $host in
- *-*-solaris*)
- dnl On Solaris, if bind_textdomain_codeset is in libc,
- dnl GNU format message catalog is always supported,
- dnl since both are added to the libc all together.
- dnl Hence, we'd like to go with DATADIRNAME=share
- dnl in this case.
- AC_CHECK_FUNC(bind_textdomain_codeset,
- [DATADIRNAME=share], [DATADIRNAME=lib])
- ;;
- *)
- [DATADIRNAME=lib]
- ;;
- esac])
-fi
-AC_SUBST(DATADIRNAME)
-
IT_PO_SUBDIR([po])
])

View File

@@ -0,0 +1,80 @@
--- ./libgweather/parser.c.orig 2015-04-20 17:42:37.500600900 +0200
+++ ./libgweather/parser.c 2015-04-20 17:44:52.715146100 +0200
@@ -131,19 +131,34 @@
time_t now;
struct tm tm;
+ gchar *gweather_xml_location_dir;
+
_gweather_gettext_init ();
parser = g_slice_new0 (GWeatherParser);
zlib_support = xmlHasFeature (XML_WITH_ZLIB);
- filename = g_build_filename (GWEATHER_XML_LOCATION_DIR, "Locations.xml", NULL);
+#ifdef G_OS_WIN32
+ gchar *dir;
+
+ dir = g_win32_get_package_installation_directory_of_module (NULL);
+ gweather_xml_location_dir = g_build_filename (dir, "share", "libgweather", NULL);
+
+ g_free (dir);
+#else
+ gweather_xml_location_dir = g_strdup (GWEATHER_XML_LOCATION_DIR);
+#endif
+
+ filename = g_build_filename (gweather_xml_location_dir, "Locations.xml", NULL);
if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR) && zlib_support) {
g_free (filename);
- filename = g_build_filename (GWEATHER_XML_LOCATION_DIR, "Locations.xml.gz", NULL);
+ filename = g_build_filename (gweather_xml_location_dir, "Locations.xml.gz", NULL);
}
+ g_free (gweather_xml_location_dir);
+
/* Open the xml file containing the different locations */
parser->xml = xmlNewTextReaderFilename (filename);
g_free (filename);
--- ./libgweather/weather.c.orig 2015-04-20 17:41:19.049620900 +0200
+++ ./libgweather/weather.c 2015-04-20 17:41:53.096893500 +0200
@@ -84,21 +84,36 @@
void
_gweather_gettext_init (void)
{
+ gchar *gnomelocaledir;
+
+#ifdef G_OS_WIN32
+ gchar *dir;
+
+ dir = g_win32_get_package_installation_directory_of_module (NULL);
+ gnomelocaledir = g_build_filename (dir, "share", "locale", NULL);
+
+ g_free (dir);
+#else
+ gnomelocaledir = g_strdup (GNOMELOCALEDIR);
+#endif
+
static gsize gweather_gettext_initialized = FALSE;
if (G_UNLIKELY (g_once_init_enter (&gweather_gettext_initialized))) {
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, gnomelocaledir);
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
- bindtextdomain ("libgweather-locations", GNOMELOCALEDIR);
+ bindtextdomain ("libgweather-locations", gnomelocaledir);
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset ("libgweather-locations", "UTF-8");
#endif
g_once_init_leave (&gweather_gettext_initialized, TRUE);
}
+
+ g_free (gnomelocaledir);
}
static void

View File

@@ -2,7 +2,7 @@
_realname=libgweather
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.16.0
pkgver=3.16.1
pkgrel=1
arch=('any')
pkgdesc="GWeather shared library (mingw-w64)"
@@ -20,17 +20,19 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
options=('strip' 'staticlibs')
license=("LGPL 2.1")
url="http://www.gnome.org/"
install=${_realname}-${CARCH}.install
source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz
001-win.patch
002-localedir-fix.patch)
sha256sums=('eacb755a95268bb65f6e027ec236de36fb0f486a8bb938e98e82377836373f74'
002-relocation.patch)
sha256sums=('db0955261427bb0f1a3f2747507863c591bf2f09dc477cfbf1cea0382cd34dfd'
'54aafa1ec47f818855cb8d17bb4f7f4458505a54b08c9fc51bfd4bbc1d6c37a2'
'6677acc97b0322170339479df46435f14eb232df2d36e607029af3bd1f1a4eb0')
'5d44c1dfed0deff2a4acdb676ff99d8d6ba1983abf27eb423ae3351334ce10cb')
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/001-win.patch
patch -p1 -i ${srcdir}/002-localedir-fix.patch
patch -b -V simple -p1 -i ${srcdir}/002-relocation.patch
AUTOPOINT='intltoolize --automake --copy' autoreconf -fiv
}
@@ -39,6 +41,9 @@ build() {
mkdir -p build-${MINGW_CHOST}
cd build-${MINGW_CHOST}
mkdir -p doc/html
cp -rf ../${_realname}-${pkgver}/doc/html/* doc/html
../${_realname}-${pkgver}/configure \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \

View File

@@ -0,0 +1,11 @@
post_install() {
mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install $1
}

View File

@@ -0,0 +1,11 @@
post_install() {
mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install $1
}