From 38ae599271006aa4aa581f0b03a8a5014fcf143d Mon Sep 17 00:00:00 2001
From: Ade Lovett <ade@FreeBSD.org>
Date: Fri, 4 Aug 2000 01:19:21 +0000
Subject: Extensive patchfile cleanups using sobomax's wonderful post-extract
 rule

---
 x11/gnomelibs/Makefile       |  7 +++++++
 x11/gnomelibs/files/patch-aa | 38 ++++++++++++++------------------------
 x11/gnomelibs/files/patch-ac | 12 ++++++------
 x11/gnomelibs/files/patch-ag |  2 +-
 4 files changed, 28 insertions(+), 31 deletions(-)

(limited to 'x11/gnomelibs')

diff --git a/x11/gnomelibs/Makefile b/x11/gnomelibs/Makefile
index 5eca7664198c..90b311d64e31 100644
--- a/x11/gnomelibs/Makefile
+++ b/x11/gnomelibs/Makefile
@@ -39,4 +39,11 @@ CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 MAN1=		gnome.1 gnome-config.1
 MAN5=		gnome-mime.5
 
+post-extract:
+	@${PERL} -pi -e 's|-lpthread|-pthread|g ; \
+		 s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
+	@find ${WRKSRC} -name "Makefile.in" | xargs ${PERL} -pi -e \
+		's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
+		 s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'
+
 .include <bsd.port.mk>
diff --git a/x11/gnomelibs/files/patch-aa b/x11/gnomelibs/files/patch-aa
index 4b1108a7aa4a..604dc409f06d 100644
--- a/x11/gnomelibs/files/patch-aa
+++ b/x11/gnomelibs/files/patch-aa
@@ -1,33 +1,15 @@
---- configure.orig	Tue Apr 27 14:24:19 1999
-+++ configure	Mon Jun  7 20:27:21 1999
-@@ -2521,7 +2521,7 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  PTHREAD_LIB="-lc_r"
-+  PTHREAD_LIB=""
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
-@@ -5215,7 +5215,7 @@
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   CATOBJEXT=.mo
--		   DATADIRNAME=lib
-+		   DATADIRNAME=share
- fi
- rm -f conftest*
- 		INSTOBJEXT=.mo
-@@ -7372,7 +7372,7 @@
+--- configure.orig	Tue Aug  1 21:58:10 2000
++++ configure	Tue Aug  1 21:59:03 2000
+@@ -7214,7 +7214,7 @@
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
 -LIBS="-ltiff -lm $LIBS"
 +LIBS="-ltiff -ljpeg -lz -lm $LIBS"
  cat > conftest.$ac_ext <<EOF
- #line 7378 "configure"
+ #line 7220 "configure"
  #include "confdefs.h"
-@@ -10853,13 +10853,13 @@
+@@ -10208,13 +10208,13 @@
  SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
  
  ART_LIBS="-lart_lgpl"
@@ -43,7 +25,15 @@
  GNOME_IDLDIR='-I${datadir}/idl'
  
  
-@@ -11724,10 +11724,6 @@
+@@ -10609,6 +10609,7 @@
+ s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+ s%@MAINT@%$MAINT%g
+ s%@cflags_set@%$cflags_set%g
++s%@GLIB_CONFIG@%$GLIB_CONFIG%g
+ s%@GTK_CONFIG@%$GTK_CONFIG%g
+ s%@GTK_CFLAGS@%$GTK_CFLAGS%g
+ s%@GTK_LIBS@%$GTK_LIBS%g
+@@ -11079,10 +11080,6 @@
        *) # Relative path.
          ac_sub_cache_file="$ac_dots$cache_file" ;;
        esac
diff --git a/x11/gnomelibs/files/patch-ac b/x11/gnomelibs/files/patch-ac
index 6b3a11c2a084..f73a45521ae8 100644
--- a/x11/gnomelibs/files/patch-ac
+++ b/x11/gnomelibs/files/patch-ac
@@ -14,13 +14,13 @@
  Known values for LIBRARY are:
  
 -    glib	(calls glib-config)
-+    glib	(calls glib12-config)
++    glib	(calls @GLIB_CONFIG@)
      idl         (to be used with orbit-idl)
      gnome
      gnomeui
      gnorba
 -    gtk		(calls gtk-config)
-+    gtk		(calls gtk12-config)
++    gtk		(calls @GTK_CONFIG@)
      gtkxmhtml	(only --libs)
      zvt		(only --libs)
  
@@ -41,14 +41,14 @@
      glib)
 -	the_libs="$the_libs `glib-config --libs`"
 -	the_flags="$the_flags `glib-config --cflags`"
-+	the_libs="$the_libs `glib12-config --libs`"
-+	the_flags="$the_flags `glib12-config --cflags`"
++	the_libs="$the_libs `@GLIB_CONFIG@ --libs`"
++	the_flags="$the_flags `@GLIB_CONFIG@ --cflags`"
  	;;
      gtk)
 -	the_libs="$the_libs `gtk-config --libs`"
 -	the_flags="$the_flags `gtk-config --cflags`"
-+	the_libs="$the_libs `gtk12-config --libs`"
-+	the_flags="$the_flags `gtk12-config --cflags`"
++	the_libs="$the_libs `@GTK_CONFIG@ --libs`"
++	the_flags="$the_flags `@GTK_CONFIG@ --cflags`"
  	;;
      gnome)
         	the_libs="$the_libs @GNOME_LIBDIR@ @GNOME_LIBS@"
diff --git a/x11/gnomelibs/files/patch-ag b/x11/gnomelibs/files/patch-ag
index 8778bc26ffc9..6b5481c4e7b9 100644
--- a/x11/gnomelibs/files/patch-ag
+++ b/x11/gnomelibs/files/patch-ag
@@ -6,7 +6,7 @@
  	static char *shells [] = {
 -		"/bin/bash", "/bin/zsh", "/bin/tcsh", "/bin/ksh",
 -		"/bin/csh", "/bin/sh", 0
-+		"/bin/csh", "/bin/sh", "/usr/local/bin/tcsh",
++		"/bin/csh", "/bin/sh", "/bin/tcsh", "/usr/local/bin/tcsh",
 +		"/usr/local/bin/bash", "/usr/local/bin/ksh",
 +		"/usr/local/bin/zsh", "/usr/local/sbin/scsh", 0
  	};
-- 
cgit v1.2.3