# FIXME: transition package, should go away when all software does gtk+2
Package-Name: gtk1
Requires: XFree86|Xorg glib1
Suggests: libpng jpeg tiff
Rebuild-For: automake
Homepage: http://www.gtk.org/
Source: ftp://ftp.gtk.org/pub/gtk/v1.2/gtk\+-(1.\d*[02468].\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	mv gtk+-"$(VERSION)" gtk1-"$(VERSION)"
Compile:
	if packager c libpng ; then NOPNG= ; else NOPNG=--without-libpng ; fi ; \
	if packager c jpeg ; then NOJPEG= ; else NOJPEG=--without-libjpeg ; fi ; \
	if packager c tiff ; then NOTIFF= ; else NOTIFF=--without-libtiff ; fi ; \
	$(MAKE) -f ../Makefile configure CONFIGURE_OPTS="--disable-static --enable-shared --with-gdktarget=x11 $$NOPNG $$NOJPEG $$NOTIFF"
	$(MAKE)
	$(MAKE) install
Install:
	$(MAKE) instbin BIN=gtk-config
	$(MAKE) addldso
	$(MAKE) instlocale FILE=gtk+
	$(MAKE) instaclocal M4=gtk
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 prototype warning patch
--- gtk/gtkitemfactory.h.old	1999-03-17 07:37:25 +0900
+++ gtk/gtkitemfactory.h	2005-10-16 12:09:14 +0900
@@ -45,7 +45,7 @@
 					    gchar		*str);
 typedef gchar * (*GtkTranslateFunc)	   (const gchar		*path,
 					    gpointer             func_data);
-typedef	void	(*GtkItemFactoryCallback)  ();
+typedef	void	(*GtkItemFactoryCallback)  (void);
 typedef	void	(*GtkItemFactoryCallback1) (gpointer		 callback_data,
 					    guint		 callback_action,
 					    GtkWidget		*widget);
--- gtk/gtktypeutils.h.old	2000-08-19 06:36:34 +0900
+++ gtk/gtktypeutils.h	2005-10-16 12:08:59 +0900
@@ -160,7 +160,7 @@
 typedef void (*GtkClassInitFunc)   (gpointer   klass);
 typedef void (*GtkObjectInitFunc)  (gpointer   object,
 				    gpointer   klass);
-typedef void (*GtkSignalFunc)      ();
+typedef void (*GtkSignalFunc)      (void);
 typedef gint (*GtkFunction)	   (gpointer   data);
 typedef void (*GtkDestroyNotify)   (gpointer   data);
 typedef void (*GtkCallbackMarshal) (GtkObject *object,
######## end prototype warning patch
######## begin aclocal underquoted defun patch
--- gtk.m4.old	1999-02-19 01:43:35 +0900
+++ gtk.m4	2005-01-01 01:34:41 +0900
@@ -4,7 +4,7 @@
 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
 dnl
-AC_DEFUN(AM_PATH_GTK,
+AC_DEFUN([AM_PATH_GTK],
 [dnl 
 dnl Get the cflags and libraries from the gtk-config script
 dnl
######## end aclocal underquoted defun patch
--- gdk/gdkim.c.old	2001-04-02 11:22:18 +0900
+++ gdk/gdkim.c	2003-04-08 07:18:31 +0900
@@ -570,7 +570,7 @@
     XFree (status_attr);
 
   if (private->xic == NULL)
-    g_warning ("can not create input context with specified input style.");
+    g_warning ("can not create input context with specified input style (%08X).", attr->style);
   else
     gdk_ic_real_set_attr (ic, private->attr, private->mask & ~mask);
 }
EOT

/pkg/gtk1/
/usr/bin/gtk-config
/usr/share/aclocal/gtk.m4
/usr/share/locale/*/LC_MESSAGES/gtk+.mo
