1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="lightweight and efficient, socks5/http forward proxy"
10 HOMEPAGE="https://github.com/Chilledheart/yass"
11 SRC_URI="https://github.com/Chilledheart/yass/releases/download/${PV}/yass-${PV}.tar.bz2"
12 S="${WORKDIR}/${MY_PN}-${PV}"
15 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~riscv ~x86"
17 IUSE="+cli server test +gui +gtk3 gtk4 qt6 wayland +tcmalloc mimalloc"
19 # tested with FEATURES="-network-sandbox test"
20 # tested with FEATURES="network-sandbox test"
21 # tested with FEATURES="test"
22 RESTRICT="!test? ( test )"
25 gui? ( ^^ ( gtk3 gtk4 qt6 ) )
27 tcmalloc? ( !mimalloc )
31 app-misc/ca-certificates
37 tcmalloc? ( dev-util/google-perftools )
38 mimalloc? ( dev-libs/mimalloc )
41 x11-libs/gtk+:3[wayland?]
44 gui-libs/gtk:4[wayland?]
47 dev-qt/qtbase:6=[dbus,gui,widgets,wayland?]
48 wayland? ( dev-qt/qtwayland:6 )
59 "${FILESDIR}"/libcxx-gcc-14.patch
64 # some tests require network access, comment it out if not supported
65 if has network-sandbox ${FEATURES}; then
66 sed -i -e 's/BUILD_TESTS_NO_NETWORK/BUILD_TESTS/g' "${S}/CMakeLists.txt"
72 -DCMAKE_INSTALL_SYSCONFDIR=/etc
73 -DBUILD_SHARED_LIBS=off
74 -DUSE_BUILTIN_CA_BUNDLE_CRT=off
78 -DSERVER=$(usex server)
80 -DUSE_GTK4=$(usex gtk4)
82 -DBUILD_TESTS=$(usex test)
83 -DUSE_TCMALLOC=$(usex tcmalloc)
84 -DUSE_SYSTEM_TCMALLOC=$(usex tcmalloc)
85 -DUSE_MIMALLOC=$(usex mimalloc)
86 -DUSE_SYSTEM_MIMALLOC=$(usex mimalloc)
87 -DUSE_SYSTEM_MBEDTLS=on
90 -DUSE_SYSTEM_NGHTTP2=on