Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: box64 #49599

Open
jaminW55 opened this issue Mar 30, 2024 · 6 comments
Open

Package request: box64 #49599

jaminW55 opened this issue Mar 30, 2024 · 6 comments
Labels
request Package request

Comments

@jaminW55
Copy link

Package name

box64

Package homepage

https://github.com/ptitSeb/box64

Description

Box64 lets you run x86_64 Linux programs (such as games) on non-x86_64 Linux systems, like ARM, Termux, Android, and more.

Does the requested package meet the package requirements?

System, Compiled

Is the requested package released?

Yes

@jaminW55 jaminW55 added the request Package request label Mar 30, 2024
@jaminW55
Copy link
Author

Hello,

I have actually been trying to build this package to run on Musl in an attempt to bypass restrictions in running certain programs on Musl.

I have not managed to successfully build it on Musl, but I did manage to build it on Glibc.

A) If someone would please like to build and test this package on Glibc, I would most appreciate it.
B) If anyone wouldn't mind looking into how to possibly build on Musl, if possible, I would also most appreciate it.

If the build passes all tests and requirements, please let me know and I will work to update my local void-packages repository and make a merge request to get this officially added to the repositories.

@jaminW55
Copy link
Author

# Template file for 'box64'
pkgname=box64
version=0.2.6
revision=1
build_style=cmake
hostmakedepends="cmake python3 git"
makedepends="libstdc++ gcc"
short_desc="Linux Userspace x86_64 Emulator with a twist"
maintainer="jaminW55 <jaminW@proton.me>"
license="MIT"
homepage="https://box64.org"
distfiles="https://github.com/ptitSeb/box64/archive/refs/tags/v${version}.tar.gz"
checksum=ef002041aeefec49efb9a2cb276ab4a99d048df0be06416b93b22e507e263f61

@chrysos349
Copy link
Contributor

I have not managed to successfully build it on Musl.

Nobody did. It's not supported. Read here - ptitSeb/box64#998 (comment)
I found the answer. So can you next time ;-) !

fixed template (not tested)
You will need specific builds for, e.g., rpi4, or rk3588. Generic aarch64 won't work for those.
See all the supported platforms here.

# Template file for 'box64'
pkgname=box64
version=0.2.6
revision=1
build_style=cmake
configure_args="-DNOGIT=1 -DNO_LIB_INSTALL=1"
hostmakedepends="perl python3"
short_desc="Linux Userspace x86_64 Emulator with a twist"
maintainer="jaminW55 <jaminW@proton.me>"
license="MIT"
homepage="https://box86.org"
changelog="https://raw.githubusercontent.com/ptitSeb/box64/main/docs/CHANGELOG.md"
distfiles="https://github.com/ptitSeb/box64/archive/v${version}.tar.gz"
checksum=ef002041aeefec49efb9a2cb276ab4a99d048df0be06416b93b22e507e263f61
conf_files="/etc/box64.box64rc"
nopie=yes

case "$XBPS_TARGET_MACHINE" in
	aarch64) configure_args+=" -DARM_DYNAREC=ON"         ;;
	riscv64) configure_args+=" -DRV64=1"                 ;;
	x86_64)  configure_args+=" -DLD80BITS=1 -DNOALIGN=1" ;;
	*)       broken="platform not supported"             ;;
esac

do_install() {
	vbin build/box64
	vdoc docs/USAGE.md
	vdoc docs/X64WINE.md
	vconf system/box64.box64rc
	vlicense LICENSE
	pod2man --center "Manual" --release "box64 ${version}" \
		docs/box64.pod > box64.1
	vman box64.1
}

fix-pod.patch

diff --git a/docs/box64.pod b/docs/box64.pod
index 3da39c71a..489f158a4 100644
--- a/docs/box64.pod
+++ b/docs/box64.pod
@@ -481,4 +481,6 @@ script. yyyy needs to be a full path to a valid x86_64 version of bash
     * 1 : Launch `gdb` when a segfault, bus error or illegal instruction signal is trapped, attached to the offending process and go in an endless loop, waiting. When in gdb, you need to find the correct thread yourself (the one with `my_box64signalhandler` in is stack) then probably need to `finish` 1 or 2 functions (inside `usleep(..)`) and then you'll be in `my_box64signalhandler`, just before the printf of the Segfault message. Then simply  `set waiting=0` to exit the infinite loop.
     * 2 : Launch `gdbserver` when a segfault, bus error or illegal instruction signal is trapped, attached to the offending process, and go in an endless loop, waiting. Use `gdb /PATH/TO/box64` and then `target remote 127.0.0.1:1234` to connect to the gdbserver (or use actual IP if not on the machine). After that, the procedure is the same as with ` BOX64_JITGDB=1`. This mode can be usefullwhen programs redirect all console output to a file (like Unity3D Games)
 
+=back
+
 =cut

@ahesford
Copy link
Member

If you're going to work on templates, please do so in a draft pull request, not as a series of comments in an issue.

@jaminW55
Copy link
Author

jaminW55 commented Mar 30, 2024

If you're going to work on templates, please do so in a draft pull request, not as a series of comments in an issue.

I'm pretty new to GH collaboration. Is there a similar project I could review as an example?
I do have a local pull of the repo that I update. I'd like to follow whatever is accepted practice here.

I did read CONTRIBUTING.MD, I simply want to see how it should look when done properly is all.

@jaminW55
Copy link
Author

I have not managed to successfully build it on Musl.

Nobody did. It's not supported. Read here - ptitSeb/box64#998 (comment) I found the answer. So can you next time ;-) !

fixed template (not tested) You will need specific builds for, e.g., rpi4, or rk3588. Generic aarch64 won't work for those. See all the supported platforms here.

# Template file for 'box64'
pkgname=box64
version=0.2.6
revision=1
build_style=cmake
configure_args="-DNOGIT=1 -DNO_LIB_INSTALL=1"
hostmakedepends="perl python3"
short_desc="Linux Userspace x86_64 Emulator with a twist"
maintainer="jaminW55 <jaminW@proton.me>"
license="MIT"
homepage="https://box86.org"
changelog="https://raw.githubusercontent.com/ptitSeb/box64/main/docs/CHANGELOG.md"
distfiles="https://github.com/ptitSeb/box64/archive/v${version}.tar.gz"
checksum=ef002041aeefec49efb9a2cb276ab4a99d048df0be06416b93b22e507e263f61
conf_files="/etc/box64.box64rc"
nopie=yes

case "$XBPS_TARGET_MACHINE" in
	aarch64) configure_args+=" -DARM_DYNAREC=ON"         ;;
	riscv64) configure_args+=" -DRV64=1"                 ;;
	x86_64)  configure_args+=" -DLD80BITS=1 -DNOALIGN=1" ;;
	*)       broken="platform not supported"             ;;
esac

do_install() {
	vbin build/box64
	vdoc docs/USAGE.md
	vdoc docs/X64WINE.md
	vconf system/box64.box64rc
	vlicense LICENSE
	pod2man --center "Manual" --release "box64 ${version}" \
		docs/box64.pod > box64.1
	vman box64.1
}

fix-pod.patch

diff --git a/docs/box64.pod b/docs/box64.pod
index 3da39c71a..489f158a4 100644
--- a/docs/box64.pod
+++ b/docs/box64.pod
@@ -481,4 +481,6 @@ script. yyyy needs to be a full path to a valid x86_64 version of bash

WOW. I've not seen some of these options in other packages.
I'll add to my glibC Chroot environment and give it some test runs before making any needed additions.

Thanks for the info as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Package request
Projects
None yet
Development

No branches or pull requests

3 participants