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 <dlan@gentoo.org>
This commit is contained in:
Yixun Lan
2026-08-23 01:10:10 +00:00
parent 69089e8f94
commit abab34be75
3 changed files with 39 additions and 1 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)