Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2003 17:13:03 +0100 (CET)
From:      "Simon 'portlint' Schubert" <corecode@corecode.ath.cx>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        brett@peloton.radford.edu, dom@happygiraffe.net, gnome@freebsd.org, kiri@pis.toba-cmt.ac.jp, mb@imp.ch, mbr@freebsd.org, nakai@freebsd.org, sobomax@freebsd.org
Subject:   unPERLify ports/editors
Message-ID:  <200302131613.h1DGD3MQ053888@terrorfish.uni.stoert.net>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Simon 'portlint' Schubert
>Organization:	
>Confidential:	no 
>Synopsis:	unPERLify ports/editors
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		update
>Release:	FreeBSD 5.0-CURRENT i386
>Environment:
System: FreeBSD terrorfish.uni.stoert.net 5.0-CURRENT FreeBSD 5.0-CURRENT #46: Thu Jan 30 15:51:45 CET 2003 corecode@terrorfish.uni.stoert.net:/usr/obj/athlon/usr/src/sys/TERRORFISH i386


	
>Description:
	unPERLify
	
>How-To-Repeat:
	
>Fix:

Index: dedit/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/dedit/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- dedit/Makefile	19 Mar 2002 12:52:53 -0000	1.18
+++ dedit/Makefile	13 Feb 2003 15:33:50 -0000
@@ -19,6 +19,7 @@
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 USE_X_PREFIX=	yes
+USE_REINPLACE=	yes
 USE_GNOME=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
@@ -28,8 +29,8 @@
 MANLANG=	"" ja
 
 pre-patch:
-	@find ${WRKSRC} -name "Makefile.in" | xargs ${PERL} -pi -e \
-		's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
+	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
+		's|\(\$$(datadir)/\)gnome/|\1|g ; \
 		 s|dedit.ja.1||'
 
 post-install:
Index: ghex/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/ghex/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- ghex/Makefile	20 Sep 2002 17:06:46 -0000	1.15
+++ ghex/Makefile	13 Feb 2003 15:34:17 -0000
@@ -14,6 +14,7 @@
 MAINTAINER=	gnome@FreeBSD.org
 
 USE_X_PREFIX=	yes
+USE_REINPLACE=	yes
 USE_GMAKE=	yes
 USE_GNOMENG=	yes
 USE_GNOME=	gnomeprefix gnomehack gnomelibs gnomeprint
@@ -22,7 +23,7 @@
 		LIBS="-L${LOCALBASE}/lib"
 
 post-patch:
-	@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
-		 s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
+		 s|\(DATADIRNAME=\)lib|\1share|g' ${WRKSRC}/configure
 
 .include <bsd.port.mk>
Index: gnotepad+/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/gnotepad+/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- gnotepad+/Makefile	21 Sep 2002 18:17:33 -0000	1.16
+++ gnotepad+/Makefile	13 Feb 2003 15:35:43 -0000
@@ -20,6 +20,7 @@
 DOCVERSION=	1.2.0
 
 USE_X_PREFIX=	yes
+USE_REINPLACE=	yes
 USE_XPM=	yes
 USE_GNOMENG=	yes
 WANT_GNOME=	yes
@@ -33,7 +34,7 @@
 .include <bsd.port.pre.mk>
 
 post-patch:
-	@${PERL} -pi.fbsd -e 's|use_gtkhtml=yes|use_gtkhtml=no|g' ${WRKSRC}/configure.in
+	@${REINPLACE_CMD} -e 's|\(use_gtkhtml=\)yes|\1no|g' ${WRKSRC}/configure.in
 
 .if !defined(NOPORTDOCS)
 post-extract:
Index: gxedit/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/gxedit/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- gxedit/Makefile	30 Aug 2002 13:36:06 -0000	1.28
+++ gxedit/Makefile	13 Feb 2003 15:36:05 -0000
@@ -15,13 +15,14 @@
 MAINTAINER=	dom@happygiraffe.net
 
 USE_X_PREFIX=	yes
+USE_REINPLACE=	yes
 USE_GNOMENG=	yes
 USE_GNOME=	gtk12
 
 ALL_TARGET=	gxedit
 
 post-patch:
