Adding paths to @INC in perl
Ian A. Tegebo
yontege at rescomp.berkeley.edu
Mon Mar 26 21:45:14 UTC 2007
I've found several methods for adding directories to @INC in perl:
www.ncode.ch/papers/Perl-Library-Mechanics.pdf
I was hoping to find a KNOB, or something I could put in pkgtools.conf
so that my custom library path gets included in perl's @INC. I was
hoping -Dusesitecustomize would have not required a patch to the port's
Makefile but this didn't seem to be the case.
I'm using -Dotherlibdirs now:
==============================================================
--- Makefile-perl Sat Feb 10 13:11:20 2007
+++ Makefile-perl-rc Sat Feb 10 13:10:56 2007
@@ -121,6 +121,10 @@
.endif
MAN3PREFIX= ${TARGETDIR}/lib/perl5/${PERL_VER}/perl
+.if defined(WITH_LIBDIRS)
+CONFIGURE_ARGS+= -Dotherlibdirs=${WITH_LIBDIRS}
+.endif
+
test:
@(cd ${WRKSRC}; make test)
@@ -145,6 +149,7 @@
@${ECHO} " WITHOUT_PERL_64BITINT=yes Disable 64 bit integers"
@${ECHO} " (affects only 32-bit platforms)."
@${ECHO} " WITH_THREADS=yes Build threaded perl."
+ @${ECHO} " WITH_LIBDIRS=PATH:.. Set the otherlibdirs configure arguments."
@${ECHO} " ENABLE_SUIDPERL=yes Also build set-user-id suidperl binary."
@${ECHO} ""
==============================================================
Is there a better way to do this? If not, should I submit this patch to the
port maintainer?
--
Ian Tegebo
More information about the freebsd-questions
mailing list