Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] EternalTerminal: update to 6.2.4.
@ 2023-01-23 15:25 kruceter
  2023-01-23 19:15 ` [PR PATCH] [Updated] " kruceter
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kruceter @ 2023-01-23 15:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

There is a new pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
* replace `disable_testing.patch` with upstream `build_testing.patch` in order to properly disable building tests with the `BUILD_TESTING` flag.

* clean up the mess made with `build_wrksrc` in the previous commit.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41823.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 7480 bytes --]

From fb1f3ba4c6f67cd2df9895506811389d992777c5 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* clean up the mess made with build_wrksrc in the previous commit.
---
 .../patches/build_testing.patch               | 89 +++++++++++++++++++
 .../patches/disable-tests.patch               | 30 -------
 .../EternalTerminal/patches/fix-cflags.patch  |  4 +-
 srcpkgs/EternalTerminal/template              | 17 ++--
 4 files changed, 99 insertions(+), 41 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..1965dc022b7c 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,14 +1,14 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
+configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
 hostmakedepends="protobuf"
 makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
  zlib-devel"
@@ -16,10 +16,10 @@ short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
@@ -38,10 +38,9 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
-	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
-		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv EternalTerminal-et-v${version}/* .
+	mv sanitizers-cmake-${_sanitizers_gitrev}/* external/sanitizers-cmake
+	mv ThreadPool-${_threadpool_gitrev}/* external/ThreadPool
 }
 
 post_patch() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] EternalTerminal: update to 6.2.4.
  2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
@ 2023-01-23 19:15 ` kruceter
  2023-01-27 13:25 ` liarimu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-01-23 19:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41823.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 9725 bytes --]

From 22d4bde2498cacfac222c04a3027a8a2317d0b15 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* bundled cxxopts is broken with GCC 12; patch to use the packaged one.

* gcc complains at "string"/"vector" not having a type in
  src/base/TunnelUtils.(hpp|cpp); patch the header file.

* clean up the mess made with build_wrksrc in the previous commit.
---
 .../patches/build_testing.patch               | 89 +++++++++++++++++++
 srcpkgs/EternalTerminal/patches/cxxopts.patch | 34 +++++++
 .../patches/disable-tests.patch               | 30 -------
 .../EternalTerminal/patches/fix-cflags.patch  |  4 +-
 .../EternalTerminal/patches/tunnelutils.patch | 13 +++
 srcpkgs/EternalTerminal/template              | 21 +++--
 6 files changed, 148 insertions(+), 43 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/cxxopts.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/tunnelutils.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/cxxopts.patch b/srcpkgs/EternalTerminal/patches/cxxopts.patch
new file mode 100644
index 000000000000..1fcbf57f759d
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/cxxopts.patch
@@ -0,0 +1,34 @@
+Bundled cxxopts is outdated to the point where it cannot build with
+GCC 12.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,6 +98,7 @@ find_package(Threads REQUIRED)
+ find_package(sodium REQUIRED)
+ find_package(Protobuf REQUIRED)
+ find_package(ZLIB REQUIRED)
++find_package(cxxopts)
+ find_package(Unwind)
+ 
+ # Optional packages
+@@ -278,6 +279,12 @@ else()
+       stdc++fs)
+ endif()
+ 
++if(cxxopts_FOUND)
++  list(INSERT CORE_LIBRARIES 0 cxxopts::cxxopts)
++else()
++  include_directories(${EXTERNAL_DIR}/cxxopts/include)
++endif()
++
+ IF(Unwind_FOUND)
+   list(INSERT CORE_LIBRARIES 0 unwind::unwind)
+ ENDIF()
+@@ -322,7 +329,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}/json/single_include/nlohmann
+   ${EXTERNAL_DIR}/sole
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/patches/tunnelutils.patch b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
new file mode 100644
index 000000000000..d2c4ee19ee1a
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
@@ -0,0 +1,13 @@
+Does not build without including this header (mostly complains about
+"string" or "vector" not having a type).
+
+--- a/src/base/TunnelUtils.hpp
++++ b/src/base/TunnelUtils.hpp
+@@ -1,6 +1,7 @@
+ #ifndef __ET_TUNNEL_UTILS__
+ #define __ET_TUNNEL_UTILS__
+ 
++#include "Headers.hpp"
+ #include "ETerminal.pb.h"
+ 
+ namespace et {
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..c4a1776c2d1c 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,25 +1,25 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
-hostmakedepends="protobuf"
+configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
+hostmakedepends="protobuf pkg-config"
 makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
- zlib-devel"
+ zlib-devel cxxopts"
 short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
@@ -38,10 +38,9 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
-	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
-		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv EternalTerminal-et-v${version}/* .
+	mv sanitizers-cmake-${_sanitizers_gitrev}/* external/sanitizers-cmake
+	mv ThreadPool-${_threadpool_gitrev}/* external/ThreadPool
 }
 
 post_patch() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] EternalTerminal: update to 6.2.4.
  2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
  2023-01-23 19:15 ` [PR PATCH] [Updated] " kruceter
