1
0

initial import from Debian

version: 2.45-4 (UNRELEASED)
commit: bf4f75f17a4f370adc9bf9feca09710ce76ecc63
This commit is contained in:
2025-08-11 12:46:32 +03:00
commit 8c29d0a2c2
75 changed files with 19903 additions and 0 deletions

21
debian/tests/build vendored Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
set -e
CPUS=$(getconf _NPROCESSORS_ONLN)
case "$CPUS" in
[0-9]|[0-9][0-9]|[0-9][0-9][0-9]) ;;
*) CPUS=1
esac
if [ -n "${DEB_HOST_ARCH:-}" ]; then
CROSS="-a$DEB_HOST_ARCH"
else
CROSS=
fi
echo "Memory on this machine:"
egrep '^(Mem|Swap)' /proc/meminfo || true
set -x
DEB_BUILD_OPTIONS="parallel=$CPUS nohppa nomult nocross" dpkg-buildpackage -d -B --no-sign $CROSS

19
debian/tests/control vendored Normal file
View File

@@ -0,0 +1,19 @@
Tests: build
# this doesn't work well, without building -hppa, -multiarch and -cross packages
#Depends: build-essential
#Restrictions: build-needed
Depends: build-essential,
fakeroot,
autoconf (>= 2.64),
bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, dwz, debugedit (>= 4.16),
python3:any, file, xz-utils, lsb-release, zlib1g-dev, procps, libstdc++-dev,
libjansson-dev, pkg-config,
default-jdk-headless [amd64 arm64 i386 riscv64 x32],
# build process emits warnings on stderr
Restrictions: allow-stderr
Tests: libc-link
Depends: build-essential
Tests: shlib-build
Depends: build-essential

29
debian/tests/libc-link vendored Normal file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
# autopkgtest check: Build and run a simple program against libc, to verify
# basic binutils compile-time and run-time linking functionality.
#
# (C) 2012 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > libctest.c
#include <string.h>
#include <assert.h>
int main()
{
assert (1 > 0);
assert (strcmp ("hello", "hello") == 0);
return 0;
}
EOF
gcc -o libctest libctest.c
echo "build: OK"
[ -x libctest ]
./libctest
echo "run: OK"

44
debian/tests/shlib-build vendored Normal file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
# autopkgtest check: Build and link against a simple shared library, to test
# basic binutils compile-time and run-time linking functionality.
#
# (C) 2012 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > testlib.c
int ultimate_answer()
{
return 42;
}
EOF
gcc -Wall -Werror -shared -o libultimate.so testlib.c
echo "library build: OK"
# should export the symbol
nm -D libultimate.so | grep -q 'T ultimate_answer'
# link it against a program
cat <<EOF > testprog.c
#include <assert.h>
int ultimate_answer();
int main()
{
assert (ultimate_answer() == 42);
return 0;
}
EOF
gcc -Wall -Werror -L . -o testprog testprog.c -lultimate
echo "program build: OK"
[ -x testprog ]
LD_LIBRARY_PATH=. ./testprog
echo "run: OK"