From abab34be75d536ad331985e9adc64ae4f11e1e3a Mon Sep 17 00:00:00 2001 From: Yixun Lan Date: Sun, 23 Aug 2026 01:10:10 +0000 Subject: [PATCH] net-proxy/shadowsocks-libev: doc and Werror fix guard documentation file installation with USE=doc drop hard-coded -Werror flag Closes: https://bugs.gentoo.org/981256 Closes: https://bugs.gentoo.org/981257 Signed-off-by: Yixun Lan --- .../files/shadowsocks-libev-3.3.6-doc.patch | 23 +++++++++++++++++++ .../shadowsocks-libev-3.3.6-werror.patch | 14 +++++++++++ ...uild => shadowsocks-libev-3.3.6-r1.ebuild} | 3 ++- 3 files changed, 39 insertions(+), 1 deletion(-) rename net-proxy/shadowsocks-libev/{shadowsocks-libev-3.3.6.ebuild => shadowsocks-libev-3.3.6-r1.ebuild} (97%) diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-doc.patch b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-doc.patch index 734dcacfb9015..97957b94a96b0 100644 --- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-doc.patch +++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-doc.patch @@ -1,3 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15f0551..901d12e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,6 +36,7 @@ endif () + + message(STATUS "Running cmake version ${CMAKE_VERSION}") + ++option(WITH_DOCS "build with Documentations." ON) + option(WITH_STATIC "build with static libraries." ON) + option(WITH_EMBEDDED_SRC "build with embedded libcork, libipset, and libbloom source." ON) + option(ENABLE_CONNMARKTOS "Enable saved connmark to IP TOS QoS feature" OFF) +@@ -177,7 +178,10 @@ target_link_libraries(ipset cork bloom) + endif () + + add_subdirectory(src) ++ ++if(WITH_DOCS) + add_subdirectory(doc) ++endif() + + # Testing + include(CTest) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9abd455..76a1993 100644 --- a/doc/CMakeLists.txt diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-werror.patch b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-werror.patch index 80089c0bead63..b42f87ab477e6 100644 --- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-werror.patch +++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.6-werror.patch @@ -11,3 +11,17 @@ index 52ff13e..15f0551 100644 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 80503cb..08bd33e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -84,9 +84,6 @@ set(SS_REDIR_SOURCE + ${SS_PLUGIN_SOURCE} + ) + +-# Apply -Werror only to project sources (not bundled submodules) +-set(SS_WERROR_FLAGS -Werror) +- + # Include directories from Find modules + # MbedTLS must come first to avoid conflicts with other mbedtls versions + # that may be in /opt/homebrew/include (e.g. mbedtls 4.x vs 3.x) diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6-r1.ebuild similarity index 97% rename from net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6.ebuild rename to net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6-r1.ebuild index 2e8171f754375..5f84989bf3f9a 100644 --- a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6.ebuild +++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.6-r1.ebuild @@ -44,6 +44,7 @@ src_configure() { local mycmakeargs=( -DWITH_EMBEDDED_SRC=OFF -DWITH_STATIC=OFF + -DWITH_DOCS="$(usex doc)" ) cmake_src_configure } @@ -63,7 +64,7 @@ src_install() { dosym shadowsocks /etc/init.d/shadowsocks.redir dosym shadowsocks /etc/init.d/shadowsocks.tunnel - dodoc -r acl + use doc && dodoc -r acl for i in debian/${PN}*.service; do systemd_newunit $i $(basename $i)