Dear CppUnit developers,
Two debian users have recently requested that cppunit provide a
pkg-config file. Roger Leigh provided a patch to CppUnit 1.10.2
to do just that (attached). See http://bugs.debian.org/345925
for full details.
Regards,
-Steve
P.S. I've applied the patch to Debian's cppunit package.
On Wed, Jan 04, 2006 at 03:54:48PM +0000, Roger Leigh wrote:
> I was just about to file a bug about this myself. I've created a
> patch to generate a cppunit.pc pkg-config datafile, and also install
> and package it.
>
> Steve, I would be grateful if you could forward this upstream as well,
> whether or not you patch the Debianised source.
>
> One consideration is that I added @LIBADD_DL@ to Libs.private. For
> dynamic linking this is never required (libcppunit is already linked
> with it), but for static linking is useless because libdl is
> intimately tied to ld.so, so won't work for static linking in any
> case. This means the current cppunit-config behaviour is also the
> same; it's just something to ponder.
--- cppunit-1.10.2.original/configure.in 2004-06-18 12:20:03.000000000
+0100
+++ cppunit-1.10.2/configure.in 2006-01-04 15:20:37.024797042 +0000
@@ -115,7 +115,8 @@
AC_OUTPUT([
- Makefile
+ Makefile
+ cppunit.pc
cppunit.spec
cppunit-config
src/Makefile
--- cppunit-1.10.2.original/cppunit.pc.in 1970-01-01 01:00:00.000000000
+0100
+++ cppunit-1.10.2/cppunit.pc.in 2006-01-04 15:19:50.623422223 +0000
@@ -0,0 +1,11 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+Name: CppUnit
+Description: The C++ Unit Test Library
+Version: @CPPUNIT_VERSION@
+Libs: -L${libdir} -lcppunit
+Libs.private: @LIBADD_DL@
+Cflags: -I${includedir}
--- cppunit-1.10.2.original/debian/rules 2006-01-04 15:44:21.297958539
+0000
+++ cppunit-1.10.2/debian/rules 2006-01-04 15:41:38.115103672 +0000
@@ -61,6 +61,7 @@
dh_install -plibcppunit-dev lib/lib*.so usr/lib
dh_install -plibcppunit-dev --autodest debian/tmp/usr/lib/lib*.a
dh_install -plibcppunit-dev --autodest debian/tmp/usr/lib/lib*.la
+ dh_install -plibcppunit-dev --autodest debian/tmp/usr/lib/pkgconfig
dh_install -plibcppunit-dev --autodest debian/tmp/usr/include
dh_installman -plibcppunit-dev debian/tmp/usr/share/man/man*/*
--- cppunit-1.10.2.original/Makefile.am 2004-02-18 21:36:41.000000000 +0000
+++ cppunit-1.10.2/Makefile.am 2006-01-04 15:21:54.663960890 +0000
@@ -3,6 +3,9 @@
SUBDIRS = src include examples doc
+pkgconfigdatadir = $(libdir)/pkgconfig
+
+pkgconfigdata_DATA = cppunit.pc
bin_SCRIPTS = cppunit-config
man_MANS = cppunit-config.1