2008-10-03 12:32:26 +00:00
|
|
|
#
|
2008-10-01 23:38:12 +00: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:
|
|
|
|
#
|
|
|
|
# build_style=perl_module
|
|
|
|
#
|
|
|
|
# Optionally if the module needs more directories to be configured other
|
2008-10-13 05:32:05 +00:00
|
|
|
# than $XBPS_BUILDDIR/$wrksrc, one can use (relative to $wrksrc):
|
2008-10-01 23:38:12 +00:00
|
|
|
#
|
2009-03-20 06:07:43 +00:00
|
|
|
# perl_configure_dirs="blob/bob foo/blah"
|
2008-10-01 23:38:12 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
perl_module_build()
|
|
|
|
{
|
|
|
|
local perlmkf=
|
|
|
|
|
|
|
|
if [ -z "$perl_configure_dirs" ]; then
|
2009-04-20 00:26:38 +00:00
|
|
|
perlmkf="$wrksrc/Makefile.PL"
|
2008-10-01 23:38:12 +00:00
|
|
|
if [ ! -f $perlmkf ]; then
|
|
|
|
echo "*** ERROR couldn't find $perlmkf, aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2010-11-01 10:47:58 +00:00
|
|
|
cd $wrksrc && \
|
|
|
|
PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
|
|
|
|
${make_build_args} INSTALLDIRS=vendor
|
2008-10-01 23:38:12 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
for i in "$perl_configure_dirs"; do
|
2009-04-20 00:26:38 +00:00
|
|
|
perlmkf="$wrksrc/$i/Makefile.PL"
|
2008-10-01 23:38:12 +00:00
|
|
|
if [ -f $perlmkf ]; then
|
2010-11-01 10:47:58 +00:00
|
|
|
cd $wrksrc/$i && PERL_MM_USE_DEFAULT=1 \
|
|
|
|
perl Makefile.PL ${make_build_args} \
|
|
|
|
INSTALLDIRS=vendor
|
2008-10-01 23:38:12 +00:00
|
|
|
else
|
|
|
|
echo -n "*** ERROR: couldn't find $perlmkf"
|
|
|
|
echo ", aborting ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|