app-editors/appflowy-bin: add 0.7.4, drop 0.7.3
[gentoo-zh.git] / net-proxy / yass / yass-1.16.1.ebuild
blob00f7e2dd7a9a1756d4b984448d74e506c13e548d
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 # see examples at sci-chemistry/gromacs/gromacs's ebuild files
7 CMAKE_MAKEFILE_GENERATOR="ninja"
9 inherit cmake unpacker xdg
11 DESCRIPTION="lightweight and efficient, socks5/http forward proxy"
12 HOMEPAGE="https://github.com/Chilledheart/yass"
13 SRC_URI="https://github.com/Chilledheart/yass/releases/download/${PV}/${PN}-${PV}.tar.zst"
14 S="${WORKDIR}/${PN}-${PV}"
15 LICENSE="GPL-2"
16 SLOT="0"
17 #KEYWORDS="amd64 ~arm ~arm64 ~loong ~mips ~riscv ~x86"
18 #FIXME pkgcheck cries on NonsolvableDepsInDev on mips, no idea why
19 KEYWORDS="amd64 ~arm ~arm64 ~loong ~riscv ~x86"
21 IUSE="+cli server test cet gui gtk3 gtk4 qt5 qt6 wayland +tcmalloc mimalloc"
23 # tested with FEATURES="-network-sandbox test"
24 # tested with FEATURES="network-sandbox test"
25 # tested with FEATURES="test"
26 RESTRICT="!test? ( test )"
28 REQUIRED_USE="
29 cet? ( ^^ ( amd64 x86 ) )
30 gui? ( || ( gtk3 gtk4 qt5 qt6 ) )
31 tcmalloc? ( !mimalloc )
34 PDEPEND="
35 app-misc/ca-certificates
38 RDEPEND="
39 net-libs/mbedtls
40 sys-libs/zlib
41 net-dns/c-ares
42 net-libs/nghttp2
43 dev-libs/jsoncpp
44 tcmalloc? ( dev-util/google-perftools )
45 mimalloc? ( dev-libs/mimalloc )
46 gui? (
47 gtk3? (
48 dev-libs/glib:2
49 x11-libs/gtk+:3[wayland?]
51 gtk4? (
52 dev-libs/glib:2
53 gui-libs/gtk:4[wayland?]
55 qt5? (
56 dev-qt/qtcore:5
57 dev-qt/qtgui:5
58 dev-qt/qtwidgets:5
59 wayland? ( dev-qt/qtwayland:5 )
61 qt6? (
62 dev-qt/qtbase:6=[dbus,gui,widgets,wayland?]
63 wayland? ( dev-qt/qtwayland:6 )
67 DEPEND="${RDEPEND}"
68 BDEPEND="
69 dev-lang/perl
70 dev-lang/go
71 >=dev-build/cmake-3.13.4
72 app-alternatives/ninja
73 virtual/pkgconfig
74 gui? (
75 gtk3? (
76 sys-devel/gettext
78 gtk4? (
79 sys-devel/gettext
82 test? ( net-misc/curl )
85 src_prepare() {
86 cmake_src_prepare
87 # some tests require network access, comment it out if not supported
88 if has network-sandbox ${FEATURES}; then
89 sed -i -e 's/BUILD_TESTS_NO_NETWORK/BUILD_TESTS/g' "${S}/CMakeLists.txt"
93 src_configure() {
94 local mycmakeargs=(
95 -DCMAKE_INSTALL_SYSCONFDIR=/etc
96 -DBUILD_SHARED_LIBS=off
97 -DUSE_LIBCXX=off
98 -DCLI=$(usex cli)
99 -DSERVER=$(usex server)
100 -DUSE_CET=$(usex cet)
101 -DBUILD_TESTS=$(usex test)
102 -DUSE_TCMALLOC=$(usex tcmalloc)
103 -DUSE_SYSTEM_TCMALLOC=$(usex tcmalloc)
104 -DUSE_MIMALLOC=$(usex mimalloc)
105 -DUSE_SYSTEM_MIMALLOC=$(usex mimalloc)
106 -DUSE_SYSTEM_MBEDTLS=on
107 -DUSE_ZLIB=on
108 -DUSE_SYSTEM_ZLIB=on
109 -DUSE_CARES=on
110 -DUSE_SYSTEM_CARES=on
111 -DUSE_SYSTEM_NGHTTP2=on
112 -DUSE_JSONCPP=on
113 -DUSE_SYSTEM_JSONCPP=on
116 if use qt6; then
117 mycmakeargs+=( -DGUI=ON -DUSE_QT6=ON )
118 elif use qt5; then
119 mycmakeargs+=( -DGUI=ON -DUSE_QT5=ON )
120 elif use gtk4; then
121 mycmakeargs+=( -DGUI=ON -DUSE_GTK4=ON )
122 elif use gtk3; then
123 mycmakeargs+=( -DGUI=ON -DUSE_GTK4=OFF )
124 else
125 mycmakeargs+=( -DGUI=OFF )
128 cmake_src_configure