ports/63218: [patch] Remove useless use of cat 1/5

Ulrich Spoerlein q at uni.de
Sun Feb 22 14:10:28 UTC 2004


>Number:         63218
>Category:       ports
>Synopsis:       [patch] Remove useless use of cat 1/5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 22 06:10:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 5.2.1-RC2 i386
>Organization:
>Environment:
>Description:
These patches are against non-maintained ports and remove the cat in
cat pkg-message | sed s/prefix/${PREFIX}/
constructs.
>How-To-Repeat:
>Fix:
--- cat_sed1.patch begins here ---
Index: audio/tclmidi/Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/tclmidi/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- audio/tclmidi/Makefile	5 Feb 2004 09:14:45 -0000	1.13
+++ audio/tclmidi/Makefile	22 Feb 2004 13:42:42 -0000
@@ -40,6 +40,6 @@
 .endif
 
 post-install:
-	@${CAT} ${PKGMESSAGE} | ${SED} s#/usr/local#${PREFIX}#g
+	@${SED} s#/usr/local#${PREFIX}#g ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: cad/astk-serveur/Makefile
===================================================================
RCS file: /home/ncvs/ports/cad/astk-serveur/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- cad/astk-serveur/Makefile	4 Feb 2004 05:18:51 -0000	1.9
+++ cad/astk-serveur/Makefile	22 Feb 2004 13:42:42 -0000
@@ -208,9 +208,9 @@
 
 post-install:
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} | ${SED} -e "s#%%inst_dir%%#${inst_dir}#"		\
-			-e "s#%%tools_dir%%#${tools_dir}#"			\
-			-e "s#%%ASTER_VER%%#${vaster}#"
+	@${SED} -e "s#%%inst_dir%%#${inst_dir}#"		\
+		-e "s#%%tools_dir%%#${tools_dir}#"		\
+		-e "s#%%ASTER_VER%%#${vaster}#" ${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .include <bsd.port.post.mk>
Index: deskutils/babytrans/Makefile
===================================================================
RCS file: /home/ncvs/ports/deskutils/babytrans/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- deskutils/babytrans/Makefile	4 Feb 2004 04:35:49 -0000	1.7
+++ deskutils/babytrans/Makefile	22 Feb 2004 13:42:42 -0000
@@ -33,6 +33,6 @@
 post-install:
 	@${MKDIR} ${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/config-file/dictionary ${DATADIR}
-	@${CAT} ${PKGMESSAGE} | ${SED} "s|%%DATADIR%%|${DATADIR}|"
+	@${SED} "s|%%DATADIR%%|${DATADIR}|" ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: devel/pear-apd/Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/pear-apd/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- devel/pear-apd/Makefile	9 Feb 2004 11:43:38 -0000	1.4
+++ devel/pear-apd/Makefile	22 Feb 2004 13:42:42 -0000
@@ -53,11 +53,10 @@
 	@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
 .endif
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} | \
-		${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:"	\
-			-e "s:/usr/local:${LOCALBASE}:"			\
-			-e "s:lib/php/20020429:${EXT_DIR}:"		\
-			-e "s:/var/tmp/apd:${DUMP_DIR}:"
+	@${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:"	\
+		-e "s:/usr/local:${LOCALBASE}:"			\
+		-e "s:lib/php/20020429:${EXT_DIR}:"		\
+		-e "s:/var/tmp/apd:${DUMP_DIR}:" ${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .include <bsd.port.post.mk>
Index: french/aster/Makefile
===================================================================
RCS file: /home/ncvs/ports/french/aster/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- french/aster/Makefile	4 Feb 2004 05:20:11 -0000	1.15
+++ french/aster/Makefile	22 Feb 2004 13:42:42 -0000
@@ -249,7 +249,7 @@
 	${LN} -fs ${X11BASE}/bin/xmgrace ${tools_dir}/
 .endif
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} | ${SED} -e "s#%%inst_dir%%#${inst_dir}#"
+	@${SED} -e "s#%%inst_dir%%#${inst_dir}#" ${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .if defined(MAINTAINER_MODE)
Index: mail/pear-mailparse/Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/pear-mailparse/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- mail/pear-mailparse/Makefile	9 Feb 2004 11:43:36 -0000	1.10
+++ mail/pear-mailparse/Makefile	22 Feb 2004 13:42:42 -0000
@@ -62,9 +62,9 @@
 	@${ECHO_MSG} "===> Examples installed in ${TESTDIR}."
 .endif
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} | \
-	${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:"	\
-		-e "s:/usr/local/lib/php/20020429:${PHP_BASE}/${EXT_DIR}:"
+	@${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:"	\
+		-e "s:/usr/local/lib/php/20020429:${PHP_BASE}/${EXT_DIR}:" \
+		${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .include <bsd.port.post.mk>
Index: mail/zmailer/Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/zmailer/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- mail/zmailer/Makefile	8 Feb 2004 15:45:10 -0000	1.15
+++ mail/zmailer/Makefile	22 Feb 2004 13:42:42 -0000
@@ -68,8 +68,8 @@
 	@${INSTALL_SCRIPT} ${FILESDIR}/zmailer.sh.sample \
 		 ${PREFIX}/etc/rc.d/zmailer.sh.sample
 
-	${CAT} ${PKGMESSAGE} | ${SED} -e s:@PREFIX@:${PREFIX}:g \
-		-e s:@PORTSDIR@:${PORTSDIR}:g
+	@${SED} -e s:@PREFIX@:${PREFIX}:g \
+		-e s:@PORTSDIR@:${PORTSDIR}:g ${PKGMESSAGE}
 
 # set up the initial mail.conf with reasonable settings.
 	@${ECHO_CMD} "# Where am I?" > ${PREFIX}/etc/zmailer/mail.conf.sample
Index: print/auctex/Makefile
===================================================================
RCS file: /home/ncvs/ports/print/auctex/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- print/auctex/Makefile	3 Oct 2003 11:04:58 -0000	1.14
+++ print/auctex/Makefile	22 Feb 2004 13:42:42 -0000
@@ -41,6 +41,6 @@
 	cd ${WRKSRC} &&  ${SETENV} ${MAKE_ENV} ${MAKE} install-info >/dev/null
 	install-info --entry='* AUC-Tex mode: (auctex).	Emacs mode for editing TeX and LaTeX files.' --section='TeX' ${PREFIX}/info/auctex ${PREFIX}/info/dir
 .endif
-	@${CAT} ${PKGMESSAGE} | ${SED} 's?/usr/local?${PREFIX}?g'
+	@${SED} 's?/usr/local?${PREFIX}?g' ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: www/pear-APC/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/pear-APC/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- www/pear-APC/Makefile	9 Feb 2004 11:43:35 -0000	1.4
+++ www/pear-APC/Makefile	22 Feb 2004 13:42:42 -0000
@@ -46,8 +46,7 @@
 	@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
 .endif
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} | \
-		${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:"
+	@${SED} -e "s:/usr/local/etc/php.ini:${PHP_INI}:" ${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .include <bsd.port.post.mk>
Index: x11-toolkits/freeglut/Makefile
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/freeglut/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- x11-toolkits/freeglut/Makefile	14 Dec 2003 13:03:37 -0000	1.4
+++ x11-toolkits/freeglut/Makefile	22 Feb 2004 13:42:42 -0000
@@ -51,8 +51,8 @@
 post-build:
 	@${MV} ${WRKSRC}/progs/demos/CallbackMaker/.libs/CallbackMaker	\
 		${WRKSRC}/progs/demos/CallbackMaker/.libs/callbackmaker
-	@${CAT} pkg-message | ${SED} 's|%%X11BASE%%|${X11BASE}| ; \
-		s|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE}
+	@${SED} -e 's|%%X11BASE%%|${X11BASE}|' \
+		-e 's|%%PREFIX%%|${PREFIX}|' pkg-message > ${PKGMESSAGE}
 
 post-install:
 .if !defined(NOPORTDOCS)
@@ -71,9 +71,8 @@
 	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
 .endif
 	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE} |	\
-		${SED} -e "s|/usr/local|${PREFIX}|"		\
-			-e "s|/usr/X11R6|${X11BASE}|"
+	@${SED} -e "s|/usr/local|${PREFIX}|"	\
+		-e "s|/usr/X11R6|${X11BASE}|" ${PKGMESSAGE}
 	@${ECHO_MSG}
 
 .include <bsd.port.mk>
--- cat_sed1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list