summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-28 23:08:12 +0000
committerKarl Berry <karl@freefriends.org>2011-03-28 23:08:12 +0000
commit03775873b0e5e4ad16c41464c9c2b658be812323 (patch)
tree58d8bfe0ac7a492822001868626e8a56777233a6 /Build
parent1300ac09adb33d6453e4ab09d12238f277912cb7 (diff)
only install freebsd binary if current freebsd system is new enough
git-svn-id: svn://tug.org/texlive/trunk@21865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/biber/ChangeLog6
-rwxr-xr-xBuild/source/utils/biber/configure30
-rw-r--r--Build/source/utils/biber/configure.ac30
3 files changed, 64 insertions, 2 deletions
diff --git a/Build/source/utils/biber/ChangeLog b/Build/source/utils/biber/ChangeLog
index 4dc77968ab0..781cce94421 100644
--- a/Build/source/utils/biber/ChangeLog
+++ b/Build/source/utils/biber/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-29 Karl Berry <karl@tug.org>
+
+ * configure.ac: only install the freebsd binary if the current
+ freebsd system is new enough. From Nikola Lecic,
+ http://tug.org/pipermail/tlbuild/2011q1/001826.html.
+
2011-03-22 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Correctly distinguish `biber' and `biber.exe' on
diff --git a/Build/source/utils/biber/configure b/Build/source/utils/biber/configure
index 06f34ee1d1f..c3b56e3d6f7 100755
--- a/Build/source/utils/biber/configure
+++ b/Build/source/utils/biber/configure
@@ -3514,7 +3514,35 @@ biber_bin="bin/$TL_PLATFORM/biber"
if test -n "$ac_exeext" && test -r "$srcdir/$biber_bin$ac_exeext"; then
BIBER_BINARY="$biber_bin$ac_exeext"
elif test -r "$srcdir/$biber_bin"; then
- BIBER_BINARY="$biber_bin"
+ if echo "$TL_PLATFORM" | grep freebsd >/dev/null 2>&1; then
+
+ # on freebsd, we don't want to install the binary if the current
+ # version is too old. The standard way to do this is to look in
+ # sys/param.h. Use standard FreeBSD program locations since that's
+ # what they do.
+ : ${AWK=/usr/bin/awk}
+ : ${SYSCTL=/sbin/sysctl}
+ if test -n "$OSVERSION"; then
+ if test -r /usr/include/sys/param.h; then
+ OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\
+ </usr/include/sys/param.h`
+ elif test -r /usr/src/sys/sys/param.h; then
+ OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\
+ </usr/src/sys/sys/param.h`
+ else
+ OSVERSION=`${SYSCTL} -n kern.osreldate`
+ fi
+ fi
+ # check if freebsd os version is new enough.
+ if test "$OSVERSION" -ge 701000; then
+ BIBER_BINARY="$biber_bin"
+ else
+ BIBER_BINARY= # too old, skip it
+ fi
+ else
+ # not freebsd, just take it.
+ BIBER_BINARY="$biber_bin"
+ fi
else
BIBER_BINARY=
fi
diff --git a/Build/source/utils/biber/configure.ac b/Build/source/utils/biber/configure.ac
index 497e70e1d62..a8f01e2f23f 100644
--- a/Build/source/utils/biber/configure.ac
+++ b/Build/source/utils/biber/configure.ac
@@ -28,7 +28,35 @@ biber_bin="bin/$TL_PLATFORM/biber"
if test -n "$ac_exeext" && test -r "$srcdir/$biber_bin$ac_exeext"; then
BIBER_BINARY="$biber_bin$ac_exeext"
elif test -r "$srcdir/$biber_bin"; then
- BIBER_BINARY="$biber_bin"
+ if echo "$TL_PLATFORM" | grep freebsd >/dev/null 2>&1; then
+
+ # on freebsd, we don't want to install the binary if the current
+ # version is too old. The standard way to do this is to look in
+ # sys/param.h. Use standard FreeBSD program locations since that's
+ # what they do.
+ : ${AWK=/usr/bin/awk}
+ : ${SYSCTL=/sbin/sysctl}
+ if test -n "$OSVERSION"; then
+ if test -r /usr/include/sys/param.h; then
+ OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\
+ </usr/include/sys/param.h`
+ elif test -r /usr/src/sys/sys/param.h; then
+ OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\
+ </usr/src/sys/sys/param.h`
+ else
+ OSVERSION=`${SYSCTL} -n kern.osreldate`
+ fi
+ fi
+ # check if freebsd os version is new enough.
+ if test "$OSVERSION" -ge 701000; then
+ BIBER_BINARY="$biber_bin"
+ else
+ BIBER_BINARY= # too old, skip it
+ fi
+ else
+ # not freebsd, just take it.
+ BIBER_BINARY="$biber_bin"
+ fi
else
BIBER_BINARY=
fi