2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
2023-10-24 16:00:57 +00:00
|
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
PKG_NAME="emulationstation"
|
2024-01-31 04:10:00 +00:00
|
|
|
PKG_VERSION="b298647ee7988cf2a34fedd4442f357f63c66597"
|
2023-07-07 18:07:12 +00:00
|
|
|
PKG_GIT_CLONE_BRANCH="main"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_REV="1"
|
|
|
|
PKG_ARCH="any"
|
|
|
|
PKG_LICENSE="GPL"
|
2023-07-07 18:07:12 +00:00
|
|
|
PKG_SITE="https://github.com/JustEnoughLinuxOS/emulationstation"
|
2022-03-05 17:33:17 +00:00
|
|
|
PKG_URL="${PKG_SITE}.git"
|
2023-11-15 01:56:59 +00:00
|
|
|
PKG_DEPENDS_TARGET="boost toolchain SDL2 freetype curl freeimage bash rapidjson SDL2_mixer fping p7zip alsa vlc drm_tool pugixml"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_NEED_UNPACK="busybox"
|
|
|
|
PKG_SHORTDESC="Emulationstation emulator frontend"
|
|
|
|
PKG_BUILD_FLAGS="-gold"
|
|
|
|
GET_HANDLER_SUPPORT="git"
|
2022-07-20 23:02:00 +00:00
|
|
|
PKG_PATCH_DIRS+="${DEVICE}"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-07-27 14:22:41 +00:00
|
|
|
if [ ! "${OPENGL}" = "no" ]; then
|
2022-08-27 22:02:42 +00:00
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGL} glu"
|
2022-08-28 18:42:14 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DGL=1"
|
2023-07-27 14:22:41 +00:00
|
|
|
fi
|
2022-07-11 10:58:58 +00:00
|
|
|
|
2023-07-27 14:22:41 +00:00
|
|
|
if [ ! "${OPENGLES_SUPPORT}" = no ]; then
|
2022-07-11 10:58:58 +00:00
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
2023-02-16 22:40:39 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DGLES2=1"
|
2022-07-11 10:58:58 +00:00
|
|
|
fi
|
|
|
|
|
2022-12-13 19:29:38 +00:00
|
|
|
if [ ! "${ENABLE_UPDATES}" = "no" ]; then
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_UPDATES=1"
|
|
|
|
else
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_UPDATES=0"
|
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-08-07 15:57:50 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_EMUELEC=1 -DDISABLE_KODI=1 -DENABLE_FILEMANAGER=0 -DCEC=0 -DENABLE_PULSE=1"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-05-25 16:47:55 +00:00
|
|
|
##########################################################################################################
|
|
|
|
# The following allows building Emulation station from local copy by using EMULATIONSTATION_SRC.
|
|
|
|
# The built makes symlinks to a local repository.
|
|
|
|
#
|
|
|
|
# One time setup:
|
|
|
|
# ---------------
|
|
|
|
# cd ~
|
|
|
|
# git clone https://github.com/JustEnoughLinuxOS/emulationstation.git
|
|
|
|
# cd emulationstation
|
|
|
|
# git submodule update --init
|
|
|
|
#
|
|
|
|
# Cleanup old files:
|
|
|
|
# ------------------
|
|
|
|
# DEVICE=RG351V ARCH=aarch64 ./scripts/clean emulationstation
|
|
|
|
#
|
|
|
|
# Build from local copy:
|
|
|
|
# ----------------------
|
|
|
|
# EMULATIONSTATION_SRC=~/emulationstation DEVICE=RG351V ARCH=aarch64 ./scripts/build emulationstation
|
|
|
|
#
|
|
|
|
# Run from the device:
|
|
|
|
# --------------------
|
2022-12-13 19:29:38 +00:00
|
|
|
# Copy ./emulationstation binary found in build.JELOS-<device>.aarch64/emulationstation-*/.install_pkg/usr/bin/
|
2022-05-25 16:47:55 +00:00
|
|
|
# Via ssh, run emulationstation with
|
|
|
|
# systemctl stop emustation
|
|
|
|
# chmod +x ./emulationstation
|
|
|
|
# ./emulationstation
|
|
|
|
##########################################################################################################
|
2022-06-03 11:39:08 +00:00
|
|
|
if [ -n "${EMULATIONSTATION_SRC}" ]; then
|
2022-05-25 16:47:55 +00:00
|
|
|
unpack() {
|
2022-06-03 11:39:08 +00:00
|
|
|
echo cp -PRf ${EMULATIONSTATION_SRC} ${PKG_BUILD}
|
2022-05-25 16:47:55 +00:00
|
|
|
cp -PRf ${EMULATIONSTATION_SRC} ${PKG_BUILD}
|
|
|
|
}
|
|
|
|
# add some symbolic links to point to a code in local source folder
|
|
|
|
post_unpack() {
|
2022-06-03 11:39:08 +00:00
|
|
|
rm -rf "${PKG_BUILD}/es-app"
|
|
|
|
ln -sf "${EMULATIONSTATION_SRC}/es-app" "${PKG_BUILD}"
|
2022-05-25 16:47:55 +00:00
|
|
|
|
2022-06-03 11:39:08 +00:00
|
|
|
rm -rf "${PKG_BUILD}/es-core"
|
|
|
|
ln -sf "${EMULATIONSTATION_SRC}/es-core" "${PKG_BUILD}"
|
2022-05-25 16:47:55 +00:00
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
pre_configure_target() {
|
2023-06-20 21:24:37 +00:00
|
|
|
for key in SCREENSCRAPER_DEV_LOGIN \
|
|
|
|
GAMESDB_APIKEY \
|
|
|
|
CHEEVOS_DEV_LOGIN
|
|
|
|
do
|
|
|
|
if [ -z "${!key}" ]
|
|
|
|
then
|
|
|
|
echo "WARNING: ${!key} not declared, will not build support."
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2023-06-03 09:25:13 +00:00
|
|
|
export DEVICE=$(echo ${DEVICE^^} | sed "s#-#_##g")
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config/locale
|
|
|
|
cp -rf ${PKG_BUILD}/locale/lang/* ${INSTALL}/usr/config/locale/
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config/emulationstation/resources
|
|
|
|
cp -rf ${PKG_BUILD}/resources/* ${INSTALL}/usr/config/emulationstation/resources/
|
|
|
|
rm -rf ${INSTALL}/usr/config/emulationstation/resources/logo.png
|
2022-05-02 11:34:33 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
cp ${PKG_BUILD}/es_settings ${INSTALL}/usr/bin
|
|
|
|
chmod 0755 ${INSTALL}/usr/bin/es_settings
|
2022-09-26 23:11:53 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
cp ${PKG_BUILD}/start_es.sh ${INSTALL}/usr/bin
|
|
|
|
chmod 0755 ${INSTALL}/usr/bin/start_es.sh
|
2022-08-28 18:42:14 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}
|
|
|
|
cp -rf ${PKG_DIR}/bluez/* ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
#ln -sf /storage/.config/emulationstation/resources ${INSTALL}/usr/bin/resources
|
|
|
|
cp -rf ${PKG_BUILD}/emulationstation ${INSTALL}/usr/bin
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/etc/emulationstation/
|
|
|
|
ln -sf /storage/.config/emulationstation/themes ${INSTALL}/etc/emulationstation/
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-10-17 13:11:57 +00:00
|
|
|
cp -rf ${PKG_DIR}/config/common/*.cfg ${INSTALL}/usr/config/emulationstation
|
2023-11-02 18:16:09 +00:00
|
|
|
|
2023-11-02 18:32:50 +00:00
|
|
|
# If we're not an emulation device, ES may still be installed so we need a default config.
|
2023-11-02 18:16:09 +00:00
|
|
|
if [ "${EMULATION_DEVICE}" = "no" ] || \
|
|
|
|
[ "${BASE_ONLY}" = "true" ]
|
|
|
|
then
|
2023-11-02 18:32:50 +00:00
|
|
|
cat <<EOF >${INSTALL}/etc/emulationstation/es_systems.cfg
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<systemList>
|
|
|
|
<system>
|
|
|
|
<name>tools</name>
|
|
|
|
<fullname>Tools</fullname>
|
|
|
|
<manufacturer>JELOS</manufacturer>
|
|
|
|
<release>2021</release>
|
|
|
|
<hardware>system</hardware>
|
|
|
|
<path>/storage/.config/modules</path>
|
|
|
|
<extension>.sh</extension>
|
2024-02-01 02:51:59 +00:00
|
|
|
<command>%ROM%</command>
|
2023-11-02 18:32:50 +00:00
|
|
|
<platform>tools</platform>
|
|
|
|
<theme>tools</theme>
|
|
|
|
</system>
|
|
|
|
</systemList>
|
|
|
|
EOF
|
2023-11-02 18:16:09 +00:00
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-11-02 18:32:50 +00:00
|
|
|
ln -sf /usr/config/emulationstation/es_systems.cfg ${INSTALL}/etc/emulationstation/es_systems.cfg
|
2023-10-17 13:11:57 +00:00
|
|
|
if [ -d "${PKG_DIR}/config/device/${DEVICE}" ]; then
|
|
|
|
cp -rf ${PKG_DIR}/config/device/${DEVICE}/*.cfg ${INSTALL}/usr/config/emulationstation
|
|
|
|
fi
|
2023-01-10 23:39:16 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
ln -sf /storage/.cache/system_timezone ${INSTALL}/etc/timezone
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-06-29 20:10:01 +00:00
|
|
|
#Delete all vulkan options from es_features when vulkan is not present
|
|
|
|
if [ ! "${VULKAN_SUPPORT}" = "yes" ]
|
|
|
|
then
|
|
|
|
sed -i '/vulkan/d' ${INSTALL}/usr/config/emulationstation/es_features.cfg
|
|
|
|
fi
|
2023-04-24 17:20:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
post_install() {
|
2023-06-20 21:24:37 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/share
|
|
|
|
ln -sf /storage/.config/locale ${INSTALL}/usr/share/locale
|
|
|
|
|
|
|
|
mkdir -p ${INSTALL}/usr/lib
|
|
|
|
ln -sf /usr/share/locale ${INSTALL}/usr/lib/locale
|
2023-04-24 16:19:57 +00:00
|
|
|
|
2023-06-20 21:24:37 +00:00
|
|
|
ln -sf /usr/share/locale ${INSTALL}/usr/config/emulationstation/locale
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
}
|