freebsd-ports/lang/perl5/pkg-install
Joe Marcus Clarke 3302f9e6ed Respect OSVERSION in the pkg-install script. This allows package building
tinderboxes to do the righ thing reagrding Perl in a chroot/jail environment
regardless of the underlying host OS version.

Approved by:	perl (tobez)
2004-03-05 21:38:03 +00:00

26 lines
534 B
Bash

#!/bin/sh
if [ "$2" != POST-INSTALL ] ; then
exit 0
fi
INCLUDEDIR=/usr/include
install -d ${PKG_PREFIX}/lib/perl5/site_perl/5.6.1/mach
cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h
if [ -z "${OSVERSION}" ]; then
if [ -f /sbin/sysctl -a -x /sbin/sysctl ] ; then
osreldate=`/sbin/sysctl -n kern.osreldate`
else
osreldate=`/usr/sbin/sysctl -n kern.osreldate`
fi
else
osreldate=${OSVERSION}
fi
if [ $osreldate -ge 500043 -a $osreldate -lt 502100 ] ; then
${PKG_PREFIX}/bin/use.perl port
fi
exit 0