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:
|
|
|
|
#
|
|
|
|
# build_style=perl_module
|
|
|
|
#
|
|
|
|
# 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
|
|
|
#
|
|
|
|
|
|
|
|
perl_module_build()
|
|
|
|
{
|
|
|
|
local perlmkf=
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2009-04-20 02:26:38 +02:00
|
|
|
cd $wrksrc && perl Makefile.PL ${make_build_args}
|
2008-10-02 01:38:12 +02: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 02:26:38 +02:00
|
|
|
perlmkf="$wrksrc/$i/Makefile.PL"
|
2008-10-02 01:38:12 +02:00
|
|
|
if [ -f $perlmkf ]; then
|
2009-04-20 02:26:38 +02:00
|
|
|
cd $wrksrc/$i && perl Makefile.PL ${make_build_args}
|
2008-10-02 01:38:12 +02:00
|
|
|
[ "$?" -ne 0 ] && exit 1
|
|
|
|
else
|
|
|
|
echo -n "*** ERROR: couldn't find $perlmkf"
|
|
|
|
echo ", aborting ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|