et: fix build on NetBSD
authorNiclas Rosenvik <nros@pkgsrc.org>
Mon, 28 Feb 2022 10:45:26 +0000 (11:45 +0100)
committerNiclas Rosenvik <nros@pkgsrc.org>
Mon, 28 Feb 2022 10:45:26 +0000 (11:45 +0100)
Fix build on NetBSD by requiring gcc 9.
This removes the linker error when
using std::filesystem.
Since gcc 9 has std::filesystem in stdc++
don't link to stdc++fs on NetBSD.
Telemetry is not supported on NetBSD and
FreeBSD so disable it in pkgsrc to make
the PLIST consistent.
While here depend on cxxopts from pkgsrc
instead of the bundled one.

et/Makefile
et/PLIST
et/TODO
et/distinfo
et/patches/patch-CMakeLists.txt

index 9c7b80f707111334b34c2dfc52f6b27521697a1c..826b2b6ad61e8031d95c69c3cdfa9e46ead16f00 100644 (file)
@@ -18,8 +18,8 @@ USE_CMAKE=    yes
 USE_TOOLS+=    pkg-config
 USE_LANGUAGES= c c++
 USE_TOOLS+=    perl
-GCC_REQD+=     8  # uses std::filesystem
-LIBS+=         -lstdc++fs
+GCC_REQD+=     9  # uses std::filesystem
+#LIBS+=                -lstdc++fs
 
 #.include "../../mk/bsd.prefs.mk"
 #PKGSRC_COMPILER=                clang
@@ -30,7 +30,7 @@ LIBS+=                -lstdc++fs
 #BUILDLINK_DEPMETHOD.clang=      build
 
 CMAKE_ARGS+=   -DDISABLE_VCPKG=ON
-
+CMAKE_ARGS+=   -DDISABLE_TELEMETRY=ON
 
 PKGCONFIG_OVERRIDE+=   external_imported/Catch2/CMake/catch2.pc.in
 PKGCONFIG_OVERRIDE+=   external_imported/UniversalStacktrace/external/Catch2/CMake/catch2.pc.in
@@ -49,6 +49,7 @@ PKGCONFIG_OVERRIDE+=  external_imported/vcpkg/ports/v8/v8_libbase.pc.in
 PKGCONFIG_OVERRIDE+=   external_imported/vcpkg/ports/v8/v8_libplatform.pc.in
 PKGCONFIG_OVERRIDE+=   external_imported/vcpkg/ports/v8/v8_monolith.pc.in
 
+.include "../../devel/cxxopts/buildlink3.mk"
 .include "../../devel/protobuf/buildlink3.mk"
 .include "../../security/libsodium/buildlink3.mk"
 
index f36f82bf74e586520691110c0fd94c9232451d50..5eb142c2cfbe9deb7605dc4c4ebf43850a2d3859 100644 (file)
--- a/et/PLIST
+++ b/et/PLIST
@@ -1,15 +1,6 @@
 @comment $NetBSD$
-bin/crashpad_handler
 bin/et
 bin/etserver
 bin/etterminal
 bin/htm
 bin/htmd
-lib/cmake/sentry/sentry_crashpad-targets.cmake
-lib/libcrashpad_client.a
-lib/libcrashpad_handler_lib.a
-lib/libcrashpad_minidump.a
-lib/libcrashpad_snapshot.a
-lib/libcrashpad_tools.a
-lib/libcrashpad_util.a
-lib/libmini_chromium.a
diff --git a/et/TODO b/et/TODO
index e0ffde9cb9ea0664fd3be6c4cb2258bfca4501ad..c286039f75af61b913b726195aea996dac436e3f 100644 (file)
--- a/et/TODO
+++ b/et/TODO
@@ -7,3 +7,4 @@ std::filesystem:
 /usr/obj/pkgsrc/wip/et/work/EternalTerminal-et-v6.1.11/src/base/LogHandler.cpp:51: undefined reference to `std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options)'
 collect2: error: ld returned 1 exit status
 
+nros: The above is now fixed.
index 9252b512122e9b022a05bb864f1cb181560213f2..f20ba8e16a58af111e8cda950a7b88563cd82efa 100644 (file)
@@ -3,4 +3,4 @@ $NetBSD$
 BLAKE2s (EternalTerminal/et-6.1.11.tar.gz) = 0e7079816a169b76e08c395c3f010df424a2f5abe95d99c0b08af53ae0b021e5
 SHA512 (EternalTerminal/et-6.1.11.tar.gz) = 71b1fe20096a46e6f0ce87ec18d5074f90f48193a1637becb9692b20e7d92fc3b091cf843cecca30a4591fc94396494ff8282343ec6068a2905afd8f4225b3e4
 Size (EternalTerminal/et-6.1.11.tar.gz) = 22081590 bytes
-SHA1 (patch-CMakeLists.txt) = 34356ce801a003d8d0962691a9e046d593bb6461
+SHA1 (patch-CMakeLists.txt) = b3f41dc56c7d9828f24ddb49e2b5157c6495ffd6
index ae6a1917d36a9d683cd1f5201cdd1abd9512ada6..0f222fcd04cfd16b5da73d834300601fc6978487 100644 (file)
@@ -1,6 +1,8 @@
 $NetBSD$
 
---- CMakeLists.txt.orig        2022-02-18 19:34:07.809964843 +0000
+* use pkgsrc cxxopts
+
+--- CMakeLists.txt.orig        2022-01-11 14:53:44.000000000 +0000
 +++ CMakeLists.txt
 @@ -281,11 +281,6 @@ macro(DECORATE_TARGET TARGET_NAME)
    add_sanitizers(${TARGET_NAME})
@@ -14,3 +16,11 @@ $NetBSD$
  endmacro()
  
  include_directories(
+@@ -293,7 +288,6 @@ include_directories(
+   ${EXTERNAL_DIR}/ThreadPool
+   ${EXTERNAL_DIR}/PlatformFolders
+   ${EXTERNAL_DIR}/Catch2/single_include
+-  ${EXTERNAL_DIR}/cxxopts/include
+   ${EXTERNAL_DIR}/msgpack-c/include
+   ${EXTERNAL_DIR}/sentry-native/include
+   ${EXTERNAL_DIR}/json/single_include/nlohmann