File: libpeas-dev

package info (click to toggle)
libpeas 1.36.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,692 kB
  • sloc: ansic: 12,266; python: 206; sh: 80; xml: 44; makefile: 28; javascript: 13
file content (52 lines) | stat: -rwxr-xr-x 1,140 bytes parent folder | download | duplicates (8)
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
#!/bin/sh

set -eux

cd "$AUTOPKGTEST_TMP"

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

cat > peas.c <<'EOF'
#include <glib-object.h>
#include <libpeas/peas.h>

int main (int argc, char *argv[])
{
    PeasEngine *engine = peas_engine_new ();

    g_assert_nonnull (engine);
    peas_engine_enable_loader (engine, "python3");
    g_object_unref (engine);
    return 0;
}
EOF

# Deliberately word-splitting, that's how pkg-config works:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o peas peas.c $("${CROSS_COMPILE}pkg-config" --cflags --libs libpeas-1.0)
test -x peas
G_DEBUG=fatal_warnings,fatal_criticals ./peas

cat > gtk.c <<'EOF'
#include <glib-object.h>
#include <libpeas-gtk/peas-gtk.h>

int main (int argc, char *argv[])
{
    GType type = peas_gtk_plugin_manager_get_type ();

    g_assert_cmpuint (type, !=, G_TYPE_INVALID);
    return 0;
}
EOF

# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o gtk gtk.c $("${CROSS_COMPILE}pkg-config" --cflags --libs libpeas-gtk-1.0)
test -x gtk
G_DEBUG=fatal_warnings,fatal_criticals ./gtk

echo "# everything seems OK"