[arch-commits] Commit in libgweather/repos (4 files)

Jan de Groot jgc at archlinux.org
Fri Jul 3 18:12:35 UTC 2009


    Date: Friday, July 3, 2009 @ 14:12:35
  Author: jgc
Revision: 44710

Merged revisions 44575 via svnmerge from 
svn+ssh://svn.archlinux.org/srv/svn-packages/libgweather/trunk

........
  r44575 | jgc | 2009-07-02 21:14:13 +0200 (Thu, 02 Jul 2009) | 3 lines
  
  upgpkg: libgweather 2.26.2.1-1
      Update patch to sync with ubuntu
  Revert commit that makes compiler output more readable, it breaks our gettext patch
........

Added:
  libgweather/repos/extra-i686/revert-shave.patch
    (from rev 44575, libgweather/trunk/revert-shave.patch)
Modified:
  libgweather/repos/extra-i686/	(properties)
  libgweather/repos/extra-i686/01_gettext_not_xml.patch
  libgweather/repos/extra-i686/PKGBUILD

--------------------------+
 01_gettext_not_xml.patch |  107 ++++++++----
 PKGBUILD                 |   18 +-
 revert-shave.patch       |  386 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 470 insertions(+), 41 deletions(-)


Property changes on: libgweather/repos/extra-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /libgweather/trunk:1-42021
   + /libgweather/trunk:1-44707

Modified: extra-i686/01_gettext_not_xml.patch
===================================================================
--- extra-i686/01_gettext_not_xml.patch	2009-07-03 18:12:34 UTC (rev 44709)
+++ extra-i686/01_gettext_not_xml.patch	2009-07-03 18:12:35 UTC (rev 44710)
@@ -1,8 +1,8 @@
 only in patch2:
 unchanged:
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/configure.in libgweather-2.25.5.new/configure.in
---- libgweather-2.25.5/configure.in	2009-01-19 22:29:46.000000000 +0100
-+++ libgweather-2.25.5.new/configure.in	2009-01-22 15:36:29.000000000 +0100
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/configure.in libgweather-2.26.1.new/configure.in
+--- libgweather-2.26.1/configure.in	2009-04-14 00:07:38.000000000 +0200
++++ libgweather-2.26.1.new/configure.in	2009-04-23 18:18:50.000000000 +0200
 @@ -38,6 +38,10 @@
  AM_MAINTAINER_MODE
  GNOME_MAINTAINER_MODE_DEFINES
@@ -57,9 +57,9 @@
 -	Locations.xml translations:	${LOCATIONS_XML_TRANSLATIONS}
 -	Locations.xml compression:	${enable_locations_compression}
  " >&2
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/data/Makefile.am libgweather-2.25.5.new/data/Makefile.am
---- libgweather-2.25.5/data/Makefile.am	2009-01-19 22:22:26.000000000 +0100
-+++ libgweather-2.25.5.new/data/Makefile.am	2009-01-22 15:36:56.000000000 +0100
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/data/Makefile.am libgweather-2.26.1.new/data/Makefile.am
+--- libgweather-2.26.1/data/Makefile.am	2009-04-14 00:00:59.000000000 +0200
++++ libgweather-2.26.1.new/data/Makefile.am	2009-04-23 18:18:50.000000000 +0200
 @@ -4,55 +4,23 @@
  libgweatherlocationsdir = $(pkgdatadir)
  libgweatherlocations_in_files = Locations.xml.in
@@ -121,9 +121,9 @@
  check:
  	xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in
  	$(srcdir)/check-timezones.sh $(srcdir)/Locations.xml.in
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/libgweather/gweather-location.c libgweather-2.25.5.new/libgweather/gweather-location.c
---- libgweather-2.25.5/libgweather/gweather-location.c	2009-01-19 22:22:08.000000000 +0100
-+++ libgweather-2.25.5.new/libgweather/gweather-location.c	2009-01-22 15:36:30.000000000 +0100
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/libgweather/gweather-location.c libgweather-2.26.1.new/libgweather/gweather-location.c
+--- libgweather-2.26.1/libgweather/gweather-location.c	2009-04-14 00:00:47.000000000 +0200
++++ libgweather-2.26.1.new/libgweather/gweather-location.c	2009-04-23 18:19:23.000000000 +0200
 @@ -22,11 +22,14 @@
  #include <config.h>
  #endif
