# FIXME: transition package, should go away when all software does glib2
Package-Name: glib1
Homepage: http://www.gtk.org/
Source: ftp://ftp.gtk.org/pub/gtk/v1.2/glib-(1.\d*[02468].\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	mv glib-"$(VERSION)" glib1-"$(VERSION)"
Compile:
	$(MAKE) -f ../Makefile configure CONFIGURE_OPTS="--disable-static --enable-shared"
	$(MAKE)
	$(MAKE) install
Install:
	$(MAKE) instbin BIN="glib-config"
	$(MAKE) addldso
Clean:
	@set -e ; cd "$(PREFIX)"/lib ; \
	for lib in *.so.[0-9] ; do \
		reallib=`/bin/ls -l "$$lib" | sed 's/.* -> //'` ; \
		for file in $$lib.[0-9]*.[0-9]* ; do \
			if test "$$file" != "$$reallib" ; then \
				rm -fv "$$file" ; \
			fi ; \
		done ; \
	done
Patch: <<EOT
######## begin GCC 3.4 patch
--- gstrfuncs.c.old	2001-02-27 15:00:22 +0900
+++ gstrfuncs.c	2004-08-20 15:02:13 +0900
@@ -867,8 +867,8 @@
                   /* beware of positional parameters
                    */
                 case '$':
-                  g_warning (G_GNUC_PRETTY_FUNCTION
-                             "(): unable to handle positional parameters (%%n$)");
+                  g_warning ("%s(): unable to handle positional parameters (%%n$)",
+                             G_GNUC_PRETTY_FUNCTION);
                   len += 1024; /* try adding some safety padding */
                   break;
 
@@ -1034,8 +1034,8 @@
                   /*          n   .   dddddddddddddddddddddddd   E   +-  eeee */
                   conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
                   if (spec.mod_extra_long)
-                    g_warning (G_GNUC_PRETTY_FUNCTION
-                               "(): unable to handle long double, collecting double only");
+                    g_warning ("%s(): unable to handle long double, collecting double only",
+                               G_GNUC_PRETTY_FUNCTION);
 #ifdef HAVE_LONG_DOUBLE
 #error need to implement special handling for long double
 #endif
@@ -1077,8 +1077,8 @@
                   conv_done = TRUE;
                   if (spec.mod_long)
                     {
-                      g_warning (G_GNUC_PRETTY_FUNCTION
-                                 "(): unable to handle wide char strings");
+                      g_warning ("%s(): unable to handle wide char strings",
+                                 G_GNUC_PRETTY_FUNCTION);
                       len += 1024; /* try adding some safety padding */
                     }
                   break;
@@ -1108,9 +1108,8 @@
                   conv_len += format - spec_start;
                   break;
                 default:
-                  g_warning (G_GNUC_PRETTY_FUNCTION
-                             "(): unable to handle `%c' while parsing format",
-                             c);
+                  g_warning ("%s(): unable to handle `%c' while parsing format",
+                             G_GNUC_PRETTY_FUNCTION, c);
                   break;
                 }
               conv_done |= conv_len > 0;
######## end GCC 3.4 patch
EOT

/pkg/glib1/
/usr/bin/glib-config
