File: fix-cunit.sh

package info (click to toggle)
libcoap3 4.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,924 kB
  • sloc: ansic: 59,968; makefile: 1,280; sh: 938; python: 6
file content (15 lines) | stat: -rwxr-xr-x 592 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh

# only continue if `pkgconfig cunit` fails
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)
fi

# output location of generated cunit.pc
echo PKG_CONFIG_PATH=`pwd`