@ 2023-01-27 13:25 ` liarimu
  2023-02-02  2:48 ` kruceter
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: liarimu @ 2023-01-27 13:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

There is an updated pull request by liarimu against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41823.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 11262 bytes --]

From 99ceae71b0e64fe8db4b8b04fed0f93c0e18774b Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* bundled cxxopts is broken; apply (not yet) upstream patch to use and
  link against the packaged library.

* gcc complains at "string"/"vector" not having a type in
  src/base/TunnelUtils.(hpp|cpp); apply upstream patch.

* clean up the mess made with build_wrksrc in the previous commit.
---
 .../patches/build_testing.patch               | 89 +++++++++++++++++++
 srcpkgs/EternalTerminal/patches/cxxopts.patch | 46 ++++++++++
 .../patches/disable-tests.patch               | 30 -------
 .../EternalTerminal/patches/fix-cflags.patch  |  4 +-
 .../EternalTerminal/patches/tunnelutils.patch | 45 ++++++++++
 srcpkgs/EternalTerminal/template              | 21 +++--
 6 files changed, 192 insertions(+), 43 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/cxxopts.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/tunnelutils.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/cxxopts.patch b/srcpkgs/EternalTerminal/patches/cxxopts.patch
new file mode 100644
index 000000000000..72834e95af0b
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/cxxopts.patch
@@ -0,0 +1,46 @@
+https://github.com/MisterTea/EternalTerminal/pull/565
+
+From a3b18bebeeb1e6da13819a775d2b5a30c8c21638 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Fri, 27 Jan 2023 13:26:08 +0300
+Subject: [PATCH] Make cxxopts an optional system dependency
+
+Fall back to the bundled library if cmake cannot find it on the running
+system.
+---
+ CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2368dfc2..3e3bf5d4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,6 +98,7 @@ find_package(Threads REQUIRED)
+ find_package(sodium REQUIRED)
+ find_package(Protobuf REQUIRED)
+ find_package(ZLIB REQUIRED)
++find_package(cxxopts)
+ find_package(Unwind)
+ 
+ # Optional packages
+@@ -278,6 +279,12 @@ else()
+       stdc++fs)
+ endif()
+ 
++if(cxxopts_FOUND)
++  list(INSERT CORE_LIBRARIES 0 cxxopts::cxxopts)
++else()
++  include_directories(${EXTERNAL_DIR}/cxxopts/include)
++endif()
++
+ IF(Unwind_FOUND)
+   list(INSERT CORE_LIBRARIES 0 unwind::unwind)
+ ENDIF()
+@@ -322,7 +329,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}/json/single_include/nlohmann
+   ${EXTERNAL_DIR}/sole
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/patches/tunnelutils.patch b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
new file mode 100644
index 000000000000..f5f6fe690091
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
@@ -0,0 +1,45 @@
+https://github.com/MisterTea/EternalTerminal/commit/fde8a7cb084bb6bc005b8205f4257e7f65978521
+
+Only the diff for src/base/TunnelUtils.hpp is used here, the rest is
+retained as is.
+
+From fde8a7cb084bb6bc005b8205f4257e7f65978521 Mon Sep 17 00:00:00 2001
+From: kruceter <kruceter@proton.me>
+Date: Thu, 26 Jan 2023 20:38:12 +0300
+Subject: [PATCH] Fix cross build with GCC 12 (#564)
+
+* src/base/TunnelUtils.hpp: replace "ETerminal.pb.h" with "Headers.hpp"
+
+Fixes "strings" and "vectors" not having a type.
+
+Headers.hpp already includes ETerminal.pb.h.
+
+* external/cxxopts: update submodule
+
+Needed in order to fix cross build with GCC 12.
+
+Note that the submodule is updated to revision
+c74846a891b3cc3bfa992d588b1295f528d43039 which is equal to the tagged
+version 3.0.0.
+
+This decision was made due to the changes in master of cxxopts breaking
+EternalTerminal (such as removing cxxopts::OptionException from the
+code).
+---
+ external/cxxopts         | 2 +-
+ src/base/TunnelUtils.hpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/base/TunnelUtils.hpp b/src/base/TunnelUtils.hpp
+index 207969ee..42e96cc4 100644
+--- a/src/base/TunnelUtils.hpp
++++ b/src/base/TunnelUtils.hpp
+@@ -1,7 +1,7 @@
+ #ifndef __ET_TUNNEL_UTILS__
+ #define __ET_TUNNEL_UTILS__
+ 
+-#include "ETerminal.pb.h"
++#include "Headers.hpp"
+ 
+ namespace et {
+ 
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..c4a1776c2d1c 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,25 +1,25 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
-hostmakedepends="protobuf"
+configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
+hostmakedepends="protobuf pkg-config"
 makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
- zlib-devel"
+ zlib-devel cxxopts"
 short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
@@ -38,10 +38,9 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
-	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
-		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv EternalTerminal-et-v${version}/* .
+	mv sanitizers-cmake-${_sanitizers_gitrev}/* external/sanitizers-cmake
+	mv ThreadPool-${_threadpool_gitrev}/* external/ThreadPool
 }
 
 post_patch() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] EternalTerminal: update to 6.2.4.
  2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
  2023-01-23 19:15 ` [PR PATCH] [Updated] " kruceter
  2023-01-27 13:25 ` liarimu
@ 2023-02-02  2:48 ` kruceter
  2023-02-02  7:40 ` kruceter
  2023-02-08 23:53 ` [PR PATCH] [Closed]: " kruceter
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-02-02  2:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41823.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 11483 bytes --]

From bad9a7bd4b700c09370c8e5d285652a968f0003d Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* bundled cxxopts is broken; apply (not yet) upstream patch to use the
  packaged library and link against it.

* gcc complains at "string"/"vector" not having a type in
  src/base/TunnelUtils.(hpp|cpp); apply upstream patch.

* clean up the mess made with build_wrksrc in the previous commit.
---
 .../patches/build_testing.patch               | 89 +++++++++++++++++++
 srcpkgs/EternalTerminal/patches/cxxopts.patch | 49 ++++++++++
 .../patches/disable-tests.patch               | 30 -------
 .../EternalTerminal/patches/fix-cflags.patch  |  4 +-
 .../EternalTerminal/patches/tunnelutils.patch | 45 ++++++++++
 srcpkgs/EternalTerminal/template              | 20 +++--
 6 files changed, 196 insertions(+), 41 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/cxxopts.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/tunnelutils.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/cxxopts.patch b/srcpkgs/EternalTerminal/patches/cxxopts.patch
new file mode 100644
index 000000000000..14f196697a5b
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/cxxopts.patch
@@ -0,0 +1,49 @@
+https://github.com/MisterTea/EternalTerminal/pull/565
+
+From f488a0a8288b9b1fc34506d872ebee2a588d9a82 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Fri, 27 Jan 2023 13:26:08 +0300
+Subject: [PATCH] Make cxxopts an optional system dependency
+
+Fall back to the bundled library if cmake
+
+* cannot find it on the running system, or
+
+* finds the library with version less than 3.0.0.
+---
+ CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2368dfc2..9ba2dd6d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,6 +98,7 @@ find_package(Threads REQUIRED)
+ find_package(sodium REQUIRED)
+ find_package(Protobuf REQUIRED)
+ find_package(ZLIB REQUIRED)
++find_package(cxxopts 3.0.0)
+ find_package(Unwind)
+ 
+ # Optional packages
+@@ -278,6 +279,12 @@ else()
+       stdc++fs)
+ endif()
+ 
++if(cxxopts_FOUND)
++  list(INSERT CORE_LIBRARIES 0 cxxopts::cxxopts)
++else()
++  include_directories(${EXTERNAL_DIR}/cxxopts/include)
++endif()
++
+ IF(Unwind_FOUND)
+   list(INSERT CORE_LIBRARIES 0 unwind::unwind)
+ ENDIF()
+@@ -322,7 +329,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}/json/single_include/nlohmann
+   ${EXTERNAL_DIR}/sole
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/patches/tunnelutils.patch b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
new file mode 100644
index 000000000000..f5f6fe690091
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
@@ -0,0 +1,45 @@
+https://github.com/MisterTea/EternalTerminal/commit/fde8a7cb084bb6bc005b8205f4257e7f65978521
+
+Only the diff for src/base/TunnelUtils.hpp is used here, the rest is
+retained as is.
+
+From fde8a7cb084bb6bc005b8205f4257e7f65978521 Mon Sep 17 00:00:00 2001
+From: kruceter <kruceter@proton.me>
+Date: Thu, 26 Jan 2023 20:38:12 +0300
+Subject: [PATCH] Fix cross build with GCC 12 (#564)
+
+* src/base/TunnelUtils.hpp: replace "ETerminal.pb.h" with "Headers.hpp"
+
+Fixes "strings" and "vectors" not having a type.
+
+Headers.hpp already includes ETerminal.pb.h.
+
+* external/cxxopts: update submodule
+
+Needed in order to fix cross build with GCC 12.
+
+Note that the submodule is updated to revision
+c74846a891b3cc3bfa992d588b1295f528d43039 which is equal to the tagged
+version 3.0.0.
+
+This decision was made due to the changes in master of cxxopts breaking
+EternalTerminal (such as removing cxxopts::OptionException from the
+code).
+---
+ external/cxxopts         | 2 +-
+ src/base/TunnelUtils.hpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/base/TunnelUtils.hpp b/src/base/TunnelUtils.hpp
+index 207969ee..42e96cc4 100644
+--- a/src/base/TunnelUtils.hpp
++++ b/src/base/TunnelUtils.hpp
+@@ -1,7 +1,7 @@
+ #ifndef __ET_TUNNEL_UTILS__
+ #define __ET_TUNNEL_UTILS__
+ 
+-#include "ETerminal.pb.h"
++#include "Headers.hpp"
+ 
+ namespace et {
+ 
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..a6dd26c01efa 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,28 +1,30 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
+build_wrksrc=EternalTerminal-et-v${version}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
-hostmakedepends="protobuf"
+configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
+hostmakedepends="protobuf pkg-config"
 makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
- zlib-devel"
+ zlib-devel cxxopts"
 short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
+patch_args="-Np1 --directory=${build_wrksrc}"
 # UnixSocketHandler.cpp:53 Error reading: 104 Connection reset by peer
 # SocketHandler.cpp:91 Failed a call to writeAll: Broken pipe
 make_check=no
@@ -38,10 +40,10 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
 	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
 		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv ThreadPool-${_threadpool_gitrev}/* \
+		${build_wrksrc}/external/ThreadPool
 }
 
 post_patch() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] EternalTerminal: update to 6.2.4.
  2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
                   ` (2 preceding siblings ...)
  2023-02-02  2:48 ` kruceter
@ 2023-02-02  7:40 ` kruceter
  2023-02-08 23:53 ` [PR PATCH] [Closed]: " kruceter
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-02-02  7:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41823.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 13879 bytes --]

From 424a04b3c20bf830723c187470b6d802422783b8 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* apply use_system_libs.patch to use system libraries instead of the
  vendored ones.

* gcc complains at "string"/"vector" not having a type in
  src/base/TunnelUtils.(hpp|cpp); apply upstream patch.

* clean up the mess made with build_wrksrc in the previous commit.

* gflags was dropped upstream in version 6.0.1:
  MisterTea/EternalTerminal@f601aab21165de0d05c797d67603924eb4c797f5
---
 .../patches/build_testing.patch               |  89 ++++++++++++++
 .../patches/disable-tests.patch               |  30 -----
 .../EternalTerminal/patches/fix-cflags.patch  |   4 +-
 .../EternalTerminal/patches/tunnelutils.patch |  45 +++++++
 .../patches/use_system_libs.patch             | 112 ++++++++++++++++++
 srcpkgs/EternalTerminal/template              |  24 ++--
 6 files changed, 260 insertions(+), 44 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/tunnelutils.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/use_system_libs.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/patches/tunnelutils.patch b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
new file mode 100644
index 000000000000..f5f6fe690091
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
@@ -0,0 +1,45 @@
+https://github.com/MisterTea/EternalTerminal/commit/fde8a7cb084bb6bc005b8205f4257e7f65978521
+
+Only the diff for src/base/TunnelUtils.hpp is used here, the rest is
+retained as is.
+
+From fde8a7cb084bb6bc005b8205f4257e7f65978521 Mon Sep 17 00:00:00 2001
+From: kruceter <kruceter@proton.me>
+Date: Thu, 26 Jan 2023 20:38:12 +0300
+Subject: [PATCH] Fix cross build with GCC 12 (#564)
+
+* src/base/TunnelUtils.hpp: replace "ETerminal.pb.h" with "Headers.hpp"
+
+Fixes "strings" and "vectors" not having a type.
+
+Headers.hpp already includes ETerminal.pb.h.
+
+* external/cxxopts: update submodule
+
+Needed in order to fix cross build with GCC 12.
+
+Note that the submodule is updated to revision
+c74846a891b3cc3bfa992d588b1295f528d43039 which is equal to the tagged
+version 3.0.0.
+
+This decision was made due to the changes in master of cxxopts breaking
+EternalTerminal (such as removing cxxopts::OptionException from the
+code).
+---
+ external/cxxopts         | 2 +-
+ src/base/TunnelUtils.hpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/base/TunnelUtils.hpp b/src/base/TunnelUtils.hpp
+index 207969ee..42e96cc4 100644
+--- a/src/base/TunnelUtils.hpp
++++ b/src/base/TunnelUtils.hpp
+@@ -1,7 +1,7 @@
+ #ifndef __ET_TUNNEL_UTILS__
+ #define __ET_TUNNEL_UTILS__
+ 
+-#include "ETerminal.pb.h"
++#include "Headers.hpp"
+ 
+ namespace et {
+ 
diff --git a/srcpkgs/EternalTerminal/patches/use_system_libs.patch b/srcpkgs/EternalTerminal/patches/use_system_libs.patch
new file mode 100644
index 000000000000..557975d1593f
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/use_system_libs.patch
@@ -0,0 +1,112 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2368dfc2..a377bc57 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.0.2)
+ 
+ set(EXTERNAL_DIR "${CMAKE_SOURCE_DIR}/external")
+ 
++option(USE_SYSTEM_LIBS "Prefer to use system libraries" OFF)
++
++if(USE_SYSTEM_LIBS)
++  set(DISABLE_VCPKG ON)
++endif()
++
+ if(DISABLE_VCPKG)
+ else()
+   # Enable vcpkg
+@@ -100,6 +106,68 @@ find_package(Protobuf REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(Unwind)
+ 
++if(USE_SYSTEM_LIBS)
++  find_package(cxxopts 3.0.0)
++  if(cxxopts_FOUND)
++    message(STATUS "Found cxxopts (${cxxopts_VERSION})")
++    list(INSERT CORE_LIBRARIES 0 cxxopts::cxxopts)
++  else()
++    message(STATUS "No suitable system cxxopts found, using bundled library")
++    include_directories(${EXTERNAL_DIR}/cxxopts/include)
++  endif()
++
++  find_package(msgpack 4.1.1)
++  if(msgpack_FOUND)
++    message(STATUS "Found msgpack (${msgpack_VERSION})")
++    list(INSERT CORE_LIBRARIES 0 msgpackc-cxx::msgpackc-cxx)
++  else()
++    message(STATUS "No suitable system msgpack found, using bundled library")
++    include_directories(${EXTERNAL_DIR}/msgpack-c/include)
++  endif()
++
++  find_package(nlohmann_json 3.10.0)
++  if(nlohmann_json_FOUND)
++    list(INSERT CORE_LIBRARIES 0 nlohmann_json::nlohmann_json)
++  else()
++    message(STATUS "No suitable system json-c++ found, using bundled library")
++    include_directories(${EXTERNAL_DIR}/json/include)
++  endif()
++
++  find_package(simpleini 4.18)
++  if(simpleini_FOUND)
++    list(INSERT CORE_LIBRARIES 0 simpleini::simpleini)
++  else()
++    message(STATUS "No suitable system simpleini found, using bundled library")
++    include_directories(${EXTERNAL_DIR}/simpleini)
++  endif()
++
++  if(BUILD_TESTING)
++    find_package(Catch2 2.13.7)
++    if(Catch2_FOUND)
++      message(STATUS "Found catch2 (${Catch2_VERSION})")
++      list(INSERT CORE_LIBRARIES 0 Catch2::Catch2)
++    else()
++      message(STATUS "No suitable system catch2 found, using bundled library")
++      include_directories(${EXTERNAL_DIR}/Catch2/single_include)
++    endif()
++  endif()
++
++  find_package(httplib 0.8.0)
++  if(httplib_FOUND)
++    list(INSERT CORE_LIBRARIES 0 httplib::httplib)
++  else()
++    message(STATUS "No suitable system httplib found, using bundled library")
++    include_directories(${EXTERNAL_DIR}/cpp-httplib)
++  endif()
++else()
++  include_directories(${EXTERNAL_DIR}/cxxopts/include
++    ${EXTERNAL_DIR}/msgpack-c/include
++    ${EXTERNAL_DIR}/json/include
++    ${EXTERNAL_DIR}/simpleini
++    ${EXTERNAL_DIR}/Catch2/single_include
++    ${EXTERNAL_DIR}/cpp-httplib)
++endif()
++
+ # Optional packages
+ find_package(UTempter)
+ if(LINUX)
+@@ -321,14 +389,8 @@ include_directories(
+   ${EXTERNAL_DIR}/easyloggingpp/src
+   ${EXTERNAL_DIR}/ThreadPool
+   ${EXTERNAL_DIR}/PlatformFolders
+-  ${EXTERNAL_DIR}/Catch2/single_include
+-  ${EXTERNAL_DIR}/cxxopts/include
+-  ${EXTERNAL_DIR}/msgpack-c/include
+-  ${EXTERNAL_DIR}/json/single_include/nlohmann
+   ${EXTERNAL_DIR}/sole
+   ${EXTERNAL_DIR}/base64
+-  ${EXTERNAL_DIR}/simpleini
+-  ${EXTERNAL_DIR}/cpp-httplib
+   src/base
+   src/terminal
+   src/terminal/forwarding
+diff --git a/src/base/JsonLib.hpp b/src/base/JsonLib.hpp
+index a0de911b..d206bd99 100644
+--- a/src/base/JsonLib.hpp
++++ b/src/base/JsonLib.hpp
+@@ -1,5 +1,5 @@
+ #pragma once
+ 
+-#include "json.hpp"
++#include "nlohmann/json.hpp"
+ 
+ using json = nlohmann::json;
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..4de6d14fc99d 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,34 +1,34 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
+build_wrksrc=EternalTerminal-et-v${version}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
-hostmakedepends="protobuf"
-makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
- zlib-devel"
+configure_args="-DUSE_SYSTEM_LIBS=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
+hostmakedepends="protobuf pkg-config"
+makedepends="libsodium-devel protobuf-devel openssl-devel zlib-devel cxxopts
+ msgpack-cxx json-c++"
 short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
+patch_args="-Np1 --directory=${build_wrksrc}"
 # UnixSocketHandler.cpp:53 Error reading: 104 Connection reset by peer
 # SocketHandler.cpp:91 Failed a call to writeAll: Broken pipe
 make_check=no
 
-LDFLAGS="-lgflags"
-
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" libexecinfo-devel"
 fi
@@ -38,10 +38,10 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
 	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
 		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv ThreadPool-${_threadpool_gitrev}/* \
+		${build_wrksrc}/external/ThreadPool
 }
 
 post_patch() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Closed]: EternalTerminal: update to 6.2.4.
  2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
                   ` (3 preceding siblings ...)
  2023-02-02  7:40 ` kruceter
@ 2023-02-08 23:53 ` kruceter
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-02-08 23:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

There's a closed pull request on the void-packages repository

EternalTerminal: update to 6.2.4.
https://github.com/void-linux/void-packages/pull/41823

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-08 23:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 15:25 [PR PATCH] EternalTerminal: update to 6.2.4 kruceter
2023-01-23 19:15 ` [PR PATCH] [Updated] " kruceter
2023-01-27 13:25 ` liarimu
2023-02-02  2:48 ` kruceter
2023-02-02  7:40 ` kruceter
2023-02-08 23:53 ` [PR PATCH] [Closed]: " kruceter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).