mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
7360591d8a
When installing with pkg_add(1), the ${SITE_PERL} directory was not created causing system headers not to be perlified and installed by h2ph. This made some things break in very mysterious ways. The pkg-install script used by pkg_add(1) doesn't know about the many special variables in bsd.port.mk, so it shouldn't try to rely on them. Noticed by: bento, kris Approved by: kris
23 lines
449 B
Bash
23 lines
449 B
Bash
#!/bin/sh
|
|
|
|
if [ "$2" != POST-INSTALL ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
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`
|
|
else
|
|
osreldate=`/usr/sbin/sysctl -n kern.osreldate`
|
|
fi
|
|
|
|
if [ $osreldate -ge 502100 ] ; then
|
|
${PKG_PREFIX}/bin/use.perl port
|
|
fi
|
|
|
|
exit 0
|