distribution/packages/games/libretro/ppsspp/package.mk

103 lines
3.6 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="ppsspp"
PKG_VERSION="5f10cabe5a0a4442e642d473f360e309288dd5f4"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/hrydgard/ppsspp"
PKG_URL="https://github.com/hrydgard/ppsspp.git"
PKG_DEPENDS_TARGET="toolchain SDL2 ffmpeg libzip"
PKG_LONGDESC="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
GET_HANDLER_SUPPORT="git"
PKG_LIBNAME="ppsspp_libretro.so"
2022-10-27 21:28:59 +00:00
PKG_LIBPATH="lib/${PKG_LIBNAME}"
if [ ! "${OPENGL}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd glew"
PKG_CMAKE_OPTS_TARGET+=" -DUSING_FBDEV=OFF \
-DUSING_GLES2=OFF"
fi
if [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_CMAKE_OPTS_TARGET+=" -DUSING_FBDEV=ON \
-DUSING_EGL=OFF \
-DUSING_GLES2=ON \
-DVULKAN=OFF \
-DUSE_VULKAN_DISPLAY_KHR=OFF\
-DUSING_X11_VULKAN=OFF"
fi
if [ "${VULKAN_SUPPORT}" = "yes" ]
then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN_DISPLAY_KHR=ON \
-DVULKAN=ON \
-DEGL_NO_X11=1
-DMESA_EGL_NO_X11_HEADERS=1"
else
PKG_CMAKE_OPTS_TARGET+=" -DVULKAN=OFF"
fi
2022-10-27 21:28:59 +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"
fi
2022-11-25 01:33:03 +00:00
case ${TARGET_ARCH} in
arm)
PKG_CMAKE_OPTS_TARGET+=" -DARMV7=ON"
;;
aarch64)
PKG_CMAKE_OPTS_TARGET+=" -DARM64=ON"
;;
esac
2022-10-27 21:28:59 +00:00
PKG_CMAKE_OPTS_TARGET+="${PKG_CMAKE_OPTS_TARGET} \
-DUSE_SYSTEM_FFMPEG=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Linux \
-DBUILD_SHARED_LIBS=OFF \
-DANDROID=OFF \
-DWIN32=OFF \
-DAPPLE=OFF \
-DLIBRETRO=ON \
-DCMAKE_CROSSCOMPILING=ON \
-DUSING_QT_UI=OFF \
-DUNITTEST=OFF \
-DSIMULATOR=OFF \
-DHEADLESS=OFF \
-DUSE_DISCORD=OFF"
2022-02-05 14:23:32 +00:00
pre_make_target() {
# fix cross compiling
2022-10-27 21:28:59 +00:00
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" \{} \;
2022-02-05 14:23:32 +00:00
}
makeinstall_target() {
2022-10-27 21:28:59 +00:00
mkdir -p ${INSTALL}/usr/lib/libretro
cp ${PKG_LIBPATH} ${INSTALL}/usr/lib/libretro/
2022-02-05 14:23:32 +00:00
}