diff options
author | jlam <jlam@pkgsrc.org> | 2004-12-10 06:01:08 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-12-10 06:01:08 +0000 |
commit | 4534441ef8480a0809d1b0bc38567170c45ee430 (patch) | |
tree | 030f654e9827f5c3a8ee014db3c57d7b28a6923d /lang | |
parent | 20269eedfbcd00ce8e6cba874164cd8d941e3aaf (diff) | |
download | pkgsrc-4534441ef8480a0809d1b0bc38567170c45ee430.tar.gz |
Don't bother with using perl5/module.mk and PERL5_PACKLIST to generate
the PLIST and use custom post-install code instead. This avoids
needing to guess at the correct value PERL5_ARCHLIB before perl has
been configured and built. This should fix PR pkg/28433.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/perl58/Makefile | 46 | ||||
-rw-r--r-- | lang/perl58/PLIST | 5 |
2 files changed, 26 insertions, 25 deletions
diff --git a/lang/perl58/Makefile b/lang/perl58/Makefile index 9062dc41983..ce0e05cd2bd 100644 --- a/lang/perl58/Makefile +++ b/lang/perl58/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.63 2004/12/10 04:27:39 jlam Exp $ +# $NetBSD: Makefile,v 1.64 2004/12/10 06:01:08 jlam Exp $ # The following two variables should have empty values unless we're # building a perl snapshot or release candidate. @@ -43,9 +43,6 @@ CONFLICTS= perl-5.00* perl-base-[0-9]* \ PKG_INSTALLATION_TYPES= overwrite pkgviews -BUILDING_PERL5= yes -PERL5_CONFIGURE= no - USE_BUILDLINK3= yes HAS_CONFIGURE= yes CONFIGURE_SCRIPT= ./Configure @@ -92,17 +89,6 @@ CONFIGURE_ARGS+= -Dsiteman1dir="${VIEWBASE}/man/man1" # HFS filesystems by using GNUmakefiles, so we need to use GNU make. # USE_GNU_TOOLS+= make -# -# "installarchlib" and "installsitearch" have different forms between -# Darwin and NetBSD (and between older and newer versions of Darwin) -# -. if ${OS_VERSION:R} >= 7 -PERL5_ARCHLIB= ${PREFIX}/lib/perl5/${PERL5_VERS}/darwin-2level -PERL5_SITEARCH= ${PREFIX}/lib/perl5/site_perl/${PERL5_VERS}/darwin-2level -. else -PERL5_ARCHLIB= ${PREFIX}/lib/perl5/${PERL5_VERS}/darwin -PERL5_SITEARCH= ${PREFIX}/lib/perl5/site_perl/${PERL5_VERS}/darwin -. endif .endif # Nail down the needed libraries for each platform here to avoid hidden @@ -156,7 +142,6 @@ PERL5_USE_THREADS?= ${DLOPEN_REQUIRE_PTHREADS} CONFIGURE_ARGS+= -Uuseithreads .else . include "../../mk/pthread.buildlink3.mk" -PERL5_ARCHLIB= ${PREFIX}/lib/perl5/${PERL5_VERS}/${MACHINE_ARCH}-${LOWER_OPSYS}-thread-multi CONFIGURE_ARGS+= -Duseithreads CFLAGS+= ${PTHREAD_CFLAGS} PERL5_HINTS_LDFLAGS+= ${PTHREAD_LDFLAGS} @@ -176,12 +161,10 @@ CONFIGURE_ARGS+= -Duse64bitint PERL5= ${PREFIX}/bin/perl${PERL5_VERS} PERL5_PRIVLIB?= ${PREFIX}/lib/perl5/${PERL5_VERS} -PERL5_ARCHLIB?= ${PREFIX}/lib/perl5/${PERL5_VERS}/${MACHINE_ARCH}-${LOWER_OPSYS} PERL5_SITEPERL?= ${VIEWBASE}/lib/perl5/site_perl PERL5_SITELIB?= ${VIEWBASE}/lib/perl5/site_perl/${PERL5_VERS} -PERL5_SITEARCH?= ${VIEWBASE}/lib/perl5/site_perl/${PERL5_VERS}/${MACHINE_ARCH}-${LOWER_OPSYS} -PERL5_PACKLIST= ${PERL5_ARCHLIB}/.packlist PLIST_SUBST+= PERL5_SITEPERL=${PERL5_SITEPERL:S/^${PREFIX}\///} +PLIST_SUBST+= PERL5_SITELIB=${PERL5_SITELIB:S/^${PREFIX}\///} MESSAGE_SUBST+= PERL5_SITELIB=${PERL5_SITELIB} # Some platforms may want the directory mode not to be 0755. This is, @@ -232,7 +215,12 @@ pre-configure: done .endif -WRKSRC_PERL5= ${WRKSRC}/perl +WRKSRC_PERL5= ${WRKSRC}/perl +PLIST_SRC= ${WRKDIR}/.PLIST_SRC +PLIST_FILE_SED= -e "s,[ ].*,," -e "s,/\./,/,g" -e "s,${PREFIX}/,," +PLIST_DIR_SED= ${PLIST_FILE_SED} \ + -e "s,^,@unexec \${RMDIR} -p %D/," \ + -e "s,/[^/]*$$, 2>/dev/null || ${TRUE}," \ post-install: ${RM} -f ${PREFIX}/bin/perl ${PREFIX}/bin/perl${PERL5_VERS} @@ -244,7 +232,21 @@ post-install: strip ${PREFIX}/bin/a2p; \ fi .endif - ${RMDIR} -p ${PERL5_SITEARCH} 2>/dev/null || ${TRUE} + # Generate the PLIST template + eval `${PERL5} -V:installarchlib 2>/dev/null`; \ + eval `${PERL5} -V:installsitearch 2>/dev/null`; \ + sitearch=`${ECHO} $$installsitearch | ${SED} ${PLIST_FILE_SED}`; \ + ${RMDIR} -p $$installsitearch 2>/dev/null || ${TRUE}; \ + packlist="$$installarchlib/.packlist"; \ + ( ${ECHO} "@unexec ${RM} -f %D/$$sitearch/perllocal.pod"; \ + ${ECHO} "@unexec ${RMDIR} -p %D/$$sitearch 2>/dev/null || ${TRUE}"; \ + ${CAT} ${PKGDIR}/PLIST; \ + ${ECHO} "@comment The following lines are automatically generated"; \ + ${ECHO} "@comment from the installed .packlist files."; \ + ) > ${PLIST_SRC}; \ + ( ${ECHO} "$$packlist" && ${CAT} $$packlist ) \ + | ${SED} ${PLIST_FILE_SED} | ${SORT} -u >> ${PLIST_SRC}; \ + ( ${ECHO} "$$packlist" && ${CAT} $$packlist ) \ + | ${SED} ${PLIST_DIR_SED} | ${SORT} -ur >> ${PLIST_SRC} -.include "../../lang/perl5/module.mk" .include "../../mk/bsd.pkg.mk" diff --git a/lang/perl58/PLIST b/lang/perl58/PLIST index b6dddf103b2..72c35dad6bb 100644 --- a/lang/perl58/PLIST +++ b/lang/perl58/PLIST @@ -1,6 +1,5 @@ -@comment $NetBSD: PLIST,v 1.9 2004/12/10 04:27:39 jlam Exp $ -@unexec ${RM} -f %D/${PERL5_SITEARCH}/perllocal.pod -@unexec ${RMDIR} -p %D/${PERL5_SITEARCH} 2>/dev/null || ${TRUE} +@comment $NetBSD: PLIST,v 1.10 2004/12/10 06:01:08 jlam Exp $ @unexec ${RMDIR} -p %D/${PERL5_SITEPERL}/man/man3 2>/dev/null || ${TRUE} @unexec ${RMDIR} -p %D/${PERL5_SITEPERL}/man 2>/dev/null || ${TRUE} @unexec ${RMDIR} -p %D/${PERL5_SITEPERL} 2>/dev/null || ${TRUE} +@unexec ${RMDIR} -p %D/${PERL5_SITELIB} 2>/dev/null || ${TRUE} |