Date: Wed, 23 Aug 2000 23:07:39 -0400 From: "Matthew Emmerton" <matt@gsicomp.on.ca> To: <ports@FreeBSD.ORG>, <asami@FreeBSD.ORG> Subject: Problem situation with p5-xxx ports Message-ID: <006a01c00d78$78dd0080$1200a8c0@matt>
next in thread | raw e-mail | index | archive | help
There's been a bit of discussion lately on ports- regarding people who use a LOCALBASE different than /usr/local, and the problems that they are having with non-conformant ports. In addition, there has been some thoughts to integrating the ports trees of all the BSDs, all of which use a different LOCALBASE for ports installations. (NetBSD uses /usr/pkg, and I don't know what OpenBSD uses.) Recently a problem came up with a port being installed in a non-/usr/local LOCALBASE situation, which ended up being a problem with a p5-port dependency. In general, Perl modules create makefiles by first executing ${PERL} Makefile.PL, which uses ExtUtils::MakeMaker to generate a "real" makefile that can be processed by make. (C programs have a similar mechanism, provided by GNU's autoconf/automake suite.) However, there is one important difference - bsd.port.mk *automatically* passes ${PREFIX} to GNU configure, whereas with ports using Makefile.PL, it's up to the porter to ensure that their do-configure target passes ${PREFIX} to the Perl instance creating the Makefile. A quick run through the ports tree (cvsup'd about a week ago) shows these suprising stats (generated by a small shell script that examines the Makefiles of all the p5-xxx ports): Case 1: (No Makefile.PL): 11 Case 2: (Makefile.PL, No PREFIX): 150 Case 3: (Makefile.PL, PREFIX): 15 Obviously the majority of p5-xxx ports do not honour ${PREFIX}, and need to be adjusted to do so. (And FWIW, the ones that do need to pass in a few more environment variables to MakeMaker to ensure that PREFIX is adhered to for stuff like manpages and supplemental files.) Rather than co-ordinating changes to all of the p5-ports, I am suggesting a mechanism for MakeMaker support to be added to bsd.port.mk, similar to the one that supports autoconf. Since all ports which require Perl5 to build must define USE_PERL, I am suggesting we add support for a USE_MAKEMAKER flag, which will inicate when MakeMaker is being used to build that port's Makefile. In addition to USE_MAKEMAKER, we could use MAKEMAKER_ENV to specifiy the environment to pass into Makefile.PL, just as CONFIGURE_ENV passes in additonal elements to autoconf. Of course, since the Perl that comes with FreeBSD has a zillion different library paths, we have to override them individually (a real pain), and that would ultimately be done here in bsd.port.mk, and would be determined by the perl version of the distribution. Any comments, suggestions? [ Note that this patch is relative to 3.4-RELEASE's bsd.port.mk.] *** bsd.port.mk.orig Wed Aug 23 19:28:49 2000 --- bsd.port.mk Wed Aug 23 23:03:42 2000 *************** *** 1746,1751 **** --- 1746,1755 ---- .if defined(USE_IMAKE) @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF}) .endif + .if defined(USE_PERL5) && defined(USE_MAKEMAKER) + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKEMAKER_ENV} \ + ${PERL5} Makefile.PL ) + .endif .endif # Build -- patch ends here --- -- Matthew Emmerton GSI Computer Services +1 (800) 217-5409 (Canada) 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?006a01c00d78$78dd0080$1200a8c0>