@@ -139,21 +139,32 @@
  
  #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
  #include "gweather-location.h"
-@@ -184,7 +187,10 @@
+@@ -184,10 +187,20 @@
  
  	tagname = (const char *) xmlTextReaderConstName (parser->xml);
  	if (!strcmp (tagname, "name") && !loc->name) {
 -	    value = gweather_parser_get_localized_value (parser);
++	    char *context = NULL;
++	    context = xmlTextReaderGetAttribute(parser->xml,"msgctxt"); 
++	   
 +	    value = gweather_parser_get_value (parser);
-+#ifdef HAVE_DGETTEXT
-+	    value = dgettext(GETTEXT_PACKAGE "-locations",value);
-+#endif
  	    if (!value)
  		goto error_out;
- 	    loc->name = g_strdup (value);
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/libgweather/gweather-timezone.c libgweather-2.25.5.new/libgweather/gweather-timezone.c
---- libgweather-2.25.5/libgweather/gweather-timezone.c	2009-01-19 22:22:08.000000000 +0100
-+++ libgweather-2.25.5.new/libgweather/gweather-timezone.c	2009-01-22 15:36:30.000000000 +0100
+-	    loc->name = g_strdup (value);
++
++	    if (context != NULL) {
++	    	loc->name = g_strdup (g_dpgettext2(GETTEXT_PACKAGE "-locations", context, value));
++	    	xmlFree (context);
++	    }
++	    else
++	    	loc->name = g_strdup (dgettext(GETTEXT_PACKAGE "-locations",value));
++	    
+ 	    xmlFree (value);
+ 	    normalized = g_utf8_normalize (loc->name, -1, G_NORMALIZE_ALL);
+ 	    loc->sort_name = g_utf8_casefold (normalized, -1);
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/libgweather/gweather-timezone.c libgweather-2.26.1.new/libgweather/gweather-timezone.c
+--- libgweather-2.26.1/libgweather/gweather-timezone.c	2009-04-14 00:00:47.000000000 +0200
++++ libgweather-2.26.1.new/libgweather/gweather-timezone.c	2009-04-23 18:19:37.000000000 +0200
 @@ -23,6 +23,7 @@
  #endif
  
@@ -162,29 +173,57 @@
  
  #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
  #include "gweather-timezone.h"
-@@ -179,7 +180,7 @@
+@@ -155,7 +156,7 @@
+ parse_timezone (GWeatherParser *parser)
+ {
+     GWeatherTimezone *zone = NULL;
+-    char *id = NULL, *name = NULL;
++    char *id = NULL, *name = NULL, *context = NULL;
+     int offset, dst_offset;
+     gboolean has_dst = FALSE;
+ 
+@@ -178,27 +179,34 @@
+ 		continue;
  	    }
  
- 	    if (!strcmp ((const char *) xmlTextReaderConstName (parser->xml), "name"))
+-	    if (!strcmp ((const char *) xmlTextReaderConstName (parser->xml), "name"))
 -		name = gweather_parser_get_localized_value (parser);
++	    if (!strcmp ((const char *) xmlTextReaderConstName (parser->xml), "name")) {
++		context = xmlTextReaderGetAttribute(parser->xml,"msgctxt"); 
 +		name = gweather_parser_get_value (parser);
++	    }
  	    else {
  		if (xmlTextReaderNext (parser->xml) != 1)
  		    break;
-@@ -187,6 +188,10 @@
+ 	    }
  	}
      }
