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)
|
2022-03-19 16:03:48 +00:00
|
|
|
# Copyright (C) 2022-present Fewtarius
|
2023-05-09 19:21:47 +00:00
|
|
|
|
2023-04-01 22:58:06 +00:00
|
|
|
PKG_NAME="ppsspp-sa"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_REV="1"
|
|
|
|
PKG_ARCH="any"
|
2023-05-01 13:12:01 +00:00
|
|
|
PKG_SITE="https://github.com/hrydgard/ppsspp"
|
|
|
|
PKG_URL="${PKG_SITE}.git"
|
2023-09-20 14:33:02 +00:00
|
|
|
PKG_VERSION="ad029e86d286ca8ec31049eca0988f6835dce0c2"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LICENSE="GPLv2"
|
2022-07-11 21:56:53 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain ffmpeg libzip SDL2 zlib zip"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_SHORTDESC="PPSSPPDL"
|
|
|
|
PKG_LONGDESC="PPSSPP Standalone"
|
|
|
|
GET_HANDLER_SUPPORT="git"
|
|
|
|
|
|
|
|
PKG_PATCH_DIRS+="${DEVICE}"
|
|
|
|
|
2023-02-22 21:54:01 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET=" -DUSE_SYSTEM_FFMPEG=OFF \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_SYSTEM_NAME=Linux \
|
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
2023-04-01 10:36:04 +00:00
|
|
|
-DUSE_SYSTEM_LIBPNG=OFF \
|
2023-02-22 21:54:01 +00:00
|
|
|
-DANDROID=OFF \
|
|
|
|
-DWIN32=OFF \
|
|
|
|
-DAPPLE=OFF \
|
|
|
|
-DCMAKE_CROSSCOMPILING=ON \
|
|
|
|
-DUSING_QT_UI=OFF \
|
|
|
|
-DUNITTEST=OFF \
|
|
|
|
-DSIMULATOR=OFF \
|
|
|
|
-DHEADLESS=OFF \
|
|
|
|
-DUSE_DISCORD=OFF"
|
|
|
|
|
2023-07-19 18:12:44 +00:00
|
|
|
if [[ "${OPENGL_SUPPORT}" = "yes" ]] && [[ ! "${DEVICE}" = "S922X" ]]; then
|
2022-10-05 21:52:20 +00:00
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd glew"
|
2022-07-11 21:56:53 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSING_FBDEV=OFF \
|
|
|
|
-DUSING_GLES2=OFF"
|
|
|
|
|
2023-07-19 18:12:44 +00:00
|
|
|
elif [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
2022-07-11 21:56:53 +00:00
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSING_FBDEV=ON \
|
|
|
|
-DUSING_EGL=OFF \
|
2023-07-19 18:12:44 +00:00
|
|
|
-DUSING_GLES2=ON"
|
2022-07-11 21:56:53 +00:00
|
|
|
fi
|
|
|
|
|
2022-11-03 10:28:20 +00:00
|
|
|
if [ "${VULKAN_SUPPORT}" = "yes" ]
|
|
|
|
then
|
|
|
|
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN_DISPLAY_KHR=ON \
|
|
|
|
-DVULKAN=ON \
|
2023-07-19 18:12:44 +00:00
|
|
|
-DEGL_NO_X11=1 \
|
2022-11-03 10:28:20 +00:00
|
|
|
-DMESA_EGL_NO_X11_HEADERS=1"
|
|
|
|
else
|
2023-07-19 18:12:44 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DVULKAN=OFF \
|
|
|
|
-DUSE_VULKAN_DISPLAY_KHR=OFF \
|
|
|
|
-DUSING_X11_VULKAN=OFF"
|
2022-11-03 10:28:20 +00:00
|
|
|
fi
|
2022-09-03 00:15:55 +00:00
|
|
|
|
2022-09-02 19:27:01 +00:00
|
|
|
if [ "${DISPLAYSERVER}" = "wl" ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" wayland ${WINDOWMANAGER}"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSE_WAYLAND_WSI=ON"
|
|
|
|
else
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSE_WAYLAND_WSI=OFF"
|
2022-07-11 21:56:53 +00:00
|
|
|
fi
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
pre_configure_target() {
|
2023-02-22 11:56:08 +00:00
|
|
|
sed -i 's/\-O[23]//g' ${PKG_BUILD}/CMakeLists.txt
|
|
|
|
sed -i "s|include_directories(/usr/include/drm)|include_directories(${SYSROOT_PREFIX}/usr/include/drm)|" ${PKG_BUILD}/CMakeLists.txt
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pre_make_target() {
|
|
|
|
export CPPFLAGS="${CPPFLAGS} -Wno-error"
|
|
|
|
export CFLAGS="${CFLAGS} -Wno-error"
|
|
|
|
|
|
|
|
# fix cross compiling
|
|
|
|
find ${PKG_BUILD} -name flags.make -exec sed -i "s:isystem :I:g" \{} \;
|
|
|
|
find ${PKG_BUILD} -name build.ninja -exec sed -i "s:isystem :I:g" \{} \;
|
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
2023-04-25 18:22:59 +00:00
|
|
|
cp ${PKG_DIR}/scripts/start_ppsspp.sh ${INSTALL}/usr/bin
|
2023-04-01 22:58:06 +00:00
|
|
|
cp PPSSPPSDL ${INSTALL}/usr/bin/ppsspp
|
2022-03-19 16:33:35 +00:00
|
|
|
chmod 0755 ${INSTALL}/usr/bin/*
|
2022-02-05 14:23:32 +00:00
|
|
|
ln -sf /storage/.config/ppsspp/assets ${INSTALL}/usr/bin/assets
|
|
|
|
mkdir -p ${INSTALL}/usr/config/ppsspp/PSP/SYSTEM
|
|
|
|
cp -r `find . -name "assets" | xargs echo` ${INSTALL}/usr/config/ppsspp/
|
|
|
|
cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/ppsspp/
|
2022-03-19 16:03:48 +00:00
|
|
|
if [ -d "${PKG_DIR}/sources/${DEVICE}" ]
|
2022-02-05 14:23:32 +00:00
|
|
|
then
|
2022-03-19 16:03:48 +00:00
|
|
|
cp ${PKG_DIR}/sources/${DEVICE}/* ${INSTALL}/usr/config/ppsspp/PSP/SYSTEM
|
2022-02-05 14:23:32 +00:00
|
|
|
fi
|
|
|
|
rm ${INSTALL}/usr/config/ppsspp/assets/gamecontrollerdb.txt
|
|
|
|
}
|