diff options
Diffstat (limited to 'media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch')
-rw-r--r-- | media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch b/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch new file mode 100644 index 000000000000..506d5a37693b --- /dev/null +++ b/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch @@ -0,0 +1,31 @@ +* Run the tests as part of 'make check' (not just building testrunner). +* Use pkg-config to find gtest, not the now-removed gtest-config. +--- a/Makefile.am ++++ b/Makefile.am +@@ -59,6 +59,7 @@ pkgconfig_DATA = liblastfmlib.pc + + if ENABLE_UNITTEST + check_PROGRAMS = testrunner ++TESTS = $(check_PROGRAMS) + endif + + testrunner_SOURCES = lastfmlib/unittest/testrunner.cpp \ +--- a/configure.ac ++++ b/configure.ac +@@ -51,13 +51,10 @@ AC_ARG_ENABLE(unittests, + [ --enable-unittests Enables build of unittests ], + ENABLE_UNITTEST=$enableval) + +-if test "$ENABLE_UNITTEST" = "yes"; then +- AC_CHECK_HEADERS( +- [gtest/gtest.h],, +- [AC_MSG_ERROR([Missing gtest library, install the google unittest framework])]) +- UNITTEST_LIBS="$(gtest-config --libs)" ++AS_IF([test "$ENABLE_UNITTEST" = "yes"], [ ++ PKG_CHECK_MODULES([UNITTEST], [gtest], [], [AC_MSG_ERROR([Missing gtest library, install the google unittest framework])]) + AC_SUBST(UNITTEST_LIBS) +-fi ++]) + AM_CONDITIONAL(ENABLE_UNITTEST, test "$enable_unittests" = "yes") + + AC_SUBST([pkgconfigdir]) |