From 3302f9e6ed93063de24f2546723046ac8d6ebd9f Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Fri, 5 Mar 2004 21:38:03 +0000 Subject: 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) --- lang/perl5.8/pkg-install | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lang/perl5.8') diff --git a/lang/perl5.8/pkg-install b/lang/perl5.8/pkg-install index 62c87fadabfc..eb3fde91af87 100644 --- a/lang/perl5.8/pkg-install +++ b/lang/perl5.8/pkg-install @@ -9,10 +9,14 @@ INCLUDEDIR=/usr/include install -d ${PKG_PREFIX}/lib/perl5/site_perl/5.8.2/mach cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h -if [ -f /sbin/sysctl -a -x /sbin/sysctl ] ; then - osreldate=`/sbin/sysctl -n kern.osreldate` +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=`/usr/sbin/sysctl -n kern.osreldate` + osreldate=${OSVERSION} fi if [ $osreldate -ge 502100 ] ; then -- cgit v1.2.3