diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/files/pkgconfig | |
parent | Initial commit. (diff) | |
download | lintian-upstream.tar.xz lintian-upstream.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/files/pkgconfig')
17 files changed, 196 insertions, 0 deletions
diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/control.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/control.in new file mode 100644 index 0000000..77950ef --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/control.in @@ -0,0 +1,29 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: pkgconfig-all +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlib:Depends} +Description: Contains test file for pkgconfig arch all + This is a test package designed to exercise some feature or tag of + Lintian for arch all pkgconfig files. + It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: pkgconfig-any +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlib:Depends} +Description: Contains test file for pkgconfig arch any + This is a test package designed to exercise some feature or tag of + Lintian for arch any pkgconfig files. + It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-all.install b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-all.install new file mode 100644 index 0000000..6127277 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-all.install @@ -0,0 +1 @@ +usr/lib/pkgconfig/*.pc diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-any.install b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-any.install new file mode 100644 index 0000000..550fc5b --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/pkgconfig-any.install @@ -0,0 +1 @@ +usr/lib/*-*-*/pkgconfig/*.pc diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/rules b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/rules new file mode 100644 index 0000000..81bade2 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +DESTDIR = debian/pkgconfig-any/usr/lib + +%: + dh $@ + +override_dh_install: + dh_install + mkdir -p $(DESTDIR) + touch $(DESTDIR)/libstaticlib.a + +override_dh_strip: diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/fill-values b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/fill-values new file mode 100644 index 0000000..9a97d95 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-pkgconfig +Description: Check for detection of pkgconfig problem diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/Makefile b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/Makefile new file mode 100644 index 0000000..796e1bc --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/Makefile @@ -0,0 +1,21 @@ +ARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +ifeq ($(ARCH), x86_64-linux-gnu) + ARCH_CROSS=i386-linux-gnu +else + ARCH_CROSS=x86_64-linux-gnu +endif + +all: + find generated -name '*.pc.in' -exec sh -c 'echo "build" {} && cat {} | sed s/\$$\(ARCH\)/$(ARCH)/g | sed s/\$$\(ARCH_CROSS\)/$(ARCH_CROSS)/g > `echo {} | sed s/\.pc\.in$$/\.pc/g`' \; + +install: + install -d $(DESTDIR)/usr/lib/pkgconfig/ + install -d $(DESTDIR)/usr/lib/$(ARCH)/pkgconfig/ + install -m 644 indep-*.pc $(DESTDIR)/usr/lib/pkgconfig/ + install -m 644 generated/arch-*.pc $(DESTDIR)/usr/lib/$(ARCH)/pkgconfig/ + install -m 644 generated/indep-*.pc $(DESTDIR)/usr/lib/pkgconfig/ + +clean distclean: + rm -f generated/*.pc + +check test: diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in new file mode 100644 index 0000000..452d3a2 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in @@ -0,0 +1,6 @@ +Name: arch-cross +Description: A library that include cross architecture +Requires: +Version: 3.1.3 +Libs: +Cflags: -I/usr/include/$(ARCH_CROSS)/someconfig.h diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in new file mode 100644 index 0000000..7c3bd9e --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in @@ -0,0 +1,6 @@ +Name: indep-good +Description: A library good +Requires: +Version: 3.1.3 +Libs: +Cflags: -I/usr/include/indep-good diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in new file mode 100644 index 0000000..c847fe3 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in @@ -0,0 +1,9 @@ +Name: arch-include-arch +Description: A library that include some arch dir +Requires: +Version: 3.1.3 +Libs: -ldoesnotexist -lotherdoesnotexist -Lfalse-positive-linux-gnu -lstaticlib +Cflags: -I/usr/include/$(ARCH)/arch-include-arch +libdir=/usr/lib/$(ARCH) +# no new line +Libs: -L/usr/lib/$(ARCH) diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in new file mode 100644 index 0000000..3325139 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in @@ -0,0 +1,6 @@ +Name: indep-include-arch-1 +Description: A library that include some arch dir +Requires: +Version: 3.1.3 +Libs: +Cflags: -I/usr/include/$(ARCH)/indep-include-arch diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in new file mode 100644 index 0000000..36dd09b --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in @@ -0,0 +1,7 @@ +Name: indep-include-arch-2 +Description: A library that include some arch dir +Requires: +Version: 3.1.3 +Libs: +# no new line at end +Cflags: -I/usr/include/$(ARCH)
\ No newline at end of file diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in new file mode 100644 index 0000000..2a73e27 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in @@ -0,0 +1,6 @@ +Name: indep-include-arch-2 +Description: A library that include some arch dir +Requires: +Version: 3.1.3 +Libs: +Cflags: -I/usr/include/$(ARCH) -I/usr/include diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-good.pc b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-good.pc new file mode 100644 index 0000000..7c3bd9e --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-good.pc @@ -0,0 +1,6 @@ +Name: indep-good +Description: A library good +Requires: +Version: 3.1.3 +Libs: +Cflags: -I/usr/include/indep-good diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-really-bad.pc b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-really-bad.pc new file mode 100644 index 0000000..98b3fa3 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/build-spec/orig/indep-really-bad.pc @@ -0,0 +1,38 @@ +Name: indep-good +Description: A library with ugly flags +Requires: +Version: 3.1.3 +Libs: +# a comment removed -L/usr/local/lib/somewhere \ +SOMEFLAGS=-I/var/cache/pbuilder/build/ +Cflags: \ + -I/usr/local/somewhere \ + -D__linux__ \ + -D__x86_64__ \ + -D__OSVERSION__=2\ + -g \ + -D_FORTIFY_SOURCE=2 \ + -O2 \ + -Wall \ + -fvisibility=hidden \ + -fPIE \ + -fstack-protector \ + --param=ssp-buffer-size=2 \ + -frounding-math \ + -lmath \ + -march=core2 \ + -DNDEBUG \ + -pedantic \ + -DNEW_STDCPP \ + -fno-check-new \ + -fno-inline \ + -Wl,z,relro \ + -pie \ + -fno-strict-aliasing -fwrapv -fexcess-precision=standard \ + -ffast-math -funsafe-math-optimizations -fsigned-zeros -fno-trapping-math -fassociative-math -freciprocal-math -fsignaling-math -fno-errno-math -ffp-contract -fassociative-math -ffinite-math-only \ + @SOME_FLAGS@ +#False positive +Fflags: \ + @SOME_FLAGS \ + @ + diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/desc b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/desc new file mode 100644 index 0000000..dfee390 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/desc @@ -0,0 +1,3 @@ +Testname: files-pkgconfig +Check: files/pkgconfig +Test-Architectures: amd64 diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/hints b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/hints new file mode 100644 index 0000000..a4e4585 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/hints @@ -0,0 +1,39 @@ +pkgconfig-any (binary): pkg-config-multi-arch-wrong-dir full text contains architecture specific dir i386-linux-gnu [usr/lib/x86_64-linux-gnu/pkgconfig/arch-cross.pc] +pkgconfig-all (binary): pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/indep-include-arch-3.pc] +pkgconfig-all (binary): pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/indep-include-arch-2.pc] +pkgconfig-all (binary): pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/indep-include-arch-1.pc] +pkgconfig-all (binary): pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/indep-good.pc] +pkgconfig-all (binary): pkg-config-multi-arch-wrong-dir full text contains architecture specific dir x86_64-linux-gnu [usr/lib/pkgconfig/indep-include-arch-3.pc] +pkgconfig-all (binary): pkg-config-multi-arch-wrong-dir full text contains architecture specific dir x86_64-linux-gnu [usr/lib/pkgconfig/indep-include-arch-2.pc] +pkgconfig-all (binary): pkg-config-multi-arch-wrong-dir full text contains architecture specific dir x86_64-linux-gnu [usr/lib/pkgconfig/indep-include-arch-1.pc] +pkgconfig-all (binary): pkg-config-bad-directive Cflags: -I/usr/local/somewhere -D__linux__ -D__x86_64__ -D__OSVERSION__=2 -g -D_FORTIFY_SOURCE=2 -O2 -Wall -fvisibility=hidden -fPIE -fstack-protector --param=ssp-buffer-size=2 -frounding-math -lmath [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive @SOME_FLAGS@ [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -pie [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -pedantic [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -march=core2 [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -g [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fwrapv [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fvisibility=hidden [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -funsafe-math-optimizations [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fstack-protector [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fsigned-zeros [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fno-strict-aliasing [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fno-inline [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fno-check-new [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -ffp-contract [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -ffinite-math-only [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fexcess-precision=standard [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fassociative-math [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -fPIE [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -Wl,z,relro [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -O2 [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -I/var/cache/pbuilder/build/ [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -I/usr/local/somewhere [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -D__x86_64__ [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -D__linux__ [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -D__OSVERSION__=2 [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -D_FORTIFY_SOURCE=2 [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -DNEW_STDCPP [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive -DNDEBUG [usr/lib/pkgconfig/indep-really-bad.pc] +pkgconfig-all (binary): pkg-config-bad-directive --param=ssp-buffer-size=2 [usr/lib/pkgconfig/indep-really-bad.pc] diff --git a/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/post-test b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/post-test new file mode 100644 index 0000000..a4059d0 --- /dev/null +++ b/t/recipes/checks/files/pkgconfig/files-pkgconfig/eval/post-test @@ -0,0 +1,2 @@ +s/full text contains architecture specific dir \S+$/full text contains architecture specific dir ARCH/ +s, usr/lib/[^/]+/pkgconfig/, usr/lib/ARCH/pkgconfig/, |