mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 00:45:32 +00:00
Also removes the temporary libkeymancore/libkmnkbp hack that we put in for packaging GHA. Closes #9733.
30 lines
778 B
Bash
30 lines
778 B
Bash
#!/bin/bash
|
|
# autopkgtest check: Build a program against libkeymancore-dev to verify that the
|
|
# headers and pkg-config file are included and installed correctly.
|
|
# cf https://github.com/keymanapp/keyman/issues/7490
|
|
|
|
set -e
|
|
|
|
WORKDIR=$(mktemp -d)
|
|
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
|
|
cd "$WORKDIR"
|
|
|
|
# Test all include files are available
|
|
cat <<EOF > keymantest.c
|
|
#include <keyman/keyman_core_api.h>
|
|
km_core_context* c;
|
|
EOF
|
|
|
|
# shellcheck disable=SC2046
|
|
gcc -c keymantest.c $(pkg-config --cflags --libs keyman_core)
|
|
echo "build 1: OK"
|
|
|
|
# Test pkg-config file - include without path
|
|
cat <<EOF > keymantest.c
|
|
#include <keyman_core_api.h>
|
|
km_core_context* c;
|
|
EOF
|
|
|
|
# shellcheck disable=SC2046
|
|
gcc -c keymantest.c $(pkg-config --cflags --libs keyman_core)
|
|
echo "build 2: OK"
|