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
|
|
|
|
|
2009-04-20 00:26:38 +00:00
|
|
|
cd $wrksrc && perl Makefile.PL ${make_build_args}
|
2008-10-01 23:38:12 +00:00
|
|
|
if [ "$?" -ne 0 ]; then
|
|
|
|
echo "*** ERROR building perl module for $pkgname ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
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
|
2009-04-20 00:26:38 +00:00
|
|
|
cd $wrksrc/$i && perl Makefile.PL ${make_build_args}
|
2008-10-01 23:38:12 +00:00
|
|
|
[ "$?" -ne 0 ] && exit 1
|
|
|
|
else
|
|
|
|
echo -n "*** ERROR: couldn't find $perlmkf"
|
|
|
|
echo ", aborting ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|