diff --git a/net-im/toxext/Makefile b/net-im/toxext/Makefile index a3198e55469d..6a77c0d415d9 100644 --- a/net-im/toxext/Makefile +++ b/net-im/toxext/Makefile @@ -1,24 +1,25 @@ PORTNAME= toxext DISTVERSIONPREFIX= v DISTVERSION= 0.0.3 CATEGORIES= net-im net-p2p MAINTAINER= yuri@FreeBSD.org COMMENT= Extension library for tox LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libopus.so:audio/opus \ libsodium.so:security/libsodium \ libtoxcore.so:net-im/tox \ libvpx.so:multimedia/libvpx -USES= cmake localbase:ldflags pkgconfig +USES= cmake:testing localbase:ldflags pkgconfig USE_GITHUB= yes CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_TESTING_ON= BUILD_TESTS CFLAGS+= -fPIC # see https://github.com/toxext/toxext/issues/7 .include diff --git a/net-im/toxext/files/patch-CMakeLists.txt b/net-im/toxext/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..eb0ea86f3616 --- /dev/null +++ b/net-im/toxext/files/patch-CMakeLists.txt @@ -0,0 +1,14 @@ +--- CMakeLists.txt.orig 2022-03-21 17:46:44 UTC ++++ CMakeLists.txt +@@ -15,7 +15,9 @@ endfunction() + add_subdirectory(src) + add_subdirectory(mock) + +-enable_testing() +-add_subdirectory(test) ++if (BUILD_TESTS) ++ enable_testing() ++ add_subdirectory(test) ++endif() + + install(EXPORT ToxExtConfig DESTINATION lib/cmake/ToxExt NAMESPACE ToxExt::)