On Thu, Feb 24, 2022 at 09:29:13AM +0100, Omar Polo wrote:
Hello,
the patch is malformed and don't apply :/
Patching file Makefile using Plan A...
patch: **** malformed patch at line 52: @@ -99,6 +100,19 @@ CONFIGURE_ARGS +=
-DCMAKE_CXX_STANDARD=17
Just a quick comment thought, the `find | xargs ls' machinery in
pre-test is quite fragile and will break if we forget to sync it with
the next update (or if we need to bump only some of the libraries.)
Assuming that it's required for the tests (I haven't looked into it yet)
I'd either go with "*\.so\..\.." or *\.so\.*\.*, or something along
these lines.
Thanks
Oh, I'm sorry. It's not the first time this has happened with me( I
promise to make an effort and be careful not to send any more
corrupted diffs.
I also apologize for the late response.
Thank you for your comment, I fixed it as you suggested.
diff --git a/devel/abseil-cpp/Makefile b/devel/abseil-cpp/Makefile
index 4fb8a93ab48..343c27b7aaf 100644
--- a/devel/abseil-cpp/Makefile
+++ b/devel/abseil-cpp/Makefile
@@ -1,6 +1,7 @@
# $OpenBSD: Makefile,v 1.1.1.1 2021/12/18 19:38:17 kn Exp $
COMMENT = abseil common libraries (c++)
+REVISION = 0
CATEGORIES = devel
GH_ACCOUNT = abseil
@@ -99,6 +100,19 @@ CONFIGURE_ARGS += -DCMAKE_CXX_STANDARD=17
# to ensure that our project builds correctly.
CONFIGURE_ARGS += -DABSL_PROPAGATE_CXX_STD:BOOL=ON
-NO_TEST = Yes
+# use googletest from ports
+CONFIGURE_ARGS +=
-DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=${LOCALBASE}/include/gtest
+# turn on tests builds
+CONFIGURE_ARGS += -DBUILD_TESTING:BOOL=ON
+
+# use TEST_TMPDIR instead of /tmp for tests temp data (like in bazel build)
+TEST_ENV += TEST_TMPDIR=${WRKBUILD}/test_tmp \
+ LD_LIBRARY_PATH=/usr/lib:${WRKBUILD}/test_lib
+
+pre-test:
+ @mkdir -p ${WRKBUILD}/test_tmp
+ @mkdir -p ${WRKBUILD}/test_lib
+ cd ${WRKBUILD}/test_lib && \
+ find ${WRKBUILD} -name "*\.so\.*\.*" | xargs -I {} ln -s {} .
.include <bsd.port.mk>
diff --git a/devel/abseil-cpp/patches/patch-absl_base_internal_raw_logging_cc
b/devel/abseil-cpp/patches/patch-absl_base_internal_raw_logging_cc
new file mode 100644
index 00000000000..71ef528b32b
--- /dev/null
+++ b/devel/abseil-cpp/patches/patch-absl_base_internal_raw_logging_cc
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: absl/base/internal/raw_logging.cc
+--- absl/base/internal/raw_logging.cc.orig
++++ absl/base/internal/raw_logging.cc
+@@ -36,7 +36,7 @@
+ // This preprocessor token is also defined in raw_io.cc. If you need to copy
+ // this, consider moving both to config.h instead.
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+- defined(__Fuchsia__) || defined(__native_client__) || \
++ defined(__Fuchsia__) || defined(__native_client__) ||
defined(__OpenBSD__) || \
+ defined(__EMSCRIPTEN__) || defined(__ASYLO__)
+
+ #include <unistd.h>
+@@ -50,7 +50,7 @@
+ // ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall
+ // syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len);
+ // for low level operations that want to avoid libc.
+-#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) &&
!defined(__ANDROID__)
+ #include <sys/syscall.h>
+ #define ABSL_HAVE_SYSCALL_WRITE 1
+ #define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
diff --git a/devel/abseil-cpp/patches/patch-absl_debugging_CMakeLists_txt
b/devel/abseil-cpp/patches/patch-absl_debugging_CMakeLists_txt
new file mode 100644
index 00000000000..df5a9e9ed5d
--- /dev/null
+++ b/devel/abseil-cpp/patches/patch-absl_debugging_CMakeLists_txt
@@ -0,0 +1,56 @@
+$OpenBSD$
+
+Disable all tests that require a leak sanitizer because
+OpenBSD does not support it.
+
+Index: absl/debugging/CMakeLists.txt
+--- absl/debugging/CMakeLists.txt.orig
++++ absl/debugging/CMakeLists.txt
+@@ -225,6 +225,7 @@ absl_cc_library(
+ PUBLIC
+ )
+
++if (NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+ absl_cc_library(
+ NAME
+ leak_check_api_enabled_for_testing
+@@ -237,6 +238,7 @@ absl_cc_library(
+ $<$<BOOL:${ABSL_HAVE_LSAN}>:-DLEAK_SANITIZER>
+ TESTONLY
+ )
++endif()
+
+ absl_cc_library(
+ NAME
+@@ -251,6 +253,7 @@ absl_cc_library(
+ TESTONLY
+ )
+
++if (NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+ absl_cc_test(
+ NAME
+ leak_check_test
+@@ -266,6 +269,7 @@ absl_cc_test(
+ absl::base
+ GTest::gmock_main
+ )
++endif()
+
+ absl_cc_test(
+ NAME
+@@ -281,6 +285,7 @@ absl_cc_test(
+ GTest::gmock_main
+ )
+
++if (NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+ absl_cc_test(
+ NAME
+ disabled_leak_check_test
+@@ -297,6 +302,7 @@ absl_cc_test(
+ absl::raw_logging_internal
+ GTest::gmock_main
+ )
++endif()
+
+ absl_cc_library(
+ NAME