mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
net-proxy/Throne: pkgmove from net-proxy/nekoray
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
This commit is contained in:
2
net-proxy/Throne/Manifest
Normal file
2
net-proxy/Throne/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST nekoray-4.3.7-deps.tar.xz 5024296 BLAKE2B 98921ea6843db450f46f323476a6c2300b52d22097a907ef05afb26ac110a5dd23d1190c9d9e9a04d9b3e77ac77fd2ee9e4ef4378386f470c46d45c3012ec0c4 SHA512 f08025bbc92325adaf0aa3b47056eb8e76747d2ccb89a8e99632fedeaf4a6bba59e3cc2df9d367286e5a379b37a40f8f0b39cdee4b9198bf7932161bd1aedce2
|
||||
DIST nekoray-4.3.7.tar.gz 1272145 BLAKE2B 75b9cdedb77afc2d298bab3937e6774cb1dfa0508b0655c247962b6ae6ebd77bc877bf3209a1657ca61cc46b079c4a541223d47557a3c27c76cb331f99e37305 SHA512 036ce6235faa4d455e7cef723175ff496c44263629f59c3ba59133769c807ef557a8e8fd85fa36c637d3da36fc7a7c15610fb8f044ea3c34a9c4e4c27895c6d3
|
||||
89
net-proxy/Throne/Throne-4.3.7.ebuild
Normal file
89
net-proxy/Throne/Throne-4.3.7.ebuild
Normal file
@@ -0,0 +1,89 @@
|
||||
# Copyright 2025 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 -> nekoray-${PV}.tar.gz
|
||||
https://gitlab.com/api/v4/projects/69517529/packages/generic/nekoray/${PV}/nekoray-${PV}-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-cpp/abseil-cpp:=
|
||||
dev-libs/protobuf:=
|
||||
dev-libs/qhotkey
|
||||
dev-qt/qtbase:6[dbus,network,widgets]
|
||||
media-libs/quirc:=
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-cpp/fkYAML
|
||||
"
|
||||
BDEPEND="
|
||||
dev-qt/qttools:6[linguist]
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/nekoray-4.3.7-Use-system-fkYAML.patch"
|
||||
"${FILESDIR}/nekoray-4.3.7-Use-system-QHotkey.patch"
|
||||
"${FILESDIR}/nekoray-4.3.7-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
|
||||
|
||||
mv "nekoray-${PV}/core/server/vendor" "${S}/core/server" || die
|
||||
rmdir -p "nekoray-${PV}/core/server" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
rm -r 3rdparty/{fkYAML,QHotkey,quirc} || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DNKR_PACKAGE=true
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
cd "${S}/core/server" || die
|
||||
|
||||
VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box)
|
||||
ego build \
|
||||
-trimpath -ldflags "-w -s -X 'github.com/sagernet/sing-box/constant.Version=${VERSION_SINGBOX}'" \
|
||||
-tags "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_ech,with_dhcp"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /usr/lib/nekoray
|
||||
doexe "${BUILD_DIR}/nekoray"
|
||||
doexe core/server/nekobox_core
|
||||
|
||||
dosym -r /usr/lib/nekoray/nekoray /usr/bin/nekoray
|
||||
|
||||
doicon -s 256 res/public/nekobox.png
|
||||
domenu "${FILESDIR}/nekoray.desktop"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Use system `QHotkey`.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -45,7 +45,6 @@ message("[CMAKE_FIND_ROOT_PATH] ${CMAKE_FIND_ROOT_PATH}")
|
||||
|
||||
include("cmake/print.cmake")
|
||||
include("cmake/nkr.cmake")
|
||||
-include("cmake/QHotkey.cmake")
|
||||
|
||||
find_package(Threads)
|
||||
|
||||
@@ -57,6 +56,7 @@ include("cmake/myproto.cmake")
|
||||
list(APPEND NKR_EXTERNAL_TARGETS myproto)
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
+find_package(QHotkey CONFIG REQUIRED)
|
||||
list(APPEND NKR_EXTERNAL_TARGETS qhotkey)
|
||||
|
||||
# Sources
|
||||
--- a/src/ui/mainwindow.cpp
|
||||
+++ b/src/ui/mainwindow.cpp
|
||||
@@ -50,7 +50,7 @@
|
||||
#endif
|
||||
#include <QToolTip>
|
||||
#include <random>
|
||||
-#include <3rdparty/QHotkey/qhotkey.h>
|
||||
+#include <QHotkey>
|
||||
#include <include/api/gRPC.h>
|
||||
#include <include/global/HTTPRequestHelper.hpp>
|
||||
26
net-proxy/Throne/files/nekoray-4.3.7-Use-system-fkYAML.patch
Normal file
26
net-proxy/Throne/files/nekoray-4.3.7-Use-system-fkYAML.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Use system `fkYAML`.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -59,6 +59,8 @@ set(BUILD_SHARED_LIBS OFF)
|
||||
find_package(QHotkey CONFIG REQUIRED)
|
||||
list(APPEND NKR_EXTERNAL_TARGETS qhotkey)
|
||||
|
||||
+find_package(fkYAML CONFIG REQUIRED)
|
||||
+
|
||||
# Sources
|
||||
set(PROJECT_SOURCES
|
||||
${PLATFORM_SOURCES}
|
||||
--- a/src/configs/sub/GroupUpdater.cpp
|
||||
+++ b/src/configs/sub/GroupUpdater.cpp
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <QInputDialog>
|
||||
#include <QUrlQuery>
|
||||
|
||||
-#include "3rdparty/fkYAML/node.hpp"
|
||||
+#include <fkYAML/node.hpp>
|
||||
|
||||
namespace NekoGui_sub {
|
||||
37
net-proxy/Throne/files/nekoray-4.3.7-Use-system-quirc.patch
Normal file
37
net-proxy/Throne/files/nekoray-4.3.7-Use-system-quirc.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Use system `quirc`.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- a/3rdparty/QrDecoder.cpp
|
||||
+++ b/3rdparty/QrDecoder.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "QrDecoder.h"
|
||||
|
||||
-#include "quirc/quirc.h"
|
||||
+#include <quirc.h>
|
||||
|
||||
QrDecoder::QrDecoder()
|
||||
: m_qr(quirc_new())
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -83,11 +83,6 @@ set(PROJECT_SOURCES
|
||||
3rdparty/qv2ray/v2/ui/widgets/speedchart/SpeedWidget.hpp
|
||||
3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp
|
||||
|
||||
- 3rdparty/quirc/decode.c
|
||||
- 3rdparty/quirc/identify.c
|
||||
- 3rdparty/quirc/quirc.c
|
||||
- 3rdparty/quirc/version_db.c
|
||||
-
|
||||
src/api/gRPC.cpp
|
||||
|
||||
src/dataStore/Database.cpp
|
||||
@@ -263,6 +258,7 @@ target_link_libraries(nekoray PRIVATE
|
||||
Threads::Threads
|
||||
${NKR_EXTERNAL_TARGETS}
|
||||
${PLATFORM_LIBRARIES}
|
||||
+ quirc
|
||||
)
|
||||
|
||||
qt_finalize_executable(nekoray)
|
||||
11
net-proxy/Throne/files/nekoray.desktop
Normal file
11
net-proxy/Throne/files/nekoray.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Name=NekoRay
|
||||
Categories=Network;
|
||||
Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||
Comment[zh_CN]=基于 Qt 的跨平台代理配置管理器 (后端 sing-box)
|
||||
Keywords=Internet;VPN;Proxy;sing-box;
|
||||
Exec=nekoray
|
||||
Icon=nekobox
|
||||
12
net-proxy/Throne/metadata.xml
Normal file
12
net-proxy/Throne/metadata.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>contact@paveloom.dev</email>
|
||||
<name>Pavel Sobolev</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/throneproj/Throne/issues</bugs-to>
|
||||
<remote-id type="github">throneproj/Throne</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user