diff options
Diffstat (limited to 'Build/source/utils/biber')
-rw-r--r-- | Build/source/utils/biber/ChangeLog | 6 | ||||
-rwxr-xr-x | Build/source/utils/biber/configure | 30 | ||||
-rw-r--r-- | Build/source/utils/biber/configure.ac | 30 |
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 |