diff --git a/net-proxy/Throne/Manifest b/net-proxy/Throne/Manifest index c95dae70cd..b2d40a989c 100644 --- a/net-proxy/Throne/Manifest +++ b/net-proxy/Throne/Manifest @@ -2,3 +2,5 @@ DIST Throne-1.1.5-deps.tar.xz 188144256 BLAKE2B 29adf2ab3527309a0d5b2f4060676d82 DIST Throne-1.1.5.tar.gz 6024207 BLAKE2B db7e8ef87bbbc969e6bc2965ba3935eb5af6ba8b8342516d4ee0e8c58d6e1af939555df406a71286d3dea7d52d3d3c89f2c261edb7f987ca021407a1437fb5ee SHA512 06954dad74ba93b6d9c978252caa51c1d8a3c7af094507209c7b7643664cf61f2bc5cd8945d42cedd6a438e94beeb9922efef49d02f77edfce69b26a436a17fc DIST Throne-1.1.6-deps.tar.xz 188144812 BLAKE2B 64b1dbf7b4528ca3fc9ff1f42009f7f93bad8d80274442629b6da63e82a3bcf9ae4270966d222bbc5cd75a9c95d855747ef71a40facbb4b7a6303c676398b399 SHA512 4fad343224244d6db560b62eef480e3a2834fcdce3ad17bba669693bcee62123dd2b400f049f6d4fe3ca5b315480ab35792b79c3f2d51eb50b68d494765cf4f7 DIST Throne-1.1.6.tar.gz 6024688 BLAKE2B 4b8563f36b8b1ff868b5ea309216cce11bf53bf4ef0e57a621efe468f1776799bb3be636b07b916ccf05795a57274b2053dccd760e7fabc7e2313bedd637672f SHA512 1b84ded6596473822e29bc4a27895cb68ab58c50c51e7aa0102bc107f4b92dd899f5cfefef9cbda96506afd134ceae847c025a9fc6fa9486d1cc251e5037a115 +DIST Throne-1.2.1-deps.tar.xz 189110748 BLAKE2B 2d7bcf7f3145dabd6cc1e34dbfe325d43277a69e63f140a13c04e47e152172ff246ab15ad168dfd4fcb64a23e9f073e2472862cd475f6d09f5a62c8ebdfc0765 SHA512 a6442512cd627b1f5036df5ebe8bd60b166060cd66c73a2ee0911ec81e1adcb47fdf9ca0da20b51744a12c8342ee4cacd8bafc02787f11aa6fded358a5bbe03b +DIST Throne-1.2.1.tar.gz 6176523 BLAKE2B d91af46155725e8a24886985a56f69e5708e145d71c1b44d2534bf46f5d949e08069103a065452e4239d9c7e020a7eae76d4f3df922ab42a63e11dddf332e19b SHA512 f8669405a5fea483cff62e8050967cfa8cefc75c6b4256698516c3bc553756cb01085933f8cff4f4475d958c131e45437e2ecbd8e291c6badf8551591192b7c5 diff --git a/net-proxy/Throne/Throne-1.2.1.ebuild b/net-proxy/Throne/Throne-1.2.1.ebuild new file mode 100644 index 0000000000..e05eef4706 --- /dev/null +++ b/net-proxy/Throne/Throne-1.2.1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake desktop go-module xdg + +DESCRIPTION="Qt based cross-platform GUI proxy configuration manager" +HOMEPAGE="https://github.com/throneproj/Throne" +SRC_URI=" + https://github.com/throneproj/Throne/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://gitlab.com/api/v4/projects/69517529/packages/generic/${PN}/${PV}/${P}-deps.tar.xz +" + +# The first line is for the C++ code, the second line is for the Go module +LICENSE=" + GPL-3+ MIT + 0BSD Apache-2.0 BSD ISC MIT MPL-2.0 Unlicense +" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-libs/protobuf:= + dev-libs/qhotkey + dev-qt/qtbase:6[dbus,network,widgets] + media-libs/quirc:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-go/protobuf-go + dev-go/protoc-gen-go-grpc + >=dev-lang/go-1.26 + dev-qt/qttools:6[linguist] +" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.0-use-system-QHotkey.patch" + "${FILESDIR}/${PN}-1.1.1-dont-treat-warnings-as-errors.patch" + "${FILESDIR}/${PN}-1.1.1-use-system-quirc.patch" +) + +src_unpack() { + # The vendor tarball is unpacked to `${S}/core/server`, but `go-module_src_unpack` + # requires the `vendor` directory to be present at `${S}/vendor` + mkdir -p "${S}/vendor" || die + + go-module_src_unpack +} + +src_prepare() { + rm -r 3rdparty/{QHotkey,quirc} || die + + sed '/^cmake_minimum_required/ s/(.*)/(VERSION 3.10)/' \ + -i 3rdparty/SQLiteCpp/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DNKR_PACKAGE=true + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + cd "${S}/core/server" || die + + pushd gen || die + protoc -I . --go_out=. --go-grpc_out=. libcore.proto + popd || die + + VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box) + ego build \ + -trimpath -ldflags "-checklinkname=0 \ + -X 'github.com/sagernet/sing-box/constant.Version=${VERSION_SINGBOX}' \ + -X 'internal/godebug.defaultGODEBUG=multipathtcp=0'" \ + -tags "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_dhcp,with_tailscale,badlinkname,tfogo_checklinkname0" +} + +src_install() { + exeinto /usr/lib/Throne + doexe "${BUILD_DIR}/Throne" + doexe core/server/ThroneCore + + dosym -r /usr/lib/Throne/Throne /usr/bin/Throne + + doicon -s 256 res/public/Throne.png + domenu "${FILESDIR}/Throne.desktop" +}