devel/cpp-utilities: Add patch; Attempt to fix tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
PORTNAME= cpp-utilities
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 5.24.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
@@ -11,6 +12,7 @@ LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
LIB_DEPENDS= libboost_iostreams.so:devel/boost-libs
|
||||
TEST_DEPENDS= cppunit>0:devel/cppunit
|
||||
|
||||
USES= cmake:testing compiler:c++17-lang
|
||||
USE_LDCONFIG= yes
|
||||
@@ -19,7 +21,6 @@ USE_GITHUB= yes
|
||||
GH_ACCOUNT= Martchus
|
||||
|
||||
CMAKE_ON= BUILD_SHARED_LIBS
|
||||
|
||||
# unclear how to run tests, see https://github.com/Martchus/cpp-utilities/issues/26
|
||||
CMAKE_TESTING_ARGS= -DEXCLUDE_TESTS_FROM_ALL=OFF # tests fail to link: ld: error: unable to find library -lcppunit, see https://github.com/Martchus/cpp-utilities/issues/27
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- tests/testutils.cpp.orig 2023-07-05 03:40:48 UTC
|
||||
+++ tests/testutils.cpp
|
||||
@@ -621,7 +621,7 @@ std::vector<std::string> TestApplication::readTestfile
|
||||
auto binaryPath = std::string();
|
||||
#if defined(CPP_UTILITIES_USE_STANDARD_FILESYSTEM) && defined(PLATFORM_UNIX)
|
||||
try {
|
||||
- binaryPath = std::filesystem::read_symlink("/proc/self/exe").parent_path();
|
||||
+ binaryPath = std::filesystem::read_symlink("/proc/curproc/file").parent_path();
|
||||
binaryPath += '/';
|
||||
} catch (const std::filesystem::filesystem_error &e) {
|
||||
cerr << Phrases::Warning << "Unable to detect binary path for finding \"srcdirref\": " << e.what() << Phrases::EndFlush;
|
||||
Reference in New Issue
Block a user