Date: Tue, 30 Mar 1999 17:20:06 +0100 From: Tom Hukins <tom@eborcom.com> To: freebsd-ports@FreeBSD.ORG Subject: Re: Problems with p5-* ports Message-ID: <19990330172006.A18680@eborcom.com> In-Reply-To: <Pine.HPP.3.96.990322152834.10524C-100000@hp9000.chc-chimes.com>; from Bill Fumerola on Mon, Mar 22, 1999 at 03:29:14PM -0500 References: <19990322162220.A6658@eborcom.com> <Pine.HPP.3.96.990322152834.10524C-100000@hp9000.chc-chimes.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii On Mon, Mar 22, 1999 at 03:29:14PM -0500, Bill Fumerola wrote: > On Mon, 22 Mar 1999, Tom Hukins wrote: > > > Another thought: Would it be a good idea for PERL5_DEPENDS to > > include a minimum acceptable version for each module, as is done > > with LIB_DEPENDS? For example, a dependent port might work fine with > > Module.pm only if $Module::VERSION > 1.40. > > This probably is a good idea as some software requires a certain version > of some perl mods. True. I've updated my patch to account for this. The newest version is attached to this message. I'd appreciate comments from the Ports Wraith on this. Is there any chance of something like this finding its way into bsd.port.mk? Regards, Tom --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="portmk.patch2" --- /usr/ports/Mk/bsd.port.mk.orig Tue Mar 9 18:22:10 1999 +++ /usr/ports/Mk/bsd.port.mk Tue Mar 30 17:10:34 1999 @@ -608,6 +608,11 @@ .endif .endif +.if defined(PERL5_MODULE) +MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} +USE_PERL5= yes +.endif + .if defined(USE_XLIB) LIB_DEPENDS+= X11.6:${PORTSDIR}/x11/XFree86 .endif @@ -1478,6 +1483,12 @@ .if defined(USE_IMAKE) @(cd ${WRKSRC} && ${XMKMF}) .endif +.if defined(PERL5_MODULE) + @(cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${PERL} Makefile.PL PREFIX=${PREFIX} \ + INSTALLMAN1DIR=${PREFIX}/man/man1 \ + INSTALLSCRIPT=${PREFIX}/bin) +.endif .endif # Build @@ -1581,7 +1592,7 @@ .endif .if make(real-extract) @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} checksum REAL_EXTRACT=yes - @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends + @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends perl5-depends misc-depends .endif .if make(real-install) .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) @@ -1600,7 +1611,7 @@ ${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ ${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ fi - @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends lib-depends + @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends lib-depends perl5-depends .endif .if make(real-install) .if !defined(NO_MTREE) @@ -1946,7 +1957,7 @@ ################################################################ .if !target(depends) -depends: lib-depends misc-depends +depends: lib-depends misc-depends perl5-depends @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fetch-depends @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends @@ -2066,6 +2077,37 @@ fi \ done @${ECHO_MSG} "===> Returning to build of ${PKGNAME}" +.endif +.else + @${DO_NADA} +.endif + +perl5-depends: +.if defined(PERL5_DEPENDS) +.if !defined(NO_DEPENDS) + @for i in ${PERL5_DEPENDS}; do \ + lib=`${ECHO} $$i | ${SED} -e 's/\..*//' | ${SED} -e 's!/!::!g'`; \ + version=`${ECHO} $$i | ${SED} -e 's/[^\.]*\.//' | ${SED} -e 's/:.*//'`; \ + dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ + if ${PERL5} -M"$$lib $$version" -e 'exit 0' > /dev/null 2>&1; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on Perl module: $$lib version $$version or greater - found"; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on Perl module: $$lib version $$version or greater - not found"; \ + ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \ + if [ ! -d "$$dir" ]; then \ + ${ECHO_MSG} " >> No directory for $$lib. Skipping.."; \ + else \ + (cd $$dir; ${MAKE} ${.MAKEFLAGS} $$target) ; \ + ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ + if $${PERL5} -M$$lib -e 'exit 0' > /dev/null 2>&1; then \ + ${TRUE}; \ + else \ + ${ECHO_MSG} "Error: Perl module \"$$lib\" does not exist"; \ + ${FALSE}; \ + fi; \ + fi; \ + fi; \ + done .endif .else @${DO_NADA} --TB36FDmn/VVEgNH/-- 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?19990330172006.A18680>