0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-31 10:41:48 +00:00

50 lines
1.6 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libretro-scummvm"
PKG_VERSION="6fa7403b8b1b6e18e3a3d02120b38aad6a73ad26"
PKG_SHA256="8b636d4a366962c381d8eeb5cc70f5fc598e9039eb2b89e4b006ea3c3f7969a9"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/libretro/scummvm"
PKG_URL="https://github.com/libretro/scummvm/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="ScummVM with libretro backend."
PKG_TOOLCHAIN="make"
PKG_LR_UPDATE_TAG="yes"
PKG_LIBNAME="scummvm_libretro.so"
PKG_LIBPATH="${PKG_LIBNAME}"
PKG_LIBVAR="SCUMMVM_LIB"
PKG_MAKE_OPTS_TARGET="all"
pre_make_target() {
CXXFLAGS+=" -DHAVE_POSIX_MEMALIGN=1"
if [ "${DEVICE}" = "OdroidGoAdvance" ]; then
PKG_MAKE_OPTS_TARGET+=" platform=oga_a35_neon_hardfloat"
else
PKG_MAKE_OPTS_TARGET+=" platform=${TARGET_NAME}"
fi
cd ${PKG_BUILD}/backends/platform/libretro
}
makeinstall_target() {
mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}
cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}
cp scummvm_libretro.info ${SYSROOT_PREFIX}/usr/lib/
echo "set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake
# unpack files to retroarch-system folder and create basic ini file
mkdir -p ${SYSROOT_PREFIX}/usr/share/retroarch/system
unzip scummvm.zip -d ${SYSROOT_PREFIX}/usr/share/retroarch/system
cat << EOF > ${SYSROOT_PREFIX}/usr/share/retroarch/system/scummvm.ini
[scummvm]
extrapath=/tmp/system/scummvm/extra
browser_lastpath=/tmp/system/scummvm/extra
themepath=/tmp/system/scummvm/theme
guitheme=scummmodern
EOF
}