scripts/build.sh: re-enable pkg-config fix for CUnit

The Trusty build environment comes with a pkg-config file for CUnit
which lacks a version number and has a syntax error. The build script
now calls scripts/fix-cunit.sh to create a fixed version of the
existing cunit.pc file and point the configure script to this file.
This commit is contained in:
Olaf Bergmann committed 2016-10-31 13:39:33 +01:00
1 parent 87bc3f841a
commit 5a2d68f145
2 files changed
+4 -5

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
#! /bin/sh
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
scripts/fix-cunit.sh
WITH_TESTS=--enable-tests
WITH_TESTS="`scripts/fix-cunit.sh` --enable-tests"
test -f `pwd`/cunit.pc && echo cat `pwd`/cunit.pc
fi
config() {
+2 -3
View File
@@ -1,16 +1,15 @@
#! /bin/sh
# only continue if `pkgconfig cunit` fails
pkg-config cunit && exit 0
pkg-config cunit 2>/dev/null && exit 0
# Check if the system has a cunit.pc.
# If not, exit with success (the configure script will raise
# a more descriptive error).
CUNIT_PC=`dpkg -L libcunit1-dev 2>/dev/null|grep cunit.pc`
if test "x$CUNIT_PC" != "x"; then
grep -q Version: $CUNIT_PC || (dpkg -l|sed -ne 's/^ii\s\+libcunit1-dev\s\+\([0-9]\+.[0-9]\+-[0-9]\+\).*$/Version: \1/p; T; q'|cat - $CUNIT_PC |sed -e 's/={exec_prefix/=${exec_prefix/' `pwd`/cunit.pc)
grep -q Version: $CUNIT_PC || (dpkg -l|sed -ne 's/^ii\s\+libcunit1-dev\s\+\([0-9]\+.[0-9]\+-[0-9]\+\).*$/Version: \1/p; T; q'|cat - $CUNIT_PC |sed -e 's/={exec_prefix/=${exec_prefix/' >`pwd`/cunit.pc)
fi
# output location of generated cunit.pc
echo PKG_CONFIG_PATH=`pwd`
cat `pwd`/cunit.pc