1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # see examples at sci-chemistry/gromacs/gromacs's ebuild files
7 CMAKE_MAKEFILE_GENERATOR="ninja"
12 DESCRIPTION="lightweight and efficient, socks5/http forward proxy"
13 HOMEPAGE="https://github.com/Chilledheart/yass"
14 SRC_URI="https://github.com/Chilledheart/yass/releases/download/${PV}/yass-${PV}.tar.bz2"
15 S="${WORKDIR}/${MY_PN}-${PV}"
18 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~riscv ~x86"
20 IUSE="+cli server test +gui gtk3 gtk4 +qt5 qt6 wayland +tcmalloc mimalloc"
22 # tested with FEATURES="-network-sandbox test"
23 # tested with FEATURES="network-sandbox test"
24 # tested with FEATURES="test"
25 RESTRICT="!test? ( test )"
28 gui? ( ^^ ( gtk3 gtk4 qt5 qt6 ) )
30 tcmalloc? ( !mimalloc )
34 app-misc/ca-certificates
42 tcmalloc? ( dev-util/google-perftools )
43 mimalloc? ( dev-libs/mimalloc )
47 x11-libs/gtk+:3[wayland?]
51 gui-libs/gtk:4[wayland?]
57 wayland? ( dev-qt/qtwayland:5 )
60 dev-qt/qtbase:6=[dbus,gui,widgets,wayland?]
61 wayland? ( dev-qt/qtwayland:6 )
69 >=dev-build/cmake-3.13.4
70 app-alternatives/ninja
80 test? ( net-misc/curl )
85 # some tests require network access, comment it out if not supported
86 if has network-sandbox ${FEATURES}; then
87 sed -i -e 's/BUILD_TESTS_NO_NETWORK/BUILD_TESTS/g' "${S}/CMakeLists.txt"
93 -DCMAKE_INSTALL_SYSCONFDIR=/etc
94 -DBUILD_SHARED_LIBS=off
95 -DUSE_BUILTIN_CA_BUNDLE_CRT=off
99 -DSERVER=$(usex server)
101 -DUSE_GTK4=$(usex gtk4)
102 -DUSE_QT5=$(usex qt5)
103 -DUSE_QT6=$(usex qt6)
104 -DBUILD_TESTS=$(usex test)
105 -DUSE_TCMALLOC=$(usex tcmalloc)
106 -DUSE_SYSTEM_TCMALLOC=$(usex tcmalloc)
107 -DUSE_MIMALLOC=$(usex mimalloc)
108 -DUSE_SYSTEM_MIMALLOC=$(usex mimalloc)
109 -DUSE_SYSTEM_MBEDTLS=on
111 -DUSE_SYSTEM_CARES=on
112 -DUSE_SYSTEM_NGHTTP2=on