Hello community, here is the log from the commit of package libgweather checked in at Mon Dec 1 17:55:45 CET 2008. -------- --- GNOME/libgweather/libgweather.changes 2008-10-22 16:48:10.000000000 +0200 +++ /mounts/work_src_done/STABLE/libgweather/libgweather.changes 2008-11-30 23:26:22.000000000 +0100 @@ -1,0 +2,22 @@ +Sun Nov 30 23:22:27 CET 2008 - vuntz@novell.com + +- Add libgweather-bnc428346-bundle.patch to support shipping + Locations.xml files in bundle-lang-gnome-$locale without + conflicting with libgweather-lang: bundle-lang-gnome-$locale will + use another directory. + +------------------------------------------------------------------- +Mon Nov 24 18:12:56 CET 2008 - vuntz@novell.com + +- Add libgweather-bnc428346-compress.patch to compress + Locations.xml files. +- Move Locations.$locales.xml data to the lang package. +- This makes libgweather smaller, and libgweather-lang much bigger + (especially since compressing each Location.xml files results in + a compression loss in the final rpm -- it's more efficient to + compress several xml files together than separately), but this + makes it possible to have those files end in the + bundle-lang-gnome-$locale packages. So in the end, it's a win. + Fix bnc#428346. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- libgweather-bnc428346-bundle.patch libgweather-bnc428346-compress.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgweather.spec ++++++ --- /var/tmp/diff_new_pack.La7057/_old 2008-12-01 17:54:26.000000000 +0100 +++ /var/tmp/diff_new_pack.La7057/_new 2008-12-01 17:54:26.000000000 +0100 @@ -26,9 +26,13 @@ License: GPL v2 or later Group: Development/Libraries/GNOME Version: 2.24.1 -Release: 1 +Release: 2 Summary: Library to get online weather information Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM libgweather-bnc428346-compress.patch bnc428346 bgo552868 vuntz@novell.com -- Compress Locations.xml files +Patch0: libgweather-bnc428346-compress.patch +# PATCH-FEATURE-OPENSUSE libgweather-bnc428346-bundle.patch bnc428346 vuntz@novell.com -- Support a bundle directory so that bundle-lang-gnome-* doesn't conflict with libgweather-lang. +Patch1: libgweather-bnc428346-bundle.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-lang = %{version} Requires: libgweather1 = %{version} @@ -74,17 +78,27 @@ %lang_package %prep %setup -q +%patch0 -p0 +%patch1 -p1 %build +autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS" %configure \ --disable-static \ - --disable-schemas-install + --disable-schemas-install \ + --enable-locations-compression make %{?jobs:-j%jobs} %install %makeinstall %find_lang libgweather +# Move localized Locations.xml files to the -lang package +for locationsxml in $RPM_BUILD_ROOT/%{_datadir}/libgweather/Locations.*.xml*; do + lang=`echo $locationsxml | sed "s/.*Locations\.\([^\.]*\)\.xml.*/\1/"` + ext=`echo $locationsxml | sed "s/.*Locations\..*\.xml\(.*\)/\1/"` + echo "%lang($lang) %{_datadir}/libgweather/Locations.$lang.xml$ext" >> %{name}.lang +done %def_gconf_schemas %{name} %add_gconf_schemas gweather %end_gconf_schemas @@ -106,6 +120,8 @@ %defattr(-,root,root) %doc AUTHORS README NEWS ChangeLog %{_datadir}/libgweather +# Exclude files that we moved to the -lang package +%exclude %{_datadir}/libgweather/Locations.*.xml* %files -n libgweather1 %defattr(-, root, root) @@ -121,6 +137,22 @@ %files lang -f %{name}.lang %changelog +* Sun Nov 30 2008 vuntz@novell.com +- Add libgweather-bnc428346-bundle.patch to support shipping + Locations.xml files in bundle-lang-gnome-$locale without + conflicting with libgweather-lang: bundle-lang-gnome-$locale will + use another directory. +* Mon Nov 24 2008 vuntz@novell.com +- Add libgweather-bnc428346-compress.patch to compress + Locations.xml files. +- Move Locations.$locales.xml data to the lang package. +- This makes libgweather smaller, and libgweather-lang much bigger + (especially since compressing each Location.xml files results in + a compression loss in the final rpm -- it's more efficient to + compress several xml files together than separately), but this + makes it possible to have those files end in the + bundle-lang-gnome-$locale packages. So in the end, it's a win. + Fix bnc#428346. * Wed Oct 22 2008 vuntz@novell.com - Update to version 2.24.1: + Make sure the returned strings are UTF-8 @@ -249,7 +281,7 @@ * Tue Mar 04 2008 maw@suse.de - Update to version 2.21.92: + Updated translations. -* Wed Jan 23 2008 maw@suse.de +* Tue Jan 22 2008 maw@suse.de - The -devel subpackage provides what used to be included in gnome-applets-devel, so Provide/Obsolete that package - Since gnome-applets-devel provided and obsoleted gswitchit-devel, ++++++ libgweather-bnc428346-bundle.patch ++++++ Index: libgweather-2.24.1/libgweather/parser.c =================================================================== --- libgweather-2.24.1.orig/libgweather/parser.c +++ libgweather-2.24.1/libgweather/parser.c @@ -171,6 +171,17 @@ gweather_parser_new (gboolean use_region /* First try to load a locale-specific XML. It's much faster. */ filename = NULL; for (i = 0; parser->locales[i] != NULL; i++) { + filename = g_strdup_printf ("%s/%s/Locations.%s.xml", + GWEATHER_XML_LOCATION_DIR, + "bundle", + parser->locales[i]); + + if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) + break; + + g_free (filename); + filename = NULL; + filename = g_strdup_printf ("%s/Locations.%s.xml", GWEATHER_XML_LOCATION_DIR, parser->locales[i]); @@ -184,6 +195,17 @@ gweather_parser_new (gboolean use_region if (!zlib_support) continue; + filename = g_strdup_printf ("%s/%s/Locations.%s.xml.gz", + GWEATHER_XML_LOCATION_DIR, + "bundle", + parser->locales[i]); + + if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) + break; + + g_free (filename); + filename = NULL; + filename = g_strdup_printf ("%s/Locations.%s.xml.gz", GWEATHER_XML_LOCATION_DIR, parser->locales[i]); ++++++ libgweather-bnc428346-compress.patch ++++++ Index: configure.in =================================================================== --- configure.in (révision 475) +++ configure.in (copie de travail) @@ -40,6 +40,18 @@ AC_ARG_ENABLE(all-translations-in-one-xm [enable_big_xml=no]) AM_CONDITIONAL(USE_ONE_BIG_XML, test "x$enable_big_xml" = "xyes") +AC_ARG_ENABLE(locations-compression, + [AC_HELP_STRING([--enable-locations-compression], + [Compress Locations.xml files])], + [enable_locations_compression=yes], + [enable_locations_compression=no]) +if test "x$enable_locations_compression" = "xyes"; then + COMPRESS_EXT=.gz +else + COMPRESS_EXT= +fi +AC_SUBST(COMPRESS_EXT) + GNOME_COMPILE_WARNINGS dnl *************************************************************************** @@ -223,4 +235,5 @@ libgweather-$VERSION configure summary: Source code location: ${srcdir} Compiler: ${CC} Locations.xml translations: ${LOCATIONS_XML_TRANSLATIONS} + Locations.xml compression: ${enable_locations_compression} " >&2 Index: data/Makefile.am =================================================================== --- data/Makefile.am (révision 475) +++ data/Makefile.am (copie de travail) @@ -8,10 +8,13 @@ if USE_ONE_BIG_XML LOCATIONS_STAMP = -libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml) +libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml$(COMPRESS_EXT)) -%.xml: %.xml.in $(wildcard $(top_srcdir)/po-locations/*.po) - LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< $@ +%.xml$(COMPRESS_EXT): %.xml.in $(wildcard $(top_srcdir)/po-locations/*.po) + LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"` + if test "x$(COMPRESS_EXT)" = "x.gz"; then \ + gzip --force `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"`; \ + fi else # USE_ONE_BIG_XML @@ -22,24 +25,30 @@ PO_LOCATIONS = $(shell if test -n "$(LIN # Helper variable libgweatherlocations_data = $(libgweatherlocations_in_files:.xml.in=.xml) -libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/po-locations/|Locations.|g;s|\.po|.xml|g") $(libgweatherlocations_data) +libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/po-locations/|Locations.|g;s|\.po|.xml$(COMPRESS_EXT)|g") $(libgweatherlocations_data)$(COMPRESS_EXT) # We need this step so that we merge all the make Locations.xy.xml destinations # into one unique destination. This makes -j2 work. (Else, we end up with # multiple and conflicting calls to intltool-merge) $(libgweatherlocations_DATA): $(LOCATIONS_STAMP) -$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) +$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile LC_ALL=C $(INTLTOOL_MERGE) --multiple-output --xml-style --utf8 --cache=$(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< $(libgweatherlocations_data) for pofile in $(PO_LOCATIONS); do \ locale=`echo $$pofile | sed "s;$(top_srcdir)/po-locations/\(.*\)\.po;\1;"`; \ xmllint --noblanks -o Locations.$$locale.xml $$locale/$(libgweatherlocations_data); \ rm -f $$locale/$(libgweatherlocations_data); \ test -d $$locale && rmdir $$locale; \ + if test "x$(COMPRESS_EXT)" = "x.gz"; then \ + gzip --force Locations.$$locale.xml; \ + fi; \ done xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_data) rm -f C/$(libgweatherlocations_data) test -d C && rmdir C + if test "x$(COMPRESS_EXT)" = "x.gz"; then \ + gzip --force Locations.xml; \ + fi touch $@ endif # USE_ONE_BIG_XML Index: libgweather/parser.c =================================================================== --- libgweather/parser.c (révision 475) +++ libgweather/parser.c (copie de travail) @@ -155,6 +155,7 @@ GWeatherParser * gweather_parser_new (gboolean use_regions) { GWeatherParser *parser; + int zlib_support; int i, keep_going; char *filename; char *tagname, *format; @@ -165,6 +166,8 @@ gweather_parser_new (gboolean use_region parser->use_regions = use_regions; parser->locales = g_get_language_names (); + zlib_support = xmlHasFeature (XML_WITH_ZLIB); + /* First try to load a locale-specific XML. It's much faster. */ filename = NULL; for (i = 0; parser->locales[i] != NULL; i++) { @@ -177,6 +180,19 @@ gweather_parser_new (gboolean use_region g_free (filename); filename = NULL; + + if (!zlib_support) + continue; + + filename = g_strdup_printf ("%s/Locations.%s.xml.gz", + GWEATHER_XML_LOCATION_DIR, + parser->locales[i]); + + if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) + break; + + g_free (filename); + filename = NULL; } /* Fall back on the file containing either all translations, or only @@ -185,6 +201,11 @@ gweather_parser_new (gboolean use_region if (!filename) filename = g_strdup (GWEATHER_XML_LOCATION_DIR "/Locations.xml"); + if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR) && zlib_support) { + g_free (filename); + filename = g_strdup (GWEATHER_XML_LOCATION_DIR "/Locations.xml.gz"); + } + /* Open the xml file containing the different locations */ parser->xml = xmlNewTextReaderFilename (filename); g_free (filename); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de