2008-10-03 14:32:26 +02:00
|
|
|
#
|
2008-10-02 01:38:12 +02:00
|
|
|
# This helper does the required steps to be able to build and install
|
|
|
|
# perl modules into the correct location.
|
|
|
|
#
|
|
|
|
# Required vars to be set by a template:
|
|
|
|
#
|
2011-10-24 14:12:09 +02:00
|
|
|
# build_style=perl-module
|
2008-10-02 01:38:12 +02:00
|
|
|
#
|
|
|
|
# Optionally if the module needs more directories to be configured other
|
2008-10-13 07:32:05 +02:00
|
|
|
# than $XBPS_BUILDDIR/$wrksrc, one can use (relative to $wrksrc):
|
2008-10-02 01:38:12 +02:00
|
|
|
#
|
2009-03-20 07:07:43 +01:00
|
|
|
# perl_configure_dirs="blob/bob foo/blah"
|
2008-10-02 01:38:12 +02:00
|
|
|
#
|
2011-10-24 14:12:09 +02:00
|
|
|
do_configure() {
|
|
|
|
local perlmkf
|
2008-10-02 01:38:12 +02:00
|
|
|
|
|
|
|
if [ -z "$perl_configure_dirs" ]; then
|
2009-04-20 02:26:38 +02:00
|
|
|
perlmkf="$wrksrc/Makefile.PL"
|
2008-10-02 01:38:12 +02:00
|
|
|
if [ ! -f $perlmkf ]; then
|
|
|
|
echo "*** ERROR couldn't find $perlmkf, aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2010-11-01 11:47:58 +01:00
|
|
|
cd $wrksrc && \
|
|
|
|
PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
|
|
|
|
${make_build_args} INSTALLDIRS=vendor
|
2008-10-02 01:38:12 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
for i in "$perl_configure_dirs"; do
|
2009-04-20 02:26:38 +02:00
|
|
|
perlmkf="$wrksrc/$i/Makefile.PL"
|
2008-10-02 01:38:12 +02:00
|
|
|
if [ -f $perlmkf ]; then
|
2010-11-01 11:47:58 +01:00
|
|
|
cd $wrksrc/$i && PERL_MM_USE_DEFAULT=1 \
|
|
|
|
perl Makefile.PL ${make_build_args} \
|
|
|
|
INSTALLDIRS=vendor
|
2008-10-02 01:38:12 +02:00
|
|
|
else
|
|
|
|
echo -n "*** ERROR: couldn't find $perlmkf"
|
|
|
|
echo ", aborting ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
2011-10-24 14:12:09 +02:00
|
|
|
|
|
|
|
# Perl modules use standard make(1) to install.
|
|
|
|
. ${XBPS_HELPERSDIR}/gnu-makefile.sh
|