# Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake git-r3 optfeature DESCRIPTION="Linux Userspace x86_64 Emulator with a twist" HOMEPAGE="https://box86.org" EGIT_REPO_URI="https://github.com/ptitSeb/box64.git" #SRC_URI="https://github.com/ptitSeb/${PN}/archive/refs/heads/main.tar.gz -> ${P}.tar.gz" #SRC_URI="https://github.com/ptitSeb/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~arm64 ~ppc64" IUSE=" +aot adlink android termux apple-m1 lx2160a odroid-n2 phytium rk3326 rk3399 rk3588 rpi3 rpi4 rpi5 snapdragon-845 snapdragon-888 snapdragon-8g2 tegra-x1 tegra-t194 tegra-t234 " REQUIRED_USE=" aot? ( || ( arm64 loong riscv ) ) termux? ( android ) ?? ( adlink apple-m1 lx2160a odroid-n2 phytium rk3326 rk3399 rk3588 rpi3 rpi4 rpi5 snapdragon-845 snapdragon-888 snapdragon-8g2 tegra-x1 tegra-t194 tegra-t234 ) apple-m1? ( arm64 ) lx2160a? ( arm64 ) odroid-n2? ( arm64 ) phytium? ( arm64 ) rk3326? ( arm64 ) rk3399? ( arm64 ) rk3588? ( arm64 ) rpi3? ( arm64 ) rpi4? ( arm64 ) rpi5? ( arm64 ) snapdragon-845? ( arm64 ) snapdragon-888? ( arm64 ) snapdragon-8g2? ( arm64 ) tegra-x1? ( arm64 ) tegra-t194? ( arm64 ) tegra-t234? ( arm64 ) " DEPEND="" RDEPEND="${DEPEND}" BDEPEND="" src_configure() { local -a mycmakeargs=( -DNOGIT=1 -DANDROID=$(usex android) -DTERMUX=$(usex termux) ) # not technically alpha, but this patch suggests it may also be applicable # https://github.com/ptitSeb/box64/pull/382/files use alpha && mycmakeargs+=( -DSW64=1 ) if use arm64; then mycmakeargs+=( -DARM64=1 -DARM_DYNAREC=$(usex aot) -DADLINK=$(usex adlink) -DM1=$(usex apple-m1) -DLX2160A=$(usex lx2160a) -DODROIDN2=$(usex odroid-n2) -DPHYTIUM=$(usex phytium) -DRK3326=$(usex rk3326) -DRK3399=$(usex rk3399) -DRK3588=$(usex rk3588) -DRPI3ARM64=$(usex rpi3) -DRPI4ARM64=$(usex rpi4) -DRPI5ARM64=$(usex rpi5) -DSD845=$(usex snapdragon-845) -DSD888=$(usex snapdragon-888) -DSD8G2=$(usex snapdragon-8g2) -DTEGRAX1=$(usex tegra-x1) -DTEGRA_T194=$(usex tegra-t194) -DTEGRA_T234=$(usex tegra-t234) ) fi use ppc64 && mycmakeargs+=( -DPPC64LE=1 ) use riscv && mycmakeargs+=( -DRV64=1 -DRV64_DYNAREC=$(usex aot) ) use loong && mycmakeargs+=( -DLARCH64=1 -DLARCH64_DYNAREC=$(usex aot) ) use amd64 && mycmakeargs+=( -DLD80BITS=1 -DNOALIGN=1 ) cmake_src_configure } pkg_postinst() { optfeature "OpenGL for GLES devices" \ "media-libs/gl4es" }