summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2005-07-14 13:07:31 +0000
committerArch Librarian <arch@canonical.com>2005-07-14 13:07:31 +0000
commit29afc67918972d43714dc271c5d5a8b32d2580e0 (patch)
tree150c59991530f76eaddf17f95f5e1f4ed6e8b84e /check
parent306214992470533299fc54a4111324bbf20d275f (diff)
2005-06-27 Tollef Fog Heen <tfheen@err.no>
Author: tfheen Date: 2005-06-27 19:53:05 GMT 2005-06-27 Tollef Fog Heen <tfheen@err.no> All those Requires.private changes are thanks to James Henstridge. Thanks! * check/private-dep.pc, check/public-dep.pc, check/requires-test.pc: New files, data for the check-requires-private test. * check/check-requires-private: New test to check for Requires.private support. * check/Makefile.am (EXTRA_DIST, TESTS): Add Requires.private test. * pkg.h (struct _Package): Add requires_private * pkg.c (get_requires_private, fill_list_single_package) (fill_list, verify_package, verify_package, get_merged) (get_merged_from_back, get_multi_merged) (get_multi_merged_from_back, package_get_l_libs) (packages_get_l_libs, package_get_L_libs, packages_get_L_libs) (package_get_other_libs, packages_get_other_libs) (package_get_I_cflags, packages_get_I_cflags) (package_get_other_cflags, packages_get_other_cflags): Handle private requires and cascading changes. * parse.c (parse_requires_private, parse_conflicts) (parse_package_file): Handle Requires.private
Diffstat (limited to 'check')
-rw-r--r--check/Makefile.am8
-rwxr-xr-xcheck/check-requires-private27
-rw-r--r--check/private-dep.pc6
-rw-r--r--check/public-dep.pc6
-rw-r--r--check/requires-test.pc8
5 files changed, 53 insertions, 2 deletions
diff --git a/check/Makefile.am b/check/Makefile.am
index 94655f6..e2c15d9 100644
--- a/check/Makefile.am
+++ b/check/Makefile.am
@@ -1,3 +1,7 @@
-TESTS = check-cflags check-libs check-define-variable check-libs-private
-EXTRA_DIST = $(TESTS) common simple.pc
+TESTS = check-cflags check-libs check-define-variable \
+ check-libs-private check-requires-private
+
+EXTRA_DIST = $(TESTS) common simple.pc requires-test.pc public-dep.pc \
+ private-dep.pc
+
diff --git a/check/check-requires-private b/check/check-requires-private
new file mode 100755
index 0000000..744d790
--- /dev/null
+++ b/check/check-requires-private
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# expect cflags from requires-test and public-dep
+ARGS="--cflags requires-test"
+RESULT="-I/requires-test/include -I/public-dep/include"
+run_test
+
+# still expect those cflags for static linking case
+ARGS="--static --cflags requires-test"
+RESULT="-I/requires-test/include -I/public-dep/include"
+run_test
+
+# expect libs for just requires-test and public-dep
+ARGS="--libs requires-test"
+RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
+run_test
+
+# expect libs for requires-test, public-dep and private-dep in static case
+ARGS="--static --libs requires-test"
+RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib -lrequires-test -lprivate-dep -lpublic-dep"
+run_test
+
+
diff --git a/check/private-dep.pc b/check/private-dep.pc
new file mode 100644
index 0000000..cb40139
--- /dev/null
+++ b/check/private-dep.pc
@@ -0,0 +1,6 @@
+Name: Requires test package
+Description: Dummy pkgconfig test package for testing Requires/Requires.private
+Version: 1.0.0
+Libs: -L/private-dep/lib -lprivate-dep
+Cflags: -I/private-dep/include
+
diff --git a/check/public-dep.pc b/check/public-dep.pc
new file mode 100644
index 0000000..7350e5d
--- /dev/null
+++ b/check/public-dep.pc
@@ -0,0 +1,6 @@
+Name: Requires test package
+Description: Dummy pkgconfig test package for testing Requires/Requires.private
+Version: 1.0.0
+Libs: -L/public-dep/lib -lpublic-dep
+Cflags: -I/public-dep/include
+
diff --git a/check/requires-test.pc b/check/requires-test.pc
new file mode 100644
index 0000000..ed836cf
--- /dev/null
+++ b/check/requires-test.pc
@@ -0,0 +1,8 @@
+Name: Requires test package
+Description: Dummy pkgconfig test package for testing Requires/Requires.private
+Version: 1.0.0
+Requires: public-dep
+Requires.private: private-dep
+Libs: -L/requires-test/lib -lrequires-test
+Cflags: -I/requires-test/include
+