Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jul 2000 10:48:53 +0200
From:      Johann Visagie <wjv@cityip.co.za>
To:        ports@freebsd.org
Subject:   How do I make a perlmod port obey ${PREFIX}?
Message-ID:  <20000706104852.E1434@fling.sanbi.ac.za>

next in thread | raw e-mail | index | archive | help
Note:  I'm no particular Perl junkie, and my knowledge of the perlmod
installation process is somewhat sketchy.  I usually just use the port or, if
there is none, the CPAN(3) module to install perlmods.

However, I'm now attempting to create ports for some of the perl modules I
find myself using often.  According to the README etc. files of some of these
modules, the base dir for the installation can be specified during the
Makefile making process using a PREFIX argument, like so:

perl Makefile.PL PREFIX=/where/ever

If this is true it is good news, since it means the perlmod port can be made
to honour ${PREFIX} by writing the do-configure target in the port Makefile
as something like:

do-configure:
	@ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} Makefile.PL \
	PREFIX=${PREFIX}

However, with the default Perl 5.005_03 on my 3.5-STABLE box, when I run
Makefile.PL with the PREFIX argument for a perlmod I get a Makefile
containing these lines, amongst others:

PREFIX = /where/ever
INSTALLSITELIB = /usr/local/lib/perl5/site_perl/5.005
INSTALLSITEARCH = /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
INSTALLBIN = $(PREFIX)/bin
INSTALLSCRIPT = $(PREFIX)/bin
SITELIBEXP = /usr/local/lib/perl5/site_perl/5.005
SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.005/i386-freebsd

... which means that the bulk of the module still goes to sit under the
/usr/local hierarchy, since (for instance) INSTALLSITELIB explicitly states
the path instead of being $(PREFIX)/lib/perl5/site_perl/5.005

Is this correct?  Where do the perlmod installation process get these
defaults from?  Would I break things if I manually set INSTALLSITELIB etc. in
the port Makefile's do-configure target?

I note that none (!) of the existing perlmod ports even try to enforce
${PREFIX}.  What am I missing?

Thanks,
-- Johann


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?20000706104852.E1434>