File: libgimp-3.0-dev

package info (click to toggle)
gimp 3.0.4-6.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 210,548 kB
  • sloc: ansic: 842,405; lisp: 10,761; python: 10,318; cpp: 7,238; perl: 4,355; sh: 1,043; xml: 963; yacc: 609; lex: 348; javascript: 150; makefile: 43
file content (81 lines) | stat: -rwxr-xr-x 1,611 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
# autopkgtest check: Build and run a program against libgimp, to verify
# that the headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# (C) 2018-2020 Simon McVittie
# Authors: Martin Pitt, Simon McVittie

set -eux

WORKDIR=$(mktemp -d)
export XDG_RUNTIME_DIR="$WORKDIR"
trap 'rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"

if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
    CROSS_COMPILE="${DEB_HOST_GNU_TYPE}-"
else
    CROSS_COMPILE=
fi

cat <<'EOF' > gimp-3.0.c
#include <libgimp/gimp.h>

#undef NDEBUG
#include <assert.h>

int main(void)
{
    const char *dir = gimp_directory ();
    assert(dir != NULL);
    return 0;
}
EOF

cat <<'EOF' > gimpthumb-3.0.c
/* TODO: shouldn't be necessary */
#include <glib.h>
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

#include <libgimpthumb/gimpthumb.h>

#undef NDEBUG
#include <assert.h>

int main(void)
{
    assert(GIMP_TYPE_THUMBNAIL != G_TYPE_INVALID);
    return 0;
}
EOF

cat <<'EOF' > gimpui-3.0.c
/* TODO: shouldn't be necessary */
#include <libgimp/gimp.h>

#include <libgimp/gimpui.h>

#undef NDEBUG
#include <assert.h>

int main(void)
{
    assert(GIMP_TYPE_ASPECT_PREVIEW != G_TYPE_INVALID);
    return 0;
}
EOF

for lib in \
    gimp-3.0 \
    gimpthumb-3.0 \
    gimpui-3.0 \
; do
    # Deliberately word-splitting pkg-config's output:
    # shellcheck disable=SC2046
    "${CROSS_COMPILE}gcc" -o "${lib}-test" "${lib}.c" $("${CROSS_COMPILE}pkg-config" --cflags --libs "${lib}")
    echo "build ($lib): OK"
    [ -x "${lib}-test" ]
    xvfb-run -a "./${lib}-test"
    echo "run ($lib): OK"
done