Skip to content

new package: throne-1.1.1#59753

Draft
Nizarjh wants to merge 1 commit into
void-linux:masterfrom
Event-Horizon-VL:throne
Draft

new package: throne-1.1.1#59753
Nizarjh wants to merge 1 commit into
void-linux:masterfrom
Event-Horizon-VL:throne

Conversation

@Nizarjh

@Nizarjh Nizarjh commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Testing the changes

  • I tested the changes in this PR: briefly

New package

Local build testing

  • I built this PR locally for my native architecture, (x86_64-glibc)

closes #56762

@Nizarjh Nizarjh marked this pull request as draft April 5, 2026 03:30
@Nizarjh Nizarjh force-pushed the throne branch 5 times, most recently from cd16f40 to 25f0bfd Compare April 5, 2026 17:10
@Nizarjh Nizarjh marked this pull request as ready for review April 5, 2026 17:10
@Nizarjh

Nizarjh commented Apr 5, 2026

Copy link
Copy Markdown
Contributor Author

i really can't build this with cross

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Apr 5, 2026
@Nizarjh Nizarjh force-pushed the throne branch 2 times, most recently from 10c3bc1 to ac813c4 Compare April 13, 2026 10:21
@Nizarjh Nizarjh changed the title new package: throne-1.1.1 new package: throne-1.1.2] Apr 13, 2026
@Nizarjh Nizarjh changed the title new package: throne-1.1.2] new package: throne-1.1.2 Apr 13, 2026
@Nizarjh Nizarjh changed the title new package: throne-1.1.2 new package: throne-1.1.1 Apr 13, 2026
@Nizarjh

Nizarjh commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

Throne 1.1.2 has several issues and is currently not stable enough to be included in the repository. At minimum, it does not build on musl without applying patches to variables.

@rubygem17 rubygem17 mentioned this pull request May 9, 2026
1 task
Comment thread srcpkgs/throne/template Outdated
nocross=yes

post_fetch() {
xbps-fetch https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be in distfiles and needs a checksum.

@Nizarjh Nizarjh May 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't add it to distfiles because it's a file that gets generated every day. It's generated directly in the repository itself. Basically, someone trying to build this manually might get a SHA mismatch error.

https://github.com/throneproj/routeprofiles/tree/rule-set

And it's generated by a binary that is stored directly in the repository itself. I already opened an issue asking them to disclose the source code of that binary.
throneproj/routeprofiles#2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including unverified sources in builds is a no go.

Comment thread srcpkgs/throne/template Outdated
Comment thread srcpkgs/throne/template Outdated
export GOBIN="${wrksrc}/bin"
export PATH="${PATH}:${GOBIN}"
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think using go install and especially just a random version of programs at build time is acceptable. Those binaries should be packaged.

Comment thread srcpkgs/throne/template Outdated
Comment on lines +39 to +42
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all those environment variables are already set by build_style=go.

Comment thread srcpkgs/throne/template Outdated
Comment thread srcpkgs/throne/template
VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box)
go build -o "${wrksrc}/build" \
-ldflags="-linkmode=external -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_dhcp,with_tailscale"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what this does, what is the use, why is it using the version and building something that is already packaged?

Comment thread srcpkgs/throne/template Outdated
homepage="https://github.com/throneproj/Throne"
distfiles="https://github.com/throneproj/Throne/archive/${version}.tar.gz"
checksum=31d1af802503d657796774bbb5cb55553cbeafe433efdcbbb209ebd16f8b045d
nocross=yes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see why its nocross.

@Nizarjh Nizarjh marked this pull request as draft May 9, 2026 21:22
@chrysos349

Copy link
Copy Markdown
Contributor

Here is how to fix the crossbuild and distfiles issues. However, the template below will not be accepted, as Duncaen noted. You will need to handle the remaining problems, including creating the protoc‑gen‑go and protoc‑gen‑go‑grpc packages, etc.

# Template file for 'throne'
pkgname=throne
version=1.1.2
revision=1
_srclist_commit=d66c7371e644b89adef491f569a81ae35fd1384f
build_style=cmake
build_helper=qemu
hostmakedepends="gendesk go protobuf qt6-base qt6-tools"
makedepends="qt6-base-devel"
short_desc="Cross-platform GUI proxy utility (Empowered by sing-box)"
maintainer="Nizarjh <chel773@tutamail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/throneproj/Throne"
distfiles="https://github.com/throneproj/Throne/archive/${version}.tar.gz
https://raw.githubusercontent.com/throneproj/routeprofiles/${_srclist_commit}/srslist.h
"
checksum="39bc041266033909b5d91f0d6b2db7af853c3de53564fd2905187f7e1aecbca4
 0e63c608e0256a1b247f20b46093459586e7ce4b7b695b76449ddb5142340299"
skip_extraction=srslist.h

. $XBPS_COMMONDIR/environment/build-style/go.sh

post_configure() {
	vsrccopy srslist.h build
	gendesk -f -n \
		--pkgname "${pkgname}" \
		--pkgdesc "${short_desc}" \
		--name "${pkgname^}" \
		--categories 'Network'
	export GOBIN="${wrksrc}/bin"
	export PATH="${PATH}:${GOBIN}"
	GOARCH= go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
	GOARCH= go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
	cd "$wrksrc/core/server/gen" || exit 1
	protoc -I . --go_out=. --go-grpc_out=. libcore.proto
}

post_build() {
	cd "$wrksrc/core/server"
	export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
	VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box)
	go build -o "${wrksrc}/build" \
			-ldflags="-linkmode=external -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_dhcp,with_tailscale"
}

do_install() {
	vinstall "build/Throne" 755 /usr/lib/throne
	vinstall "build/ThroneCore" 755 /usr/lib/throne
	vbin     "${FILESDIR}/throne"
	vinstall "throne.desktop" 644 /usr/share/applications
	vinstall res/public/Throne.png 644 \
		usr/share/icons/hicolor/512x512/apps throne.png
}

cross.patch

--- a/3rdparty/simple-protobuf/cmake/spb_protobuf.cmake
+++ b/3rdparty/simple-protobuf/cmake/spb_protobuf.cmake
@@ -129,7 +129,7 @@ function(spb_protobuf_generate)
     else()
       add_custom_command(
         OUTPUT ${_generated_srcs}
-        COMMAND $<TARGET_FILE:spb-protoc> ARGS ${spb_PROTOC_OPTIONS} --cpp_out ${spb_PROTOC_OUT_DIR} ${_protobuf_include_path} ${_abs_file}
+        COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:spb-protoc> ARGS ${spb_PROTOC_OPTIONS} --cpp_out ${spb_PROTOC_OUT_DIR} ${_protobuf_include_path} ${_abs_file}
         DEPENDS ${_abs_file} spb-protoc ${spb_DEPENDENCIES}
         COMMENT ${_comment}
         VERBATIM )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: Throne

4 participants