-	@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/config.h
+	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/config.h
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/gtk-shell ${PREFIX}/bin
Index: jext/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/jext/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- jext/Makefile	6 Mar 2002 13:11:32 -0000	1.14
+++ jext/Makefile	13 Feb 2003 15:36:38 -0000
@@ -19,6 +19,7 @@
 
 WRKSRC=		${WRKDIR}
 USE_XLIB=	yes
+USE_REINPLACE=	yes
 NO_BUILD=	yes
 
 JAVAVM?=	${LOCALBASE}/bin/javavm
@@ -26,7 +27,7 @@
 INSTSBDR=	${PREFIX}/share/java/jext
 
 do-configure:
-	@${PERL} -pi -e 's|%%JAVAVM%%|${JAVAVM}|g ; \
+	@${REINPLACE_CMD} -e 's|%%JAVAVM%%|${JAVAVM}|g ; \
 			 s|%%JEXT_HOME%%|${INSTSBDR}|g'	${WRKSRC}/bin/jext
 
 do-install:
Index: manedit/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/manedit/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- manedit/Makefile	30 Aug 2002 13:36:06 -0000	1.10
+++ manedit/Makefile	13 Feb 2003 15:37:20 -0000
@@ -15,6 +15,7 @@
 WRKSRC=		${WRKDIR}/${DISTNAME}/${PORTNAME}
 
 USE_BZIP2=	yes
+USE_REINPLACE=	yes
 USE_X_PREFIX=	yes
 USE_GNOMENG=	yes
 USE_GNOME=	gtk12
@@ -23,7 +24,7 @@
 MAN1=		manedit.1
 
 pre-patch:
-	@find ${WRKSRC} -name "*.[ch]" | \
-		xargs ${PERL} -pi -e 's|malloc\.h|stdlib.h|g'
+	@${FIND} ${WRKSRC} -name "*.[ch]" | \
+		${XARGS} ${REINPLACE_CMD} -e 's|malloc\.h|stdlib.h|g'
 
 .include <bsd.port.mk>
Index: muggy/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/muggy/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- muggy/Makefile	29 Mar 2001 22:19:08 -0000	1.5
+++ muggy/Makefile	13 Feb 2003 15:45:01 -0000
@@ -21,7 +21,8 @@
 NO_WRKSUBDIR=	yes
 NO_BUILD=	yes
 USE_X_PREFIX=	yes
-SCRIPTS_ENV=	LANG=C LN=${LN} PERL=${PERL} LANGUAGE=${LANGUAGE} VERSION=${TKSTEPVERSION}
+USE_REINPLACE=	yes
+SCRIPTS_ENV=	LANG=C LN=${LN} REINPLACE_CMD=${REINPLACE_CMD} LANGUAGE=${LANGUAGE} VERSION=${TKSTEPVERSION}
 PLIST_SUB=	PIXMAP_PATH=${PIXMAPPATH:S@^${PREFIX}/@@}
 
 # This port is for both editors/muggy and japanese/muggy.
Index: muggy/scripts/post-install
===================================================================
RCS file: /home/ncvs/ports/editors/muggy/scripts/post-install,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 post-install
--- muggy/scripts/post-install	6 May 1999 13:39:52 -0000	1.1.1.1
+++ muggy/scripts/post-install	13 Feb 2003 15:44:18 -0000
@@ -5,9 +5,9 @@
 case ${LANGUAGE} in
     Japanese)
 	for f in Muggy.app; do
-	    ${PERL} -pi -e '
-		s/^(exec[ \t]+)wishstep[^ \t]*([ \t]+.*)$/$1wishstep$ENV{VERSION}jp$2/
-		' ${installdir}/bin/${f}
+	    ${REINPLACE_CMD} -e -E \
+		"s/^(exec[[:space:]]+)wishstep[^[:space:]]*([[:space:]]+.*)\$/\1wishstep${VERSION}jp\2/" \
+		${installdir}/bin/${f}
 	done
     ;;
     *)
@@ -22,9 +22,9 @@
 	    target=${installdir}/defaults/${f}
 	;;
     esac
-    ${PERL} -pi -e '
-        s@^([ \t]*set[ \t]+Jlib[ \t]+)"[^"]*"$@$1"$ENV{installdir}/"@;
-        ' ${target}
+    ${REINPLACE_CMD} -e -E \
+        "s@^([[:space:]]*set[[:space:]]+Jlib[[:space:]]+)\"[^\"]*\"\$@\1\"${installdir}/\"@;" \
+        ${target}
 done
 
 ${LN} -sf ${installdir}/bin/Muggy.app ${PREFIX}/bin
Index: scite/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/scite/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- scite/Makefile	6 Feb 2003 09:04:20 -0000	1.13
+++ scite/Makefile	13 Feb 2003 15:47:28 -0000
@@ -21,6 +21,7 @@
 WRKSRC=		${WRKDIR}/${PORTNAME}/gtk
 
 USE_X_PREFIX=	yes
+USE_REINPLACE=	yes
 USE_GMAKE=	yes
 USE_GNOMENG=	yes
 USE_GNOME=	gnomehier gtk12
@@ -28,6 +29,6 @@
 MAKE_ENV=	MKDIR="${MKDIR}"
 
 post-extract:
-	@${PERL} -pi -e  's|\x0d||' ${WRKSRC}/makefile
+	@${REINPLACE_CMD} -e 's|'"`printf '\r'`"'||' ${WRKSRC}/makefile
 
 .include <bsd.port.mk>
Index: staroffice5/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/staroffice5/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- staroffice5/Makefile	29 May 2002 19:07:09 -0000	1.16
+++ staroffice5/Makefile	13 Feb 2003 15:52:05 -0000
@@ -22,6 +22,7 @@
 NO_CDROM=	'Must be downloaded direct from Sun via www interface'
 
 USE_LINUX=	yes
+USE_REINPLACE=	yes
 IS_INTERACTIVE=	yes
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 EXTRACT_CMD=	${CAT}
@@ -56,7 +57,7 @@
 	@${GZIP_CMD} -d ${WRKDIR}/applicat.rdb.gz
 
 post-configure:
-	@${PERL} -pi.orig -e 's|DefaultDestPath = "Office51";|DefaultDestPath = "${PREFIX}/Office51";|' ${WRKSRC}/office51/setup.ins
+	@${REINPLACE_CMD} -e 's|\(DefaultDestPath = \)"Office51";|\1"${PREFIX}/Office51";|' ${WRKSRC}/office51/setup.ins
 
 do-install:
 	@${CP} /compat/linux/etc/ld.so.conf ${TMPDIR}/ld.so.conf.tmp
@@ -75,7 +76,7 @@
 	@${CHMOD} 100755 ${PREFIX}/Office51/lib/libsdb517li.so
 	@${PATCH} -s ${PREFIX}/Office51/bin/setup ${FILESDIR}/setup.patch
 	@${PATCH} -s ${PREFIX}/Office51/bin/soffice ${FILESDIR}/soffice.patch
-	@${PERL} -pi -e 's|DefaultDestPath = "${PREFIX}/Office51";|DefaultDestPath = "~/Office51";|' ${PREFIX}/Office51/instdb.ins
+	@${REINPLACE_CMD} -e 's|\(DefaultDestPath = \)"${PREFIX}/Office51";|\1"~/Office51";|' ${PREFIX}/Office51/instdb.ins
 
 install-user:
 	${PREFIX}/Office51/bin/setup
Index: staroffice52/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/staroffice52/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- staroffice52/Makefile	6 Aug 2002 00:08:49 -0000	1.39
+++ staroffice52/Makefile	13 Feb 2003 15:53:59 -0000
@@ -38,6 +38,7 @@
 CD_MOUNTPT=	'/cdrom'
 IS_INTERACTIVE=	yes
 NO_BUILD=	yes
+USE_REINPLACE=	yes
 DIST_SUBDIR=	staroffice52
 WRKSRC=		${WRKDIR}/office52
 TMPDIR=		${WRKDIR}/tmp
@@ -148,7 +149,7 @@
 .endif
 
 post-configure:
-	@${PERL} -pi.orig -e 's|DefaultDestPath = "office52";|DefaultDestPath = "${PREFIX}/office52";|' ${WRKSRC}/setup.ins
+	@${REINPLACE_CMD} -e 's|\(DefaultDestPath = \)"office52";|\1"${PREFIX}/office52";|' ${WRKSRC}/setup.ins
 
 do-install:
 .if !defined(DISPLAY) || ${DISPLAY} == ""
	



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302131613.h1DGD3MQ053888>