- 
-+#ifdef HAVE_DGETTEXT
-+    name = dgettext(GETTEXT_PACKAGE "-locations",name);
-+#endif
-+
+-
++	    
      if (parse_tzdata (id, parser->year_start, parser->year_end,
  		      &offset, &has_dst, &dst_offset)) {
  	zone = g_slice_new0 (GWeatherTimezone);
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/po-locations/LINGUAS libgweather-2.25.5.new/po-locations/LINGUAS
---- libgweather-2.25.5/po-locations/LINGUAS	1970-01-01 01:00:00.000000000 +0100
-+++ libgweather-2.25.5.new/po-locations/LINGUAS	2009-01-22 15:36:30.000000000 +0100
+ 	zone->ref_count = 1;
+ 	zone->id = g_strdup (id);
+-	zone->name = g_strdup (name);
++	if (context != NULL)
++		zone->name = g_strdup (g_dpgettext2(GETTEXT_PACKAGE "-locations", context, name));
++	else
++		zone->name = g_strdup (dgettext(GETTEXT_PACKAGE "-locations",name));
+ 	zone->offset = offset;
+ 	zone->has_dst = has_dst;
+ 	zone->dst_offset = dst_offset;
+     }
+ 
+     xmlFree (id);
++    if (context)
++    	xmlFree (context);
+     if (name)
+ 	xmlFree (name);
+ 
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/po-locations/LINGUAS libgweather-2.26.1.new/po-locations/LINGUAS
+--- libgweather-2.26.1/po-locations/LINGUAS	1970-01-01 01:00:00.000000000 +0100
++++ libgweather-2.26.1.new/po-locations/LINGUAS	2009-04-23 18:18:50.000000000 +0200
 @@ -0,0 +1,78 @@
 +ang
 +ar
@@ -264,9 +303,9 @@
 +zh_CN
 +zh_HK
 +zh_TW
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/po-locations/Makefile.in.in libgweather-2.25.5.new/po-locations/Makefile.in.in
---- libgweather-2.25.5/po-locations/Makefile.in.in	1970-01-01 01:00:00.000000000 +0100
-+++ libgweather-2.25.5.new/po-locations/Makefile.in.in	2009-01-22 15:36:30.000000000 +0100
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/po-locations/Makefile.in.in libgweather-2.26.1.new/po-locations/Makefile.in.in
+--- libgweather-2.26.1/po-locations/Makefile.in.in	1970-01-01 01:00:00.000000000 +0100
++++ libgweather-2.26.1.new/po-locations/Makefile.in.in	2009-04-23 18:18:50.000000000 +0200
 @@ -0,0 +1,217 @@
 +# Makefile for program source directory in GNU NLS utilities package.
 +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
@@ -485,9 +524,9 @@
 +# Tell versions [3.59,3.63) of GNU make not to export all variables.
 +# Otherwise a system limit (for SysV at least) may be exceeded.
 +.NOEXPORT:
-diff -Nur -x '*.orig' -x '*~' libgweather-2.25.5/po-locations/POTFILES.in libgweather-2.25.5.new/po-locations/POTFILES.in
---- libgweather-2.25.5/po-locations/POTFILES.in	1970-01-01 01:00:00.000000000 +0100
-+++ libgweather-2.25.5.new/po-locations/POTFILES.in	2009-01-22 15:36:30.000000000 +0100
+diff -Nur -x '*.orig' -x '*~' libgweather-2.26.1/po-locations/POTFILES.in libgweather-2.26.1.new/po-locations/POTFILES.in
+--- libgweather-2.26.1/po-locations/POTFILES.in	1970-01-01 01:00:00.000000000 +0100
++++ libgweather-2.26.1.new/po-locations/POTFILES.in	2009-04-23 18:18:50.000000000 +0200
 @@ -0,0 +1,4 @@
 +# This list should contain *only* data/Locations.xml.in.
 +# Everything else should be in POTFILES.skip.

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2009-07-03 18:12:34 UTC (rev 44709)
+++ extra-i686/PKGBUILD	2009-07-03 18:12:35 UTC (rev 44710)
@@ -1,24 +1,27 @@
 # $Id$
 # Maintainer: Jan de Groot  <jgc at archlinux.org>
 pkgname=libgweather
-pkgver=2.26.1
-pkgrel=2
+pkgver=2.26.2.1
+pkgrel=1
 pkgdesc="Provides access to weather information from the net"
 arch=(i686 x86_64)
 license=('LGPL')
-depends=('gconf>=2.26.0-3' 'libsoup>=2.26.1')
+depends=('gconf>=2.26.0-3' 'libsoup>=2.26.3')
 makedepends=('pkgconfig' 'intltool' 'gtk-doc')
 options=('!libtool' '!emptydirs')
 conflicts=('gnome-applets<2.22.0')
 url="http://www.gnome.org/"
 install=libgweather.install
 source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.26/${pkgname}-${pkgver}.tar.bz2
-	01_gettext_not_xml.patch)
-md5sums=('382041ee8f4efeec1afde968624d34fe'
-	 '77aea3b4c33ac5fbf3f9191cffde49c3')
+        01_gettext_not_xml.patch
+        revert-shave.patch)
+md5sums=('cef0447b62235c4662aa9691dd9a6c92'
+         '71a3897af7f236345869efd87da3e9b3'
+         'e33966183e56b0f9d6e932ca4422fdb0')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -R -i "${srcdir}/revert-shave.patch" || return 1
   patch -Np1 -i "${srcdir}/01_gettext_not_xml.patch" || return 1
   libtoolize --force || return 1
   gtkdocize || return 1
@@ -26,7 +29,8 @@
   autoconf || return 1
   automake || return 1
   ./configure --prefix=/usr --sysconfdir=/etc \
-              --localstatedir=/var --disable-static || return 1
+      --localstatedir=/var --disable-static \
+      --enable-locations-compression || return 1
   make || return 1
   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
 

Copied: libgweather/repos/extra-i686/revert-shave.patch (from rev 44575, libgweather/trunk/revert-shave.patch)
===================================================================
--- extra-i686/revert-shave.patch	                        (rev 0)
+++ extra-i686/revert-shave.patch	2009-07-03 18:12:35 UTC (rev 44710)
@@ -0,0 +1,386 @@
+From 0e90ef6e931b95dd88be89b7a01dc5ffad6a2e5a Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz at gnome.org>
+Date: Sun, 26 Apr 2009 23:42:57 +0000
+Subject: Use shave to improve build log readability
+
+See http://git.lespiau.name/cgit/shave/tree/README for more details.
+---
+diff --git a/configure.in b/configure.in
+index ccfed66..ce24c7a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -3,6 +3,7 @@ AC_PREREQ(2.59)
+ 
+ AM_CONFIG_HEADER(config.h)
+ AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
++AC_CONFIG_MACRO_DIR([m4])
+ 
+ # Before making a release, the LT_VERSION string should be modified.
+ # The string is of the form C:R:A.
+@@ -235,11 +236,15 @@ AC_SUBST(GLADEDIR)
+ ##################################################
+ GTK_DOC_CHECK([1.9])
+ 
++SHAVE_INIT([.], [enable])
++
+ dnl ***************************************************************************
+ dnl *** Output Makefiles et al                                              ***
+ dnl ***************************************************************************
+ AC_OUTPUT([
+ Makefile
++shave
++shave-libtool
+ doc/Makefile
+ po/Makefile.in
+ po-locations/Makefile
+diff --git a/data/Makefile.am b/data/Makefile.am
+index d3e5de0..a3b0950 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -1,3 +1,5 @@
++QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
++
+ libgweatherdtddir = $(pkgdatadir)
+ libgweatherdtd_DATA = locations.dtd
+ 
+@@ -11,7 +13,7 @@ LOCATIONS_STAMP =
+ libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml$(COMPRESS_EXT))
+ 
+ %.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/"`
++	$(QUIET_GEN)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
+@@ -33,7 +35,7 @@ libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/
+ $(libgweatherlocations_DATA): $(LOCATIONS_STAMP)
+ 
+ $(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)
++	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); \
+@@ -42,13 +44,13 @@ $(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile
+ 		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
++	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
++	fi &&								\
+ 	touch $@
+ 
+ endif # USE_ONE_BIG_XML
+@@ -59,10 +61,10 @@ check:
+ 
+ ### Locations.xml.in rebuild
+ rebuild-locations: locationdb.sqlite update-locations.py
+-	($(srcdir)/update-locations.py > Locations.xml.in.new && mv Locations.xml.in.new Locations.xml.in) || rm -f Locations.xml.in.new
++	$(QUIET_GEN)($(srcdir)/update-locations.py > Locations.xml.in.new && mv Locations.xml.in.new Locations.xml.in) || rm -f Locations.xml.in.new
+ 
+ locationdb.sqlite: build-locationdb.pl major-cities.txt sources/nsd_cccc.txt sources/POP_PLACES.txt sources/US_CONCISE.txt sources/geonames_dd_dms_date_*.txt city-fixups.pl station-fixups.pl
+-	$(srcdir)/build-locationdb.pl
++	$(QUIET_GEN)$(srcdir)/build-locationdb.pl
+ 
+ EXTRA_DIST =	\
+ 	$(libgweatherlocations_in_files)	\
+diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
+index d92943a..b99e1bb 100644
+--- a/libgweather/Makefile.am
++++ b/libgweather/Makefile.am
+@@ -1,3 +1,5 @@
++QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
++
+ lib_LTLIBRARIES = libgweather.la
+ 
+ libgweatherincdir = $(includedir)/libgweather
+@@ -61,13 +63,13 @@ libgweather_la_LDFLAGS = \
+ MKENUMS_GENERATED = gweather-enum-types.c gweather-enum-types.h
+ 
+ gweather-enum-types.h: $(gweather_new_headers)
+-	( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.h.tmpl \
++	$(QUIET_GEN)( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.h.tmpl \
+ 		$(gweather_new_headers) ) > gweather-enum-types.h.tmp \
+ 	&& mv gweather-enum-types.h.tmp gweather-enum-types.h \
+ 	|| rm -f gweather-enum-type.h.tmp
+ 
+ gweather-enum-types.c: $(libgweatherinclude_HEADERS)
+-	( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.c.tmpl \
++	$(QUIET_GEN)( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.c.tmpl \
+ 		$(gweather_new_headers) ) > gweather-enum-types.c.tmp \
+ 	&& mv gweather-enum-types.c.tmp gweather-enum-types.c \
+ 	|| rm -f gweather-enum-type.c.tmp
+diff --git a/m4/shave.m4 b/m4/shave.m4
+new file mode 100644
+index 0000000..0a3509e
+--- a/dev/null
++++ b/m4/shave.m4
+@@ -0,0 +1,77 @@
++dnl Make automake/libtool output more friendly to humans
++dnl  Damien Lespiau <damien.lespiau at gmail.com>
++dnl
++dnl SHAVE_INIT([shavedir],[default_mode])
++dnl
++dnl shavedir: the directory where the shave scripts are, it defaults to
++dnl           $(top_builddir)
++dnl default_mode: (enable|disable) default shave mode.  This parameter
++dnl               controls shave's behaviour when no option has been
++dnl               given to configure.  It defaults to disable.
++dnl
++dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
++dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
++dnl   LIBTOOL, you don't want the configure tests to have these variables
++dnl   re-defined.
++dnl * This macro requires GNU make's -s option.
++
++AC_DEFUN([_SHAVE_ARG_ENABLE],
++[
++  AC_ARG_ENABLE([shave],
++    AS_HELP_STRING(
++      [--enable-shave],
++      [use shave to make the build pretty [[default=$1]]]),,
++      [enable_shave=$1]
++    )
++])
++
++AC_DEFUN([SHAVE_INIT],
++[
++  dnl you can tweak the default value of enable_shave
++  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
++
++  if test x"$enable_shave" = xyes; then
++    dnl where can we find the shave scripts?
++    m4_if([$1],,
++      [shavedir="$ac_pwd"],
++      [shavedir="$ac_pwd/$1"])
++    AC_SUBST(shavedir)
++
++    dnl make is now quiet
++    AC_SUBST([MAKEFLAGS], [-s])
++    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
++
++    dnl we need sed
++    AC_CHECK_PROG(SED,sed,sed,false)
++
++    dnl substitute libtool
++    SHAVE_SAVED_LIBTOOL=$LIBTOOL
++    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
++    AC_SUBST(LIBTOOL)
++
++    dnl substitute cc/cxx
++    SHAVE_SAVED_CC=$CC
++    SHAVE_SAVED_CXX=$CXX
++    SHAVE_SAVED_FC=$FC
++    SHAVE_SAVED_F77=$F77
++    SHAVE_SAVED_OBJC=$OBJC
++    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
++    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
++    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
++    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
++    OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
++    AC_SUBST(CC)
++    AC_SUBST(CXX)
++    AC_SUBST(FC)
++    AC_SUBST(F77)
++    AC_SUBST(OBJC)
++
++    V=@
++  else
++    V=1
++  fi
++  Q='$(V:1=)'
++  AC_SUBST(V)
++  AC_SUBST(Q)
++])
++
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 40681ad..51b49a8 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -1,4 +1,6 @@
+ if BUILD_PYTHON
++QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
++
+ INCLUDES =			\
+ 	$(PYTHON_INCLUDES)	\
+ 	$(PYGOBJECT_CFLAGS)	\
+@@ -14,7 +16,7 @@ gweather.c: gweather.defs gweather.override
+ CLEANFILES = gweather.c
+ 
+ .defs.c:
+-	(cd $(srcdir)\
++	$(QUIET_GEN)(cd $(srcdir)\
+ 	 && pygtk-codegen-2.0 \
+ 		--register $(PYGTK_DEFS) \
+ 		--override $*.override \
+diff --git a/shave-libtool.in b/shave-libtool.in
+new file mode 100644
+index 0000000..1f3a720
+--- a/dev/null
++++ b/shave-libtool.in
+@@ -0,0 +1,69 @@
++#!/bin/sh
++
++# we need sed
++SED=@SED@
++if test -z "$SED" ; then
++SED=sed
++fi
++
++lt_unmangle ()
++{
++   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
++}
++
++# the real libtool to use
++LIBTOOL="$1"
++shift
++
++# if 1, don't print anything, the underlaying wrapper will do it
++pass_though=0
++
++# scan the arguments, keep the right ones for libtool, and discover the mode
++preserved_args=
++while test "$#" -gt 0; do
++    opt="$1"
++    shift
++
++    case $opt in
++    --mode=*)
++        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
++        preserved_args="$preserved_args $opt"
++        ;;
++    -o)
++        lt_output="$1"
++        preserved_args="$preserved_args $opt"
++	;;
++    *)
++        preserved_args="$preserved_args $opt"
++        ;;
++      esac
++done
++
++case "$mode" in
++compile)
++    # shave will be called and print the actual CC/CXX/LINK line
++    preserved_args="$preserved_args --shave-mode=$mode"
++    pass_though=1
++    ;;
++link)
++    preserved_args="$preserved_args --shave-mode=$mode"
++    Q="  LINK  "
++    ;;
++*)
++    # let's u
++    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
++    ;;
++esac
++
++lt_unmangle "$lt_output"
++output=$last_result
++
++if test -z $V; then
++    if test $pass_though -eq 0; then
++        echo "$Q$output"
++    fi
++    $LIBTOOL --silent $preserved_args
++else
++    echo $LIBTOOL $preserved_args
++    $LIBTOOL $preserved_args
++fi
+diff --git a/shave.in b/shave.in
+new file mode 100644
+index 0000000..5c16f27
+--- a/dev/null
++++ b/shave.in
+@@ -0,0 +1,79 @@
++#!/bin/sh
++
++# we need sed
++SED=@SED@
++if test -z "$SED" ; then
++SED=sed
++fi
++
++lt_unmangle ()
++{
++   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
++}
++
++# the tool to wrap (cc, cxx, ar, ranlib, ..)
++tool="$1"
++shift
++
++# the reel tool (to call)
++REEL_TOOL="$1"
++shift
++
++pass_through=0
++preserved_args=
++while test "$#" -gt 0; do
++    opt="$1"
++    shift
++
++    case $opt in
++    --shave-mode=*)
++        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
++	;;
++    -o)
++        lt_output="$1"
++        preserved_args="$preserved_args $opt"
++	;;
++    *)
++        preserved_args="$preserved_args $opt"
++        ;;
++      esac
++done
++
++# mode=link is handled in the libtool wrapper
++case "$mode,$tool" in
++link,*)
++    pass_through=1
++    ;;
++*,cxx)
++    Q="  CXX   "
++    ;;
++*,cc)
++    Q="  CC    "
++    ;;
++*,fc)
++    Q="  FC    "
++    ;;
++*,f77)
++    Q="  F77   "
++    ;;
++*,objc)
++    Q="  OBJC   "
++    ;;
++*,*)
++    # should not happen
++    Q="  CC    "
++    ;;
++esac
++
++lt_unmangle "$lt_output"
++output=$last_result
++
++if test -z $V; then
++    if test $pass_through -eq 0; then
++        echo "$Q$output"
++    fi
++    $REEL_TOOL $preserved_args
++else
++    echo $REEL_TOOL $preserved_args
++    $REEL_TOOL $preserved_args
++fi
+--
+cgit v0.8.2




More information about the arch-commits mailing list