Date: Mon, 10 Aug 1998 03:52:09 -0400 From: Tim Vanderhoek <ac199@hwcn.org> To: Satoshi Asami <asami@cs.berkeley.edu>, ports@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: perl and other fixes to bsd.port.mk Message-ID: <19980810035209.C4794@zappo> In-Reply-To: <199808092210.PAA20972@silvia.hip.berkeley.edu>; from Satoshi Asami on Sun, Aug 09, 1998 at 03:10:07PM -0700 References: <199808092210.PAA20972@silvia.hip.berkeley.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 09, 1998 at 03:10:07PM -0700, Satoshi Asami wrote: > > 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.) Can you fix the spacing after ${ECHO_MSG} "===> to be consistent, too? Some of those lines have three spaces, some of them have two spaces, and one of them has one space. > Comments welcome. I also welcome volunteers to actually carry out the > * above. :) Haha! A small addition to bsd.port.mk along the lines of fixee: .if ${PLIST} == "${.CURDIR}/pkg/PLIST" .for x in ${__MANPAGES} perl -pi -e 'm!$x! && ($$_ = "")' pkg/PLIST .endfor .else @echo "Can't handle ${.CURDIR}" .endif would probably do the trick for most of them (w/ appropriate change to bsd.subdir.mk), but you're nuts if you think I'm going to do that on for you! :-) Done in one big mega-commit, that would hit about 1600 files at once. Wow. > +.if defined(_MANPAGES) > +__MANPAGES:= ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/.gz/} > +.endif > + .if defined(_MANPAGES) && defined(NOMANCOMPRESS) __MANPAGES:= ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g} .elif defined(_MANPAGES) __MANPAGES:= ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/.gz/} .endif Out of curiousity, under what circumstances will the :S/""// be used? Hmm... This seems to interact correctly with MANPREFIX. > @@ -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 PLIST_SUB+= PERL_VERSION=5.00501 \ PERL_VER=5.005 \ OSREL=${OSREL} .for sub in ${PLIST_SUB} _sedsubplist!= sym=`echo "${sub}" | ${SED} -e 's/=.*//'`; \ val=`echo "${sub}" | ${SED} -e 's/^[^=][^=]*=//'`; \ echo "${_sedsubplist} -e s!%%$${sym}%%!$${val}!g" .endfor _PORT_USE: .USE [...] .if ((make(real-install) || make(real-package) && exists(${PLIST})) @>${TMPPLIST} .for man in ${__MANPAGES} @${ECHO} ${man} >> ${TMPPLIST} .endfor @${SED} ${_sedsubplist} ${PLIST} > ${TMPPLIST} .endif Letting users (oops-"ports" :) specify their own ${_sedsubplist} (or equiv) would probably be asking for abuse ("What? Huh? How come bin/zzxxyy is in pkg/PLIST but doesn't get installed?"). The only reason I could think of for testing -e ${PLIST} via the shell was that ${PLIST} might be created during the make process. However, since this stuff is being done before the pre-install target and since bsd.port.mk is called recursively for each new major target, I didn't see how this could happen. Regardless, I could have been wrong in changing the test to exists(${PLIST}). :-) A port could then add the following to its Makefile, .if PREFIX==/usr PLIST_SUB= POSSIBLY_INSTALLED_FILE= VARDIR=/var .else PLIST_SUB= POSSIBLE_INSTALLED_FILE=bin/netu VARDIR=. .endif Perhaps with a @cwd %%VARDIR%% in the plist. -- This .sig is not innovative, witty, or profund. 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?19980810035209.C4794>