net-proxy/trojan: add tcpfastopen, nat and reuseport use flag

Closes: https://bugs.gentoo.org/938213
Closes: https://github.com/gentoo/gentoo/pull/38213
Signed-off-by: blackteahamburger <blackteahamburger@outlook.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
blackteahamburger
2024-08-20 12:24:59 +08:00
committed by Yixun Lan
parent 89e26c64ff
commit bd2fde6865
2 changed files with 8 additions and 2 deletions

View File

@@ -25,6 +25,9 @@
</longdescription>
<use>
<flag name="mysql">build with MySQL support</flag>
<flag name="nat">Build with NAT support</flag>
<flag name="reuseport">Build with SO_REUSEPORT support</flag>
<flag name="tcpfastopen">Force build with TCP Fast Open support</flag>
</use>
<upstream>
<remote-id type="github">trojan-gfw/trojan</remote-id>

View File

@@ -1,7 +1,7 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
DISABLE_AUTOFORMATTING=1
FORCE_PRINT_ELOG=1
@@ -20,7 +20,7 @@ fi
LICENSE="GPL-3+"
SLOT="0"
IUSE="mysql test"
IUSE="mysql +nat +reuseport tcpfastopen test"
# Some hiccups setting up local network server.
RESTRICT="test"
@@ -50,6 +50,9 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
-DENABLE_MYSQL=$(usex mysql)
-DENABLE_NAT=$(usex nat)
-DENABLE_REUSE_PORT=$(usex reuseport)
-DFORCE_TCP_FASTOPEN=$(usex tcpfastopen)
-DSYSTEMD_SERVICE=ON
-DSYSTEMD_SERVICE_PATH=$(systemd_get_systemunitdir)
)