tag 868855 + patch thanks Hi, On Wed, Jul 19, 2017 at 12:36:01PM +0300, Adrian Bunk wrote: > make[6]: Entering directory '/build/1st/softhsm2-2.2.0/src/lib/crypto/test' > g++ -DHAVE_CONFIG_H -I. -I../../../.. -I./.. -I./../.. -I./../../common > -I./../../cryptoki_compat -I./../../data_mgr -I./../../object_store > -I./../../session_mgr -I./../../slot_mgr -I/usr/local/include `cppunit-config > --cflags` -Wdate-time -D_FORTIFY_SOURCE=2 -m64 -g -O2 > -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra > -fvisibility=hidden -c -o cryptotest.o cryptotest.cpp > /bin/bash: cppunit-config: command not found ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This the cause. cppunit 1.14 removed it. a pkg-config file is provided since ages and should be used. > AESTests.o: In function `AESTests::setUp()': > softhsm2_2.2.0-3/src/lib/crypto/test/AESTests.cpp:49: undefined reference to > `CppUnit::SourceLine::SourceLine(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, int)' > softhsm2_2.2.0-3/src/lib/crypto/test/AESTests.cpp:49: undefined reference to > `CppUnit::Message::Message(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)' > softhsm2_2.2.0-3/src/lib/crypto/test/AESTests.cpp:49: undefined reference to > `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine > const&)' > softhsm2_2.2.0-3/src/lib/crypto/test/AESTests.cpp:49: undefined reference to > `CppUnit::Message::~Message()' > ... And so here you don't have a -lcppunit thus FTBFS. Trivial patch attached. Regards, Rene
diff -Nru softhsm2-2.2.0/debian/changelog softhsm2-2.2.0/debian/changelog --- softhsm2-2.2.0/debian/changelog 2017-02-12 15:12:33.000000000 +0100 +++ softhsm2-2.2.0/debian/changelog 2017-07-19 15:30:41.000000000 +0200 @@ -1,3 +1,11 @@ +softhsm2 (2.2.0-3.1) unstable; urgency=medium + + * Non-maintainer upload. + + * use pkg-config instead of cppunit-config for cppunit (closes: #868855) + + -- Rene Engelhard <r...@debian.org> Wed, 19 Jul 2017 15:30:41 +0200 + softhsm2 (2.2.0-3) unstable; urgency=medium * Replace doc symlink with directory in transitional softhsm package diff -Nru softhsm2-2.2.0/debian/patches/cppuniit-pkg-config.diff softhsm2-2.2.0/debian/patches/cppuniit-pkg-config.diff --- softhsm2-2.2.0/debian/patches/cppuniit-pkg-config.diff 1970-01-01 01:00:00.000000000 +0100 +++ softhsm2-2.2.0/debian/patches/cppuniit-pkg-config.diff 2017-07-19 15:29:50.000000000 +0200 @@ -0,0 +1,154 @@ +--- softhsm2-2.2.0.orig/src/lib/crypto/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.am +@@ -32,7 +32,7 @@ cryptotest_SOURCES = cryptotest.cpp \ + + cryptotest_LDADD = ../../libsofthsm_convarch.la + +-cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = cryptotest + +--- softhsm2-2.2.0.orig/src/lib/crypto/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.in +@@ -578,7 +578,7 @@ cryptotest_SOURCES = cryptotest.cpp \ + randtest.c + + cryptotest_LDADD = ../../libsofthsm_convarch.la +-cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/data_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am +@@ -20,7 +20,7 @@ datamgrtest_SOURCES = datamgrtest.cpp \ + + datamgrtest_LDADD = ../../libsofthsm_convarch.la + +-datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = datamgrtest + +--- softhsm2-2.2.0.orig/src/lib/data_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in +@@ -545,7 +545,7 @@ datamgrtest_SOURCES = datamgrtest.cpp \ + SecureDataMgrTests.cpp + + datamgrtest_LDADD = ../../libsofthsm_convarch.la +-datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/handle_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am +@@ -18,7 +18,7 @@ handlemgrtest_SOURCES = handlemgrtest.c + + handlemgrtest_LDADD = ../../libsofthsm_convarch.la + +-handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = handlemgrtest + +--- softhsm2-2.2.0.orig/src/lib/handle_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in +@@ -543,7 +543,7 @@ handlemgrtest_SOURCES = handlemgrtest.cp + HandleManagerTests.cpp + + handlemgrtest_LDADD = ../../libsofthsm_convarch.la +-handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/object_store/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.am +@@ -32,7 +32,7 @@ endif + + objstoretest_LDADD = ../../libsofthsm_convarch.la + +-objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = objstoretest + +--- softhsm2-2.2.0.orig/src/lib/object_store/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.in +@@ -561,7 +561,7 @@ objstoretest_SOURCES = objstoretest.cpp + OSTokenTests.cpp ObjectStoreTests.cpp SessionObjectTests.cpp \ + SessionObjectStoreTests.cpp $(am__append_1) + objstoretest_LDADD = ../../libsofthsm_convarch.la +-objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/session_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am +@@ -18,7 +18,7 @@ sessionmgrtest_SOURCES = sessionmgrtest. + + sessionmgrtest_LDADD = ../../libsofthsm_convarch.la + +-sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = sessionmgrtest + +--- softhsm2-2.2.0.orig/src/lib/session_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in +@@ -543,7 +543,7 @@ sessionmgrtest_SOURCES = sessionmgrtest. + SessionManagerTests.cpp + + sessionmgrtest_LDADD = ../../libsofthsm_convarch.la +-sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/slot_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am +@@ -18,7 +18,7 @@ slotmgrtest_SOURCES = slotmgrtest.cpp \ + + slotmgrtest_LDADD = ../../libsofthsm_convarch.la + +-slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = slotmgrtest + +--- softhsm2-2.2.0.orig/src/lib/slot_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in +@@ -542,7 +542,7 @@ slotmgrtest_SOURCES = slotmgrtest.cpp \ + SlotManagerTests.cpp + + slotmgrtest_LDADD = ../../libsofthsm_convarch.la +-slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +--- softhsm2-2.2.0.orig/src/lib/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/test/Makefile.am +@@ -29,7 +29,7 @@ p11test_SOURCES = p11test.cpp \ + + p11test_LDADD = ../libsofthsm2.la + +-p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static ++p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread -static + + TESTS = p11test + +--- softhsm2-2.2.0.orig/src/lib/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/test/Makefile.in +@@ -561,7 +561,7 @@ p11test_SOURCES = p11test.cpp \ + ../common/osmutex.cpp + + p11test_LDADD = ../libsofthsm2.la +-p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static ++p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread -static + EXTRA_DIST = $(srcdir)/*.h \ + $(srcdir)/softhsm2-alt.conf.win32 \ + $(srcdir)/softhsm2.conf.win32 \ diff -Nru softhsm2-2.2.0/debian/patches/cppunit-pkg-config.diff softhsm2-2.2.0/debian/patches/cppunit-pkg-config.diff --- softhsm2-2.2.0/debian/patches/cppunit-pkg-config.diff 1970-01-01 01:00:00.000000000 +0100 +++ softhsm2-2.2.0/debian/patches/cppunit-pkg-config.diff 2017-07-19 15:30:31.000000000 +0200 @@ -0,0 +1,287 @@ +diff -u softhsm2-2.2.0/src/lib/crypto/test/Makefile.am softhsm2-2.2.0/src/lib/crypto/test/Makefile.am +--- softhsm2-2.2.0/src/lib/crypto/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = cryptotest + +@@ -32,7 +32,7 @@ + + cryptotest_LDADD = ../../libsofthsm_convarch.la + +-cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = cryptotest + +diff -u softhsm2-2.2.0/src/lib/crypto/test/Makefile.in softhsm2-2.2.0/src/lib/crypto/test/Makefile.in +--- softhsm2-2.2.0/src/lib/crypto/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.in +@@ -558,7 +558,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + cryptotest_SOURCES = cryptotest.cpp \ + AESTests.cpp \ +@@ -578,7 +578,7 @@ + randtest.c + + cryptotest_LDADD = ../../libsofthsm_convarch.la +-cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am +--- softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = datamgrtest + +@@ -20,7 +20,7 @@ + + datamgrtest_LDADD = ../../libsofthsm_convarch.la + +-datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = datamgrtest + +diff -u softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in +--- softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in +@@ -537,7 +537,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + datamgrtest_SOURCES = datamgrtest.cpp \ + ByteStringTests.cpp \ +@@ -545,7 +545,7 @@ + SecureDataMgrTests.cpp + + datamgrtest_LDADD = ../../libsofthsm_convarch.la +-datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am +--- softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../data_mgr \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = handlemgrtest + +@@ -18,7 +18,7 @@ + + handlemgrtest_LDADD = ../../libsofthsm_convarch.la + +-handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + + TESTS = handlemgrtest + +diff -u softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in +--- softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in +@@ -537,13 +537,13 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../data_mgr \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + handlemgrtest_SOURCES = handlemgrtest.cpp \ + HandleManagerTests.cpp + + handlemgrtest_LDADD = ../../libsofthsm_convarch.la +-handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` ++handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/object_store/test/Makefile.am softhsm2-2.2.0/src/lib/object_store/test/Makefile.am +--- softhsm2-2.2.0/src/lib/object_store/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = objstoretest + +@@ -32,7 +32,7 @@ + + objstoretest_LDADD = ../../libsofthsm_convarch.la + +-objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = objstoretest + +diff -u softhsm2-2.2.0/src/lib/object_store/test/Makefile.in softhsm2-2.2.0/src/lib/object_store/test/Makefile.in +--- softhsm2-2.2.0/src/lib/object_store/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.in +@@ -554,14 +554,14 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + objstoretest_SOURCES = objstoretest.cpp DirectoryTests.cpp \ + UUIDTests.cpp FileTests.cpp ObjectFileTests.cpp \ + OSTokenTests.cpp ObjectStoreTests.cpp SessionObjectTests.cpp \ + SessionObjectStoreTests.cpp $(am__append_1) + objstoretest_LDADD = ../../libsofthsm_convarch.la +-objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am +--- softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../object_store \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = sessionmgrtest + +@@ -18,7 +18,7 @@ + + sessionmgrtest_LDADD = ../../libsofthsm_convarch.la + +-sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = sessionmgrtest + +diff -u softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in +--- softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in +@@ -537,13 +537,13 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../object_store \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + sessionmgrtest_SOURCES = sessionmgrtest.cpp \ + SessionManagerTests.cpp + + sessionmgrtest_LDADD = ../../libsofthsm_convarch.la +-sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am +--- softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../data_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = slotmgrtest + +@@ -18,7 +18,7 @@ + + slotmgrtest_LDADD = ../../libsofthsm_convarch.la + +-slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + + TESTS = slotmgrtest + +diff -u softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in +--- softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in +@@ -536,13 +536,13 @@ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../data_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + slotmgrtest_SOURCES = slotmgrtest.cpp \ + SlotManagerTests.cpp + + slotmgrtest_LDADD = ../../libsofthsm_convarch.la +-slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread ++slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread + EXTRA_DIST = $(srcdir)/*.h + all: all-am + +diff -u softhsm2-2.2.0/src/lib/test/Makefile.am softhsm2-2.2.0/src/lib/test/Makefile.am +--- softhsm2-2.2.0/src/lib/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/test/Makefile.am +@@ -3,7 +3,7 @@ + AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../cryptoki_compat \ + -I$(srcdir)/../common \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = p11test + +@@ -29,7 +29,7 @@ + + p11test_LDADD = ../libsofthsm2.la + +-p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static ++p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread -static + + TESTS = p11test + +diff -u softhsm2-2.2.0/src/lib/test/Makefile.in softhsm2-2.2.0/src/lib/test/Makefile.in +--- softhsm2-2.2.0/src/lib/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/test/Makefile.in +@@ -539,7 +539,7 @@ + AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../cryptoki_compat \ + -I$(srcdir)/../common \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + AUTOMAKE_OPTIONS = subdir-objects + p11test_SOURCES = p11test.cpp \ +@@ -561,7 +561,7 @@ + ../common/osmutex.cpp + + p11test_LDADD = ../libsofthsm2.la +-p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static ++p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `pkg-config --libs cppunit` -pthread -static + EXTRA_DIST = $(srcdir)/*.h \ + $(srcdir)/softhsm2-alt.conf.win32 \ + $(srcdir)/softhsm2.conf.win32 \ diff -Nru softhsm2-2.2.0/debian/patches/foo softhsm2-2.2.0/debian/patches/foo --- softhsm2-2.2.0/debian/patches/foo 1970-01-01 01:00:00.000000000 +0100 +++ softhsm2-2.2.0/debian/patches/foo 2017-07-19 15:30:08.000000000 +0200 @@ -0,0 +1,154 @@ +--- softhsm2-2.2.0.orig/src/lib/crypto/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = cryptotest + +--- softhsm2-2.2.0.orig/src/lib/crypto/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/crypto/test/Makefile.in +@@ -558,7 +558,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + cryptotest_SOURCES = cryptotest.cpp \ + AESTests.cpp \ +--- softhsm2-2.2.0.orig/src/lib/data_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = datamgrtest + +--- softhsm2-2.2.0.orig/src/lib/data_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/data_mgr/test/Makefile.in +@@ -537,7 +537,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + datamgrtest_SOURCES = datamgrtest.cpp \ + ByteStringTests.cpp \ +--- softhsm2-2.2.0.orig/src/lib/handle_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../data_mgr \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = handlemgrtest + +--- softhsm2-2.2.0.orig/src/lib/handle_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/handle_mgr/test/Makefile.in +@@ -537,7 +537,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../data_mgr \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + handlemgrtest_SOURCES = handlemgrtest.cpp \ + HandleManagerTests.cpp +--- softhsm2-2.2.0.orig/src/lib/object_store/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = objstoretest + +--- softhsm2-2.2.0.orig/src/lib/object_store/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/object_store/test/Makefile.in +@@ -554,7 +554,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + objstoretest_SOURCES = objstoretest.cpp DirectoryTests.cpp \ + UUIDTests.cpp FileTests.cpp ObjectFileTests.cpp \ +--- softhsm2-2.2.0.orig/src/lib/session_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../object_store \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = sessionmgrtest + +--- softhsm2-2.2.0.orig/src/lib/session_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/session_mgr/test/Makefile.in +@@ -537,7 +537,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../slot_mgr \ + -I$(srcdir)/../../object_store \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + sessionmgrtest_SOURCES = sessionmgrtest.cpp \ + SessionManagerTests.cpp +--- softhsm2-2.2.0.orig/src/lib/slot_mgr/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.am +@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../data_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = slotmgrtest + +--- softhsm2-2.2.0.orig/src/lib/slot_mgr/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/slot_mgr/test/Makefile.in +@@ -536,7 +536,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../../session_mgr \ + -I$(srcdir)/../../data_mgr \ + @CRYPTO_INCLUDES@ \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + slotmgrtest_SOURCES = slotmgrtest.cpp \ + SlotManagerTests.cpp +--- softhsm2-2.2.0.orig/src/lib/test/Makefile.am ++++ softhsm2-2.2.0/src/lib/test/Makefile.am +@@ -3,7 +3,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makef + AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../cryptoki_compat \ + -I$(srcdir)/../common \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + check_PROGRAMS = p11test + +--- softhsm2-2.2.0.orig/src/lib/test/Makefile.in ++++ softhsm2-2.2.0/src/lib/test/Makefile.in +@@ -539,7 +539,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil + AM_CPPFLAGS = -I$(srcdir)/.. \ + -I$(srcdir)/../cryptoki_compat \ + -I$(srcdir)/../common \ +- `cppunit-config --cflags` ++ `pkg-config --cflags cppunit` + + AUTOMAKE_OPTIONS = subdir-objects + p11test_SOURCES = p11test.cpp \ diff -Nru softhsm2-2.2.0/debian/patches/series softhsm2-2.2.0/debian/patches/series --- softhsm2-2.2.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ softhsm2-2.2.0/debian/patches/series 2017-07-19 15:30:38.000000000 +0200 @@ -0,0 +1 @@ +cppunit-pkg-config.diff