app-i18n/fcitx-chewing: add 5.1.4, drop 5.1.2
[gentoo-zh.git] / net-proxy / yass / yass-1.10.5.ebuild
blobf3b63fdb45c16991bf4c04d610fa2ae419a03dc5
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake xdg
8 MY_PN="yass"
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}"
13 LICENSE="GPL-2"
14 SLOT="0"
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 )"
24 REQUIRED_USE="
25         gui? ( ^^ ( gtk3 gtk4 qt6 ) )
26         loong? ( !gtk4 )
27         tcmalloc? ( !mimalloc )
30 RDEPEND="
31         app-misc/ca-certificates
32         dev-libs/glib:2
33         net-libs/mbedtls
34         sys-libs/zlib
35         net-dns/c-ares
36         net-libs/nghttp2
37         tcmalloc? ( dev-util/google-perftools )
38         mimalloc? ( dev-libs/mimalloc )
39         gui? (
40                 gtk3? (
41                         x11-libs/gtk+:3[wayland?]
42                 )
43                 gtk4? (
44                         gui-libs/gtk:4[wayland?]
45                 )
46                 qt6? (
47                         dev-qt/qtbase:6=[dbus,gui,widgets,wayland?]
48                         wayland? ( dev-qt/qtwayland:6 )
49                 )
50         )
52 DEPEND="${RDEPEND}"
53 BDEPEND="
54         sys-devel/gettext
55         virtual/pkgconfig
58 PATCHES=(
59         "${FILESDIR}"/libcxx-gcc-14.patch
62 src_prepare() {
63         cmake_src_prepare
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"
67         fi
70 src_configure() {
71         local mycmakeargs=(
72                 -DCMAKE_INSTALL_SYSCONFDIR=/etc
73                 -DBUILD_SHARED_LIBS=off
74                 -DUSE_BUILTIN_CA_BUNDLE_CRT=off
75                 -DUSE_LIBCXX=off
76                 -DENABLE_GOLD=off
77                 -DCLI=$(usex cli)
78                 -DSERVER=$(usex server)
79                 -DGUI=$(usex gui)
80                 -DUSE_GTK4=$(usex gtk4)
81                 -DUSE_QT6=$(usex qt6)
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
88                 -DUSE_SYSTEM_ZLIB=on
89                 -DUSE_SYSTEM_CARES=on
90                 -DUSE_SYSTEM_NGHTTP2=on
91         )
92         cmake_src_configure