2023-10-23 22:44:47 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2023-10-24 16:00:57 +00:00
|
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
2023-03-03 17:12:24 +00:00
|
|
|
|
|
|
|
PKG_NAME="box86"
|
2023-12-15 16:33:23 +00:00
|
|
|
PKG_VERSION="57c1ed71187b52a3480c9cbbb741d02307ccb14c"
|
2023-03-03 17:12:24 +00:00
|
|
|
PKG_ARCH="arm aarch64"
|
|
|
|
PKG_LICENSE="MIT"
|
|
|
|
PKG_SITE="https://github.com/ptitSeb/box86"
|
|
|
|
PKG_URL="${PKG_SITE}.git"
|
2023-06-29 20:10:01 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain ncurses SDL_sound"
|
2023-03-03 17:12:24 +00:00
|
|
|
PKG_LONGDESC="Box86 lets you run x86 Linux programs (such as games) on non-x86 Linux systems, like ARM."
|
|
|
|
PKG_TOOLCHAIN="cmake"
|
|
|
|
|
2023-06-29 20:10:01 +00:00
|
|
|
if [ "${OPENGL}" = "no" ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" gl4es"
|
|
|
|
fi
|
2023-03-03 17:12:24 +00:00
|
|
|
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DCMAKE_BUILD_TYPE=Release"
|
|
|
|
|
|
|
|
case ${TARGET_ARCH} in
|
|
|
|
aarch64)
|
|
|
|
make_target() {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
case ${TARGET_ARCH} in
|
|
|
|
arm)
|
2023-03-03 22:04:52 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/share/box86/lib
|
|
|
|
cp ${PKG_BUILD}/x86lib/* ${INSTALL}/usr/share/box86/lib
|
|
|
|
|
2023-03-03 17:12:24 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
2023-03-03 22:04:52 +00:00
|
|
|
cp ${PKG_BUILD}/.${TARGET_NAME}/box86 ${INSTALL}/usr/bin/
|
2023-03-03 17:35:29 +00:00
|
|
|
cp ${PKG_BUILD}/tests/bash ${INSTALL}/usr/bin/bash-x86
|
2023-03-03 17:12:24 +00:00
|
|
|
;;
|
|
|
|
aarch64)
|
2023-03-03 22:04:52 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/share/box86/lib
|
|
|
|
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/${PKG_NAME}-*/.install_pkg/usr/share/box86/lib/* ${INSTALL}/usr/share/box86/lib
|
|
|
|
|
2023-03-03 17:12:24 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/${PKG_NAME}-*/.install_pkg/usr/bin/* ${INSTALL}/usr/bin
|
2023-03-03 17:35:29 +00:00
|
|
|
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/${PKG_NAME}-*/tests/bash ${INSTALL}/usr/bin/bash-x86
|
2023-03-03 17:12:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
2023-03-03 22:04:52 +00:00
|
|
|
|
2023-03-05 17:09:43 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config
|
|
|
|
cp ${PKG_DIR}/config/box86.box86rc ${INSTALL}/usr/config/box86.box86rc
|
|
|
|
|
|
|
|
mkdir -p ${INSTALL}/etc
|
|
|
|
ln -sf /storage/.config/box86.box86rc ${INSTALL}/etc/box86.box86rc
|
|
|
|
|
2023-03-03 17:12:24 +00:00
|
|
|
mkdir -p ${INSTALL}/etc/binfmt.d
|
2023-03-05 16:12:48 +00:00
|
|
|
cp -f ${PKG_DIR}/config/box86.conf ${INSTALL}/etc/binfmt.d/box86.conf
|
2023-03-03 17:12:24 +00:00
|
|
|
}
|