Date: Mon, 26 Mar 2007 14:21:16 -0700 From: "Ian A. Tegebo" <yontege@rescomp.berkeley.edu> To: freebsd-questions@freebsd.org Subject: Adding paths to @INC in perl Message-ID: <20070326212116.GC25691@rescomp.berkeley.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070326212116.GC25691>