unPERLify, and use ${FIND} and ${XARGS} where appropriate.

PR:		48253
Submitted by:	Simon 'portlint' Schubert <corecode@corecode.ath.cx>
This commit is contained in:
Joe Marcus Clarke 2003-11-15 20:37:04 +00:00
parent 69159be6d1
commit 3dfcb69b77
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94052
9 changed files with 42 additions and 31 deletions

View file

@ -17,6 +17,7 @@ MASTER_SITE_SUBDIR= kris
MAINTAINER= lo_gafet@users.sourceforge.net
COMMENT= Open Application Builder (code generator) for the GTK and/or GNOME
USE_REINPLACE= yes
USE_GMAKE= yes
USE_GNOME= gtk12
WANT_GNOME= yes
@ -28,7 +29,7 @@ USE_GNOME+= gnomelibs
.endif
pre-build:
${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${PERL} \
-pi -e "s@gtk-config@${GTK_CONFIG}@g"
${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} -e \
's@gtk-config@${GTK_CONFIG}@g'
.include <bsd.port.post.mk>

View file

@ -20,13 +20,13 @@ USE_GMAKE= yes
MAKEFILE= makefile
ALL_TARGET= # empty
USE_X_PREFIX= yes
USE_REINPLACE= yes
post-patch:
@${PERL} -pi -e 's:/unc/walk/lib/sgi_irix:${PREFIX}/lib:g' ${WRKSRC}/makefile
@${PERL} -pi -e 's:/unc/walk/include:${PREFIX}/include:g' ${WRKSRC}/makefile
@${PERL} -pi -e 's:^CFLAGS:#CFLAGS:g' ${WRKSRC}/makefile
@${PERL} -pi -e 's:^CC=:CC=gcc #:g' ${WRKSRC}/makefile
@${PERL} -pi -e 's:^libs =:libs=-pthread:g' ${WRKSRC}/makefile
@${REINPLACE_CMD} -e 's:/unc/walk/lib/sgi_irix:${PREFIX}/lib:g; \
s:/unc/walk/include:${PREFIX}/include:g; \
s:^CFLAGS:#&:; s:^CC=:CC?=gcc #:; \
s:^libs =:&${PTHREAD_LIBS}:' ${WRKSRC}/makefile
@${MKDIR} ${WRKSRC}/lib ${WRKSRC}/bin
do-install:

View file

@ -19,6 +19,7 @@ COMMENT= GGI API for input sources
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
USE_XLIB= yes
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
@ -60,7 +61,7 @@ EXAMPLES= demos/demo.c demos/filter.c \
demos/mhub.c demos/xsendbut.c
post-configure:
@${PERL} -p -i.bak -e 's/deplibs -lc/deplibs/;' ${WRKSRC}/libtool
@${REINPLACE_CMD} -e 's/\(deplibs\) -lc/\1/;' ${WRKSRC}/libtool
post-install:
@${CP} ${WRKSRC}/libgii.conf ${PREFIX}/etc/ggi/libgii.conf.dist

View file

@ -17,6 +17,7 @@ COMMENT= A customizable IDE that supports a wide variety of languages
USE_QT_VER= 2
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_XLIB= yes
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= QTDIR="${X11BASE}"
QTCPPFLAGS+= -I${X11BASE}/include
@ -32,10 +33,10 @@ CFLAGS+= -O0
.endif
pre-configure:
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${PERL} -pi -e \
's|\$$\{prefix\}/moonshine|\$$\{prefix\}/share/moonshine| ; \
s|\@INSTBIN\@|${PREFIX}/bin| ; s|moc -o|\$$\(MOC\) -o|'
@${PERL} -pi -e 's|/usr/share/moonshine|${PREFIX}/share/moonshine|' \
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|\$${prefix}/moonshine|$${prefix}/share/moonshine| ; \
s|@INSTBIN@|${PREFIX}/bin| ; s|moc -o|$$(MOC) -o|'
@${REINPLACE_CMD} -e 's|/usr/share/moonshine|${PREFIX}/share/moonshine|' \
${WRKSRC}/include/tags.h
.include <bsd.port.post.mk>

View file

@ -15,6 +15,7 @@ MAINTAINER= jedgar@FreeBSD.org
COMMENT= GNOME frontend for CVS
USE_X_PREFIX= yes
USE_REINPLACE= yes
USE_GMAKE= yes
USE_GNOME= yes
GNU_CONFIGURE= yes
@ -22,12 +23,12 @@ CONFIGURE_ENV+= CPPCFLAGS="-I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib"
pre-patch:
@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
s|DATADIRNAME=lib|DATADIRNAME=share|g ; \
s|USE_INCLUDED_LIBINTL=yes|#USE_INCLUDED_LIBINTL=yes|g ; \
s|\$$\(top_builddir\)/intl/libintl.a|-lintl|g' ${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${PERL} -pi -e \
's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
s|\(DATADIRNAME=\)lib|\1share|g ; \
s|USE_INCLUDED_LIBINTL=yes|#&|g ; \
s|\$$(top_builddir)/intl/libintl.a|-lintl|g' ${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|\(\$$(datadir)/\)gnome/|\1|g ; \
s|\$$(datadir)/locale|$$(prefix)/share/locale|g'
.include <bsd.port.mk>

View file

@ -22,22 +22,23 @@ PATCH_WRKSRC= ${WRKSRC}
PKGDIR= ${.CURDIR}
MAKE_ENV= QTDIR=${PREFIX} LD_LIBRARY_PATH=${PREFIX}/lib PREFIX=${PREFIX}
ALL_TARGET= sub-tools
USE_REINPLACE= yes
post-patch:
${PERL} -pi -e "s@-fno-exceptions@-fno-exceptions -I${X11BASE}/include/qt2@g" ${CONFIG}
${REINPLACE_CMD} -e "s@-fno-exceptions@& -I${X11BASE}/include/qt2@g" ${CONFIG}
do-build:
(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
qt-pre-configure:
${PERL} -pi -e 's@DESTDIR = \$$\(QTDIR\)/bin@DESTDIR = ../../../bin@g' \
${REINPLACE_CMD} -e 's@\(DESTDIR = \)\$$(QTDIR)/bin@\1../../../bin@' \
${WRKSRC}/tools/designer/designer/Makefile.in
${PERL} -pi -e 's@sub-tools: sub-src @sub-tools: @g' ${WRKSRC}/Makefile
${PERL} -pi -e "s@\$$(MAKE) util@@g; s@\$$(MAKE) uic@@g; \
s@util \\\@designer@g; s@uic \\\@@g; \
s@\t\tdesigner@@g" ${WRKSRC}/tools/designer/Makefile.in
${PERL} -pi -e "s@getenv\( \"QTDIR\" \)@QT_PREFIX@g; \
s@/tools/designer/templates@/share/qt2/designer/templates@g" \
${REINPLACE_CMD} -e 's@\(sub-tools: \)sub-src @\1@' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's@\$$\(MAKE\) util@@; s@\$$\(MAKE\) uic@@; \
s@util \\@designer@g; s@uic \\@@g; \
s@'"`printf '\t\t'`"'designer@@g' ${WRKSRC}/tools/designer/Makefile.in
${REINPLACE_CMD} -e 's@getenv( "QTDIR" )@QT_PREFIX@g; \
s@/tools/designer/templates@/share/qt2/designer/templates@g' \
${WRKSRC}/tools/designer/designer/newformimpl.cpp
.include "${MASTERDIR}/Makefile"

View file

@ -19,8 +19,10 @@ RUN_DEPENDS= wish8.2:${PORTSDIR}/x11-toolkits/tk82
NO_BUILD= yes
USE_REINPLACE= yes
do-patch:
perl -pi -e "s|/usr/local/bin/wish4.1|${PREFIX}/bin/wish8.2|;" \
${REINPLACE_CMD} -e "s|/usr/local/bin/wish4.1|${LOCALBASE}/bin/wish8.2|;" \
${WRKDIR}/TkRef
do-install:

View file

@ -20,8 +20,10 @@ HAS_CONFIGURE= yes
CONFIGURE_ARGS= ${PREFIX}
NO_BUILD= yes
USE_REINPLACE= yes
pre-configure:
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/configure
@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/configure
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/vtcl ${PREFIX}/bin

View file

@ -19,6 +19,8 @@ BROKEN= "Doesn't run with Horde 2.1 or 2.2"
NO_BUILD= yes
USE_REINPLACE= yes
DOCS= LICENSE docs/CHANGES
CONFFILE= conf.php html.php prefs.php
SUB_DIRS= config graphics lib locale po scripts templates
@ -49,9 +51,9 @@ do-install:
@${CHOWN} -R www:www ${WHUPSDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${CP} -p ${FILESDIR}/httpd.conf.whups ${HORDE_INC}
@${PERL} -pi -e "s:/home/httpd/html/horde/whups:${WHUPSDIR}:g" \
@${REINPLACE_CMD} -e "s:/home/httpd/html/horde/whups:${WHUPSDIR}:g" \
${HORDE_INC}/httpd.conf.whups
@${PERL} -pi -e "s://UNCOMMENTWHENINSTWHUPS::" ${HORDEDIR}/config/registry.php
@${REINPLACE_CMD} -e "s://UNCOMMENTWHENINSTWHUPS::" ${HORDEDIR}/config/registry.php
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}