Date: Sun, 9 Aug 1998 15:10:07 -0700 (PDT) From: asami@cs.berkeley.edu (Satoshi Asami) To: ports@FreeBSD.ORG, markm@FreeBSD.ORG Subject: perl and other fixes to bsd.port.mk Message-ID: <199808092210.PAA20972@silvia.hip.berkeley.edu>
next in thread | raw e-mail | index | archive | help
How about this one? It defines new variables ${PERL_VERSION} (5.00501) and ${PERL_VER} (5.005), which are substituted for %%PERL_VERSION%% and %%PERL_VERS%% in the PLIST. I also made the manpages be attached to the temporary PLIST automatically. This means, for ports that define MAN?, the manpages can/should be deleted from pkg/PLIST entirely. -- * Which brings up the point, I tried a couple of p5- ports and noticed that %%PERL_VERSION%% is only used in manpages, which don't have to be in pkg/PLIST anymore (see * above). Should we substitute only one variable in PLIST? By the way, while I was there, I fixed the typo in definition of OSREL (it said "FreeBSD", duh!), changed USE_X11 to USE_XLIB and made %%OSREL%% be substituted in PLIST too. (Which will help, for instance, the lang/egcs port tremendously.) Comments welcome. I also welcome volunteers to actually carry out the * above. :) Satoshi ------- Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v retrieving revision 1.227.2.42 diff -u -r1.227.2.42 bsd.port.mk --- bsd.port.mk 1998/08/06 10:45:22 1.227.2.42 +++ bsd.port.mk 1998/08/09 22:03:33 @@ -105,7 +105,7 @@ # NO_MTREE - If set, will not invoke mtree from bsd.port.mk from # the "install" target. # MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist -# if USE_IMAKE or USE_X11 is set, /etc/mtree/BSD.local.dist +# if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist # otherwise.) # # NO_BUILD - Use a dummy (do-nothing) build target. @@ -128,8 +128,8 @@ # USE_AUTOCONF - Says that the port uses autoconf. Implies GNU_CONFIGURE. # USE_PERL5 - Says that the port uses perl5 for building and running. # USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX. -# USE_X_PREFIX - Says that the port installs in ${X11BASE}. Implies USE_X11. -# USE_X11 - Says that the port uses X libraries. +# USE_X_PREFIX - Says that the port installs in ${X11BASE}. Implies USE_XLIB. +# USE_XLIB - Says that the port uses X libraries. # NO_INSTALL_MANPAGES - For imake ports that don't like the install.man # target. # HAS_CONFIGURE - Says that the port has its own configure script. @@ -272,7 +272,7 @@ OPSYS!= uname -s # Get the operating system revision -OSREL!= uname -s | sed -e 's/[-(].*//' +OSREL!= uname -r | sed -e 's/[-(].*//' .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -355,7 +355,7 @@ USE_X_PREFIX= yes .endif .if defined(USE_X_PREFIX) -USE_X11= yes +USE_XLIB= yes .endif .if defined(USE_X_PREFIX) PREFIX?= ${X11BASE} @@ -370,11 +370,15 @@ GNU_CONFIGURE= yes BUILD_DEPENDS+= autoconf:${PORTSDIR}/devel/autoconf .endif + +PERL_VERSION= 5.00501 +PERL_VER= 5.005 + .if defined(USE_PERL5) -BUILD_DEPENDS+= perl5.00501:${PORTSDIR}/lang/perl5 -RUN_DEPENDS+= perl5.00501:${PORTSDIR}/lang/perl5 +BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 +RUN_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 .endif -.if defined(USE_X11) +.if defined(USE_XLIB) LIB_DEPENDS+= X11\\.6:${PORTSDIR}/x11/XFree86 .endif @@ -495,10 +499,11 @@ COMMENT?= ${PKGDIR}/COMMENT DESCR?= ${PKGDIR}/DESCR PLIST?= ${PKGDIR}/PLIST +TMPPLIST?= ${WRKDIR}/PLIST.mktmp PKG_CMD?= /usr/sbin/pkg_create .if !defined(PKG_ARGS) -PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" +PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" .if exists(${PKGDIR}/INSTALL) PKG_ARGS+= -i ${PKGDIR}/INSTALL .endif @@ -742,6 +747,10 @@ .endfor +.if defined(_MANPAGES) +__MANPAGES:= ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/.gz/} +.endif + .if defined(_MANPAGES) && defined(MANCOMPRESSED) _MANPAGES:= ${_MANPAGES:S/$/.gz/} .endif @@ -1204,6 +1213,18 @@ fi .endif .endif +.if make(real-install) || make(real-package) + if [ -e ${PLIST} ]; then \ + >${TMPPLIST}; \ + for man in ${__MANPAGES}; do \ + ${ECHO} $$man >> ${TMPPLIST}; \ + done; \ + ${SED} -e 's/%%PERL_VERSION%%/${PERL_VERSION}/' \ + -e 's/%%PERL_VER%%/${PERL_VER}/' \ + -e 's/%%OSREL%%/${OSREL}/' \ + ${PLIST} >> ${TMPPLIST}; \ + fi +.endif @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/pre-/} @if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ @@ -1376,7 +1397,7 @@ fi; \ fi .else - @${RM} -f ${WRKDIR}/.*_done + @${RM} -f ${WRKDIR}/.*_done ${TMPPLIST} .endif .endif @@ -1762,7 +1783,7 @@ .if !target(fake-pkg) fake-pkg: - @if [ ! -f ${PLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi + @if [ ! -f ${TMPPLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi @if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi .if defined(FORCE_PKG_REGISTER) @${RM} -rf ${PKG_DBDIR}/${PKGNAME} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808092210.PAA20972>