Date: Tue, 13 Jun 2000 16:09:28 +0200 (CEST) From: Christian Weisgerber <naddy@unix-ag.uni-kl.de> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/19241: PERL_CONFIGURE Message-ID: <200006131409.QAA01715@fettuccini.unix-ag.uni-kl.de>
next in thread | raw e-mail | index | archive | help
>Number: 19241 >Category: ports >Synopsis: PERL_CONFIGURE >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jun 13 07:10:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Christian Weisgerber >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: Installation of Perl5 modules that use Perl's MakeMaker configuration, e.g. most CPAN modules. >Description: There are 150+ Perl5 modules in the ports collection. All of them require similar "do-configure" targets. A sample target has been copied over and over, with various gratuitous divergences. At this time (2000-06-13), nearly all p5-* ports that compile something don't honor CC/CFLAGS, suggesting that the porters aren't very comfortable with handling MakeMaker manually and have blindly copied from previous ports. To unify and simplify the handling of p5-* ports, I suggest to introduce PERL_CONFIGURE, which if set will modify the configure run appropriately. At the core, PERL_CONFIGURE=yes causes perl Makefile.PL CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" to be executed by default. >How-To-Repeat: >Fix: --- bsd.port.mk.orig Sun May 7 05:54:34 2000 +++ bsd.port.mk Tue Jun 13 15:38:44 2000 @@ -371,13 +371,16 @@ # configure stage will not do anything if this is not set. # GNU_CONFIGURE - Set if you are using GNU configure (optional). Implies # HAS_CONFIGURE. +# PERL_CONFIGURE - Configure using Perl's MakeMaker. Implies USE_PERL5. # CONFIGURE_WRKSRC - Directory to run configure in (default: ${WRKSRC}). -# CONFIGURE_SCRIPT - Name of configure script (default: configure). +# CONFIGURE_SCRIPT - Name of configure script (default: "Makefile.PL" if +# PERL_CONFIGURE is set, "configure" otherwise). # CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is # defined (default: ${MACHINE_ARCH}--freebsd${OSREL}). # CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set # (default: "--prefix=${PREFIX} ${CONFIGURE_TARGET}" if -# GNU_CONFIGURE is set, empty otherwise). +# GNU_CONFIGURE is set, "CC=${CC} CCFLAGS=${CFLAGS} +# PREFIX=${PREFIX}" if PERL_CONFIGURE is set, empty otherwise). # CONFIGURE_ENV - Pass these env (shell-like) to configure if # ${HAS_CONFIGURE} is set. # CONFIGURE_LOG - The name of configure log file (default: config.log). @@ -1226,6 +1229,13 @@ .endif PKGLATESTFILE?= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} +.if defined(PERL_CONFIGURE) +CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" +CONFIGURE_SCRIPT?= Makefile.PL +USE_PERL5= yes +.undef HAS_CONFIGURE +.endif + CONFIGURE_WRKSRC?= ${WRKSRC} CONFIGURE_SCRIPT?= configure CONFIGURE_TARGET?= ${MACHINE_ARCH}--freebsd${OSREL} @@ -1750,6 +1760,11 @@ ${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \ ${FALSE}; \ fi) +.endif +.if defined(PERL_CONFIGURE) + @cd ${CONFIGURE_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} \ + ${PERL5} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} .endif .if defined(USE_IMAKE) @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF}) >Release-Note: >Audit-Trail: >Unformatted: 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?200006131409.QAA01715>