Clean up inefficient perl invocations; use multiple REs in the same call.
This commit is contained in:
parent
cc2dc5fd2b
commit
e40046b15d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=36897
@ -20,8 +20,8 @@ NO_BUILD= yes
|
||||
PYTHON?= ${LOCALBASE}/bin/python
|
||||
|
||||
pre-install:
|
||||
@${PERL} -pi -e "s:/usr/bin/python:${PYTHON}:g" ${WRKSRC}/pyWeather.py
|
||||
@${PERL} -pi -e "s:pyWeather.py:pyWeather:g" ${WRKSRC}/pyWeather.py
|
||||
@${PERL} -pi -e "s:/usr/bin/python:${PYTHON}:g ; \
|
||||
s:pyWeather.py:pyWeather:g" ${WRKSRC}/pyWeather.py
|
||||
|
||||
do-install:
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/pyWeather.py ${PREFIX}/bin/pyWeather
|
||||
|
@ -15,9 +15,7 @@ MAINTAINER= hollywar@mail.holywar.net
|
||||
USE_GMAKE= yes
|
||||
|
||||
post-patch:
|
||||
(cd ${WRKSRC} && find . -name Makefile | xargs ${PERL} -pi -e \
|
||||
"s@-O20@${CFLAGS}@g")
|
||||
(cd ${WRKSRC} && find . -name Makefile | xargs ${PERL} -pi -e \
|
||||
"s@-O2@${CFLAGS}@g")
|
||||
(find ${WRKSRC} -name Makefile | xargs ${PERL} -pi -e \
|
||||
"s@-O20@${CFLAGS}@g ; s@-O2@${CFLAGS}@g")
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -21,11 +21,9 @@ NO_WRKSUBDIR= true
|
||||
DOC_FILES= CHANGES TODO README_Snowstar LICENSE
|
||||
|
||||
# somehow snowstar.tcl managed to get loaded with ^M's.
|
||||
post-extract:
|
||||
@${PERL} -pi -e "s|\r\n|\n|g" ${WRKSRC}/snowstar.tcl
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/snowstar.tcl
|
||||
@${PERL} -pi -e "s|\r\n|\n|g ; \
|
||||
s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/snowstar.tcl
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/snowstar.tcl ${PREFIX}/bin/snowstar
|
||||
|
@ -29,8 +29,8 @@ do-extract:
|
||||
.endfor
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/povchem.cfg
|
||||
@${PERL} -pi -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/povchem.cfg
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g ; \
|
||||
s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/povchem.cfg
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CC} ${CFLAGS} ${DEFS} -o povchem povchem.c -lm
|
||||
|
@ -31,8 +31,7 @@ EXTRACT_ONLY= ${DISTNAME}.tgz
|
||||
.include <bsd.port.pre.mk>
|
||||
post-patch:
|
||||
.if ${OSVERSION} > 500012
|
||||
@${PERL} -pi -e 's,machine/console.h>,sys/consio.h>\n#include\t<sys/kbio.h>\n,' ${WRKSRC}/include/*
|
||||
@${PERL} -pi -e 's,machine/console.h>,sys/consio.h>\n#include\t<sys/kbio.h>\n,' ${WRKSRC}/src/*
|
||||
@${PERL} -pi -e 's,machine/console.h>,sys/consio.h>\n#include\t<sys/kbio.h>\n,' ${WRKSRC}/include/* ${WRKSRC}/src/*
|
||||
.endif
|
||||
pre-install:
|
||||
@if [ ! -f ${PREFIX}/lib/fonts/kc16.smf ]; then \
|
||||
|
@ -32,8 +32,8 @@ CONFIGURE_ENV+= LIBQT="-lqt2" MOC="${MOC}" LIBQTFILE="libqt2" \
|
||||
USE_GMAKE= yes
|
||||
|
||||
pre-configure:
|
||||
${PERL} -pi -e "s@TOPSUBDIRS libaps@TOPSUBDIRS@g" ${WRKSRC}/configure
|
||||
${PERL} -pi -e "s@odbc libaps@odbc@g" ${WRKSRC}/configure
|
||||
${PERL} -pi -e "s@TOPSUBDIRS libaps@TOPSUBDIRS@g ; \
|
||||
s@odbc libaps@odbc@g" ${WRKSRC}/configure
|
||||
${PERL} -pi -e "s@-version-info 1:1@-version-info 3:0@g" ${WRKSRC}/mimelib/Makefile.in
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -22,10 +22,9 @@ CONFIGURE_ARGS+=--prefix ${PREFIX} --perl ${PERL5} --make ${GMAKE}
|
||||
CONFIGURE_ENV+= QTDIR=${X11BASE}
|
||||
|
||||
pre-configure:
|
||||
@${PERL} -pi -e "s:gcc:${CC}:g" ${WRKSRC}/tmake/lib/freebsd-g++/tmake.conf
|
||||
@${PERL} -pi -e "s:g\+\+:${CXX}:" ${WRKSRC}/tmake/lib/freebsd-g++/tmake.conf
|
||||
@${PERL} -pi -e "s:%%CFLAGS%%:${CFLAGS}:g" ${WRKSRC}/tmake/lib/freebsd-g++/tmake.conf
|
||||
@${PERL} -pi -e "s:%%CXXFLAGS%%:${CXXFLAGS}:g" ${WRKSRC}/tmake/lib/freebsd-g++/tmake.conf
|
||||
@${PERL} -pi -e "s:gcc:${CC}:g ; s:g\+\+:${CXX}:g ; \
|
||||
s:%%CFLAGS%%:${CFLAGS}:g ; \
|
||||
s:%%CXXFLAGS%%:${CXXFLAGS}:g" ${WRKSRC}/tmake/lib/freebsd-g++/tmake.conf
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/doxygen ${PREFIX}/bin
|
||||
|
@ -29,8 +29,8 @@ INST_DIST= bin dgrid doc dock examples include kelp lib mp++ tools
|
||||
INST_KELP_HOME= ${LOCALBASE}/kelp
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e 's,API2,./API2,' ${WRKSRC}/examples/API/makefile
|
||||
@${PERL} -pi -e 's,API3,./API3,' ${WRKSRC}/examples/API/makefile
|
||||
@${PERL} -pi -e 's,API2,./API2, ; \
|
||||
s,API3,./API3,' ${WRKSRC}/examples/API/makefile
|
||||
@${PERL} -pi -e 's,%LOCALBASE%,${LOCALBASE},' ${WRKSRC}/configure
|
||||
|
||||
do-install:
|
||||
|
@ -38,9 +38,8 @@ CONFIGURE_ARGS= --x-includes=$(X11BASE)/include \
|
||||
CONFIGURE_ENV+= SS_X_EXTRA_LIBS=-lxpg4
|
||||
|
||||
pre-build:
|
||||
for i in `find ${WRKSRC} -name Makefile` ; do \
|
||||
${PERL} -pi -e "s@lqt @lqt2 @g" $$i ; \
|
||||
${PERL} -pi -e "s@lpthread@pthread@g" $$i ; \
|
||||
done
|
||||
@find ${WRKSRC} -name Makefile | xargs ${PERL} -pi -e \
|
||||
"s@lqt @lqt2 @g ; \
|
||||
s@lpthread@pthread@g"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -38,9 +38,8 @@ CONFIGURE_ARGS= --x-includes=$(X11BASE)/include \
|
||||
CONFIGURE_ENV+= SS_X_EXTRA_LIBS=-lxpg4
|
||||
|
||||
pre-build:
|
||||
for i in `find ${WRKSRC} -name Makefile` ; do \
|
||||
${PERL} -pi -e "s@lqt @lqt2 @g" $$i ; \
|
||||
${PERL} -pi -e "s@lpthread@pthread@g" $$i ; \
|
||||
done
|
||||
@find ${WRKSRC} -name Makefile | xargs ${PERL} -pi -e \
|
||||
"s@lqt @lqt2 @g ; \
|
||||
s@lpthread@pthread@g"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -25,7 +25,7 @@ do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/help ${PREFIX}/share/doc/roxirc/help
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e 's,/usr/local,${PREFIX},g' ${WRKSRC}/roxirc
|
||||
@${PERL} -pi -e 's,wish8.0,wish8.2,g' ${WRKSRC}/roxirc
|
||||
@${PERL} -pi -e 's,/usr/local,${PREFIX},g ; \
|
||||
s,wish8.0,wish8.2,g' ${WRKSRC}/roxirc
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -18,8 +18,7 @@ MAKE_FLAGS= CONF_ARGS="--prefix=${PREFIX}"
|
||||
MAN1= tirc.1
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/*.c
|
||||
@${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/*.1
|
||||
@${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/*.c ${WRKSRC}/*.1
|
||||
|
||||
post-install:
|
||||
strip ${PREFIX}/bin/tirc
|
||||
|
@ -31,8 +31,8 @@ do-configure:
|
||||
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} Makefile.PL \
|
||||
CC="${CC}" CCFLAGS="${CFLAGS}"
|
||||
.for DIR in Unicode Jcode
|
||||
${PERL} -pi -e "s:CCFLAGS = :CCFLAGS = ${CFLAGS}:g" ${WRKSRC}/${DIR}/Makefile
|
||||
${PERL} -pi -e "s:CC = cc:CC = ${CC}:g" ${WRKSRC}/${DIR}/Makefile
|
||||
${PERL} -pi -e "s:CCFLAGS = :CCFLAGS = ${CFLAGS}:g ; \
|
||||
s:CC = cc:CC = ${CC}:g" ${WRKSRC}/${DIR}/Makefile
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -16,19 +16,8 @@ MAINTAINER= obrien@FreeBSD.org
|
||||
pre-configure:
|
||||
@${PERL} -pi.orig \
|
||||
-e "s:/etc/muttzilla.conf:${PREFIX}/etc/muttzilla.conf:g" \
|
||||
${WRKSRC}/muttzilla.h
|
||||
@${PERL} -pi.orig \
|
||||
-e "s:/etc/muttzilla.conf:${PREFIX}/etc/muttzilla.conf:g" \
|
||||
${WRKSRC}/mzmail.sh
|
||||
@${PERL} -pi.orig \
|
||||
-e "s:/etc/muttzilla.conf:${PREFIX}/etc/muttzilla.conf:g" \
|
||||
${WRKSRC}/mzmail.py
|
||||
@${PERL} -pi.orig \
|
||||
-e "s:/etc/muttzilla.conf:${PREFIX}/etc/muttzilla.conf:g" \
|
||||
${WRKSRC}/mznews.sh
|
||||
@${PERL} -pi.orig \
|
||||
-e "s:/etc/muttzilla.conf:${PREFIX}/etc/muttzilla.conf:g" \
|
||||
${WRKSRC}/mznews.py
|
||||
${WRKSRC}/muttzilla.h ${WRKSRC}/mzmail.sh ${WRKSRC}/mzmail.py \
|
||||
${WRKSRC}/mznews.sh ${WRKSRC}/mznews.py
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
|
@ -24,9 +24,9 @@ do-extract:
|
||||
@${CP} ${DISTDIR}/${DISTNAME} ${WRKDIR}/${DISTNAME}
|
||||
|
||||
do-configure:
|
||||
@${PERL} -pi.orig -e 's|/usr/local/etc/rfc|${PREFIX}/etc/rfc|' ${WRKDIR}/${DISTNAME}
|
||||
@${PERL} -pi.orig -e 's|/usr/local/etc/nmap|${PREFIX}/share/misc/nmap|' ${WRKDIR}/${DISTNAME}
|
||||
@${PERL} -pi.orig -e 's|lynx|w3m|' ${WRKDIR}/${DISTNAME}
|
||||
@${PERL} -pi.orig -e 's|/usr/local/etc/rfc|${PREFIX}/etc/rfc| ; \
|
||||
s|/usr/local/etc/nmap|${PREFIX}/share/misc/nmap| ; \
|
||||
s|lynx|w3m|' ${WRKDIR}/${DISTNAME}
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/rfc ${PREFIX}/bin/rfc
|
||||
|
@ -17,8 +17,8 @@ MAINTAINER= trevor@FreeBSD.org
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g" ${WRKSRC}/p0f.c
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g" ${WRKSRC}/README
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g ; \
|
||||
s=/etc=${PREFIX}/etc=g" ${WRKSRC}/README
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/p0f ${PREFIX}/bin
|
||||
|
@ -17,8 +17,8 @@ MAINTAINER= trevor@FreeBSD.org
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g" ${WRKSRC}/p0f.c
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g" ${WRKSRC}/README
|
||||
@${PERL} -pi -e "s=/etc=${PREFIX}/etc=g ; \
|
||||
s=/etc=${PREFIX}/etc=g" ${WRKSRC}/README
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/p0f ${PREFIX}/bin
|
||||
|
@ -34,9 +34,8 @@ MAN1= rsync.1
|
||||
MAN5= rsyncd.conf.5
|
||||
|
||||
pre-configure:
|
||||
@${PERL} -pi.orig -e 's:/etc/:${PREFIX}/etc/:g' ${WRKSRC}/rsync.h
|
||||
@${PERL} -pi.orig -e 's:/etc/:${PREFIX}/etc/:g' ${WRKSRC}/rsync.1
|
||||
@${PERL} -pi.orig -e 's:/etc/:${PREFIX}/etc/:g' ${WRKSRC}/rsyncd.conf.5
|
||||
@${PERL} -pi.orig -e 's:/etc/:${PREFIX}/etc/:g'
|
||||
${WRKSRC}/rsync.h ${WRKSRC}/rsync.1 ${WRKSRC}/rsyncd.conf.5
|
||||
.if defined(WITH_SSH)
|
||||
@${PERL} -pi.orig-rsh -e 's/"rsh"/"ssh"/g' ${WRKSRC}/rsync.h
|
||||
.endif
|
||||
|
@ -15,8 +15,8 @@ MAINTAINER= dan@freebsddiary.org
|
||||
ALL_TARGET= freebsd
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e 's,__PREFIX__,${PREFIX},g' ${WRKSRC}/portsentry.conf
|
||||
@${PERL} -pi -e 's,__PREFIX__,${PREFIX},g' ${WRKSRC}/portsentry_config.h
|
||||
@${PERL} -pi -e 's,__PREFIX__,${PREFIX},g' \
|
||||
${WRKSRC}/portsentry.conf ${WRKSRC}/portsentry_config.h
|
||||
|
||||
do-install:
|
||||
.if !exists($(PREFIX)/etc/portsentry.conf)
|
||||
|
@ -17,8 +17,8 @@ USE_PERL5= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
pre-install:
|
||||
@${PERL} -pi -e "s:/usr/local/bin/perl:${PERL}:g" ${WRKSRC}/*.pl
|
||||
@${PERL} -pi -e "s:/usr/local/share:${PREFIX}/share:g" ${WRKSRC}/bkmrkconv.pl
|
||||
@${PERL} -pi -e "s:/usr/local/bin/perl:${PERL}:g ; \
|
||||
s:/usr/local/share:${PREFIX}/share:g" ${WRKSRC}/*.pl
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${PREFIX}/share/bkmrkconv/src
|
||||
|
@ -25,9 +25,9 @@ NO_BUILD= yes
|
||||
WRKSRC= ${WRKDIR}/${PKGNAME}
|
||||
|
||||
post-patch:
|
||||
@ ${PERL} -pi -e 's#/usr/bin/python#${PYTHON_CMD}#' ${WRKSRC}/evg
|
||||
@ ${PERL} -pi -e 's#/usr/X11R6#${X11BASE}#' ${WRKSRC}/evg
|
||||
@ ${PERL} -pi -e 's#/usr/bin/ee#${X11BASE}/bin/xv#' ${WRKSRC}/evg
|
||||
@ ${PERL} -pi -e 's#/usr/bin/python#${PYTHON_CMD}# ; \
|
||||
s#/usr/X11R6#${X11BASE}# ; \
|
||||
s#/usr/bin/ee#${X11BASE}/bin/xv#' ${WRKSRC}/evg
|
||||
|
||||
do-install:
|
||||
@ ${MKDIR} ${PYTHON_SITELIBDIR}
|
||||
|
@ -23,9 +23,9 @@ pre-patch:
|
||||
|
||||
pre-install:
|
||||
${RM} -rf ${WRKSRC}/http-root/pub/dummy_directory
|
||||
${PERL} -pi -e "s:%%LOGFILE%%:${PREFIX}/${LOGFILE}:g" ${WRKSRC}/fhttpd.sh
|
||||
${PERL} -pi -e "s:%%LOGFILE%%:${PREFIX}/${LOGFILE}:g" \
|
||||
${WRKSRC}/fhttpd.sh ${WRKSRC}/http-root/root-fhttpd.conf
|
||||
${PERL} -pi -e "s:/usr/local:${PREFIX}:g" ${WRKSRC}/http-root/root-fhttpd.conf
|
||||
${PERL} -pi -e "s:%%LOGFILE%%:${PREFIX}/${LOGFILE}:g" ${WRKSRC}/http-root/root-fhttpd.conf
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/fhttpd.sh ${PREFIX}/etc/rc.d
|
||||
|
@ -48,10 +48,10 @@ post-patch:
|
||||
| eval `${AWK} '{print "ln -sf",$$1,"${WRKSRC}/include"}'`
|
||||
|
||||
post-configure:
|
||||
@${PERL} -pi -e "s:g\+\+:${CXX}:g" ${WRKSRC}/configs/freebsd-g++-${STATIC}
|
||||
@${PERL} -pi -e "s:/usr/X11R6:${PREFIX}:g" ${WRKSRC}/configs/freebsd-g++-${STATIC}
|
||||
@${PERL} -pi -e "s:%%CXXFLAGS%%:${CXXFLAGS}:g" ${WRKSRC}/configs/freebsd-g++-${STATIC}
|
||||
@${PERL} -pi -e "s:%%VERSION%%:${VERSION}:g" ${WRKSRC}/configs/freebsd-g++-${STATIC}
|
||||
@${PERL} -pi -e "s:g\+\+:${CXX}:g ; \
|
||||
s:/usr/X11R6:${PREFIX}:g ; \
|
||||
s:%%CXXFLAGS%%:${CXXFLAGS}:g ; \
|
||||
s:%%VERSION%%:${VERSION}:g" ${WRKSRC}/configs/freebsd-g++-${STATIC}
|
||||
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} freebsd-g++-${STATIC})
|
||||
|
||||
do-install:
|
||||
|
@ -20,8 +20,8 @@ USE_XPM= yes
|
||||
#USE_IMAKE= yes
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e 's|%%X11BASE%%|${X11BASE}|g' ${WRKSRC}/xres.c
|
||||
@${PERL} -pi -e 's|%%X11BASE%%|${X11BASE}|g' ${WRKSRC}/samples/XBanner.ad
|
||||
@${PERL} -pi -e 's|%%X11BASE%%|${X11BASE}|g' \
|
||||
${WRKSRC}/xres.c ${WRKSRC}/samples/XBanner.ad
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/samples/XBanner.ad \
|
||||
|
Loading…
Reference in New Issue
Block a user