File: build

package info (click to toggle)
at-spi2-core 2.46.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 5,972 kB
  • sloc: ansic: 43,437; xml: 1,572; python: 243; sh: 239; makefile: 20
file content (34 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# autopkgtest check: Build and run a program against atk1.0-dev, to verify that the
# headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# Author: Daniel Kessel <d.kessel@gmx.de>

set -e

WORKDIR=$AUTOPKGTEST_TMP
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > atk1.0-dev_test.c
#include <atk-1.0/atk/atk.h>

int main()
{
    if (NULL == atk_get_version()) {
	return 1;
    } else {
	return 0;
    }
}
EOF

if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
else
    CROSS_COMPILE=
fi
${CROSS_COMPILE}gcc -Wall -Werror -o atk1.0-dev_test atk1.0-dev_test.c `${CROSS_COMPILE}pkg-config --cflags --libs atk`
echo "build: OK"
[ -x atk1.0-dev_test ]
./atk1.0-dev_test
echo "run: OK"