mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
libretro-ppsspp: add package
This commit is contained in:
parent
aa426895a0
commit
d04d1f9349
73
packages/emulation/libretro-ppsspp/package.mk
Normal file
73
packages/emulation/libretro-ppsspp/package.mk
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2016 Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC 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 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
PKG_NAME="libretro-ppsspp"
|
||||||
|
PKG_VERSION="e1bb9da"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="GPLv2"
|
||||||
|
PKG_SITE="https://github.com/libretro/libretro-ppsspp"
|
||||||
|
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||||
|
PKG_DEPENDS_TARGET="toolchain kodi-platform"
|
||||||
|
PKG_SECTION="emulation"
|
||||||
|
PKG_SHORTDESC="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
|
||||||
|
PKG_LONGDESC="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
|
||||||
|
PKG_AUTORECONF="no"
|
||||||
|
PKG_IS_ADDON="no"
|
||||||
|
|
||||||
|
PKG_LIBNAME="ppsspp_libretro.so"
|
||||||
|
PKG_LIBPATH="libretro/$PKG_LIBNAME"
|
||||||
|
PKG_LIBVAR="PPSSPP_LIB"
|
||||||
|
|
||||||
|
pre_configure_target() {
|
||||||
|
# fails to build in subdirs
|
||||||
|
cd $ROOT/$PKG_BUILD
|
||||||
|
rm -rf .$TARGET_NAME
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_make_target() {
|
||||||
|
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads"
|
||||||
|
export CXXFLAGS="$CXXFLAGS -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads"
|
||||||
|
strip_lto
|
||||||
|
}
|
||||||
|
|
||||||
|
make_target() {
|
||||||
|
case $PROJECT in
|
||||||
|
RPi)
|
||||||
|
make -C libretro platform=armv6-gles-hardfloat-arm1176jzf-s
|
||||||
|
;;
|
||||||
|
RPi2)
|
||||||
|
make -C libretro platform=armv7-neon-gles-hardfloat-cortex-a7
|
||||||
|
;;
|
||||||
|
imx6)
|
||||||
|
make -C libretro platform=armv7-neon-gles-hardfloat-cortex-a9
|
||||||
|
;;
|
||||||
|
WeTek_Play)
|
||||||
|
make -C libretro platform=armv7-neon-gles-hardfloat-cortex-a9
|
||||||
|
;;
|
||||||
|
Generic)
|
||||||
|
make -C libretro
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
makeinstall_target() {
|
||||||
|
mkdir -p $INSTALL/usr/lib
|
||||||
|
cp $PKG_LIBPATH $INSTALL/usr/lib/$PKG_LIBNAME
|
||||||
|
echo "set($PKG_LIBVAR $INSTALL/usr/lib/$PKG_LIBNAME)" > $SYSROOT_PREFIX/usr/$PKG_NAME-config.cmake
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
diff -Naur a/libretro/Makefile b/libretro/Makefile
|
||||||
|
--- a/libretro/Makefile 2016-01-19 10:11:20.000000000 +0100
|
||||||
|
+++ b/libretro/Makefile 2016-01-19 10:27:00.009866912 +0100
|
||||||
|
@@ -201,8 +201,8 @@
|
||||||
|
|
||||||
|
# ARM
|
||||||
|
else ifneq (,$(findstring armv,$(platform)))
|
||||||
|
- CC = gcc
|
||||||
|
- CXX = g++
|
||||||
|
+ CC ?= gcc
|
||||||
|
+ CXX ?= g++
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
fpic := -fPIC
|
||||||
|
LDFLAGS += -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
@ -0,0 +1,27 @@
|
|||||||
|
diff -Naur a/libretro/Makefile b/libretro/Makefile
|
||||||
|
--- a/libretro/Makefile 2016-05-10 10:13:03.235599098 -0700
|
||||||
|
+++ b/libretro/Makefile 2016-05-10 10:41:33.975635164 -0700
|
||||||
|
@@ -237,6 +237,23 @@
|
||||||
|
PLATCFLAGS += -DARM
|
||||||
|
LDFLAGS += -lrt -ldl
|
||||||
|
|
||||||
|
+# aarch64
|
||||||
|
+else ifneq (,$(findstring aarch64,$(platform)))
|
||||||
|
+ CC ?= gcc
|
||||||
|
+ CXX ?= g++
|
||||||
|
+ TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
+ fpic := -fPIC
|
||||||
|
+ LDFLAGS += -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||||
|
+ FFMPEGINCFLAGS += -I$(FFMPEGDIR)/linux/$(FFMPEG_ARCH)/include
|
||||||
|
+ FFMPEGLIBDIR := $(FFMPEGDIR)/linux/$(FFMPEG_ARCH)/lib
|
||||||
|
+ FFMPEGLDFLAGS += -L$(FFMPEGLIBDIR) -lavformat -lavcodec -lavutil -lswresample -lswscale
|
||||||
|
+ INCFLAGS += -I.
|
||||||
|
+ WITH_DYNAREC=arm64
|
||||||
|
+ GLES := 1
|
||||||
|
+ GL_LIB := -lGLESv2 -lEGL
|
||||||
|
+ LDFLAGS += -lGLESv2 -lEGL
|
||||||
|
+ LDFLAGS += -lrt -ldl
|
||||||
|
+
|
||||||
|
# emscripten
|
||||||
|
else ifeq ($(platform), emscripten)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
|
@ -0,0 +1,104 @@
|
|||||||
|
diff -Naur a/ffmpeg/linux_aarch64.sh b/ffmpeg/linux_aarch64.sh
|
||||||
|
--- a/ffmpeg/linux_aarch64.sh 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
+++ b/ffmpeg/linux_aarch64.sh 2016-05-10 10:27:20.971393139 -0700
|
||||||
|
@@ -0,0 +1,100 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+GENERAL="\
|
||||||
|
+ --enable-cross-compile \
|
||||||
|
+ --extra-libs="-lgcc" \
|
||||||
|
+ --arch=aarch64 \
|
||||||
|
+ --cc=aarch64-libreelec-linux-gnueabi-gcc \
|
||||||
|
+ --cross-prefix=aarch64-libreelec-linux-gnueabi- \
|
||||||
|
+ --nm=aarch64-libreelec-linux-gnueabi-nm"
|
||||||
|
+
|
||||||
|
+MODULES="\
|
||||||
|
+ --disable-avdevice \
|
||||||
|
+ --disable-filters \
|
||||||
|
+ --disable-programs \
|
||||||
|
+ --disable-network \
|
||||||
|
+ --disable-avfilter \
|
||||||
|
+ --disable-postproc \
|
||||||
|
+ --disable-encoders \
|
||||||
|
+ --disable-protocols \
|
||||||
|
+ --disable-hwaccels \
|
||||||
|
+ --disable-doc"
|
||||||
|
+
|
||||||
|
+VIDEO_DECODERS="\
|
||||||
|
+ --enable-decoder=h264 \
|
||||||
|
+ --enable-decoder=mpeg4 \
|
||||||
|
+ --enable-decoder=mpeg2video \
|
||||||
|
+ --enable-decoder=mjpeg \
|
||||||
|
+ --enable-decoder=mjpegb"
|
||||||
|
+
|
||||||
|
+AUDIO_DECODERS="\
|
||||||
|
+ --enable-decoder=aac \
|
||||||
|
+ --enable-decoder=aac_latm \
|
||||||
|
+ --enable-decoder=atrac3 \
|
||||||
|
+ --enable-decoder=atrac3p \
|
||||||
|
+ --enable-decoder=mp3 \
|
||||||
|
+ --enable-decoder=pcm_s16le \
|
||||||
|
+ --enable-decoder=pcm_s8"
|
||||||
|
+
|
||||||
|
+DEMUXERS="\
|
||||||
|
+ --enable-demuxer=h264 \
|
||||||
|
+ --enable-demuxer=m4v \
|
||||||
|
+ --enable-demuxer=mpegvideo \
|
||||||
|
+ --enable-demuxer=mpegps \
|
||||||
|
+ --enable-demuxer=mp3 \
|
||||||
|
+ --enable-demuxer=avi \
|
||||||
|
+ --enable-demuxer=aac \
|
||||||
|
+ --enable-demuxer=pmp \
|
||||||
|
+ --enable-demuxer=oma \
|
||||||
|
+ --enable-demuxer=pcm_s16le \
|
||||||
|
+ --enable-demuxer=pcm_s8 \
|
||||||
|
+ --enable-demuxer=wav"
|
||||||
|
+
|
||||||
|
+VIDEO_ENCODERS="\
|
||||||
|
+ --enable-encoder=huffyuv \
|
||||||
|
+ --enable-encoder=ffv1 \
|
||||||
|
+ --enable-encoder=mjpeg"
|
||||||
|
+
|
||||||
|
+AUDIO_ENCODERS="\
|
||||||
|
+ --enable-encoder=pcm_s16le"
|
||||||
|
+
|
||||||
|
+MUXERS="\
|
||||||
|
+ --enable-muxer=avi"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+PARSERS="\
|
||||||
|
+ --enable-parser=h264 \
|
||||||
|
+ --enable-parser=mpeg4video \
|
||||||
|
+ --enable-parser=mpegaudio \
|
||||||
|
+ --enable-parser=mpegvideo \
|
||||||
|
+ --enable-parser=aac \
|
||||||
|
+ --enable-parser=aac_latm"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+function build_aarch64
|
||||||
|
+{
|
||||||
|
+./configure --target-os=linux \
|
||||||
|
+ --prefix=./linux/aarch64 \
|
||||||
|
+ ${GENERAL} \
|
||||||
|
+ --extra-cflags=" -O3 -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300" \
|
||||||
|
+ --disable-shared \
|
||||||
|
+ --enable-static \
|
||||||
|
+ --enable-zlib \
|
||||||
|
+ --enable-pic \
|
||||||
|
+ --disable-everything \
|
||||||
|
+ ${MODULES} \
|
||||||
|
+ ${VIDEO_DECODERS} \
|
||||||
|
+ ${AUDIO_DECODERS} \
|
||||||
|
+ ${VIDEO_ENCODERS} \
|
||||||
|
+ ${AUDIO_ENCODERS} \
|
||||||
|
+ ${DEMUXERS} \
|
||||||
|
+ ${MUXERS} \
|
||||||
|
+ ${PARSERS} \
|
||||||
|
+ --disable-neon
|
||||||
|
+
|
||||||
|
+make clean
|
||||||
|
+make install
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+build_aarch64
|
||||||
|
+echo Linux aarch64 build finished
|
41
tools/mkpkg/mkpkg_libretro-ppsspp
Executable file
41
tools/mkpkg/mkpkg_libretro-ppsspp
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
################################################################################
|
||||||
|
# This file is part of OpenELEC - http://www.openelec.tv
|
||||||
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||||
|
#
|
||||||
|
# OpenELEC 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 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
echo "getting sources..."
|
||||||
|
if [ ! -d libretro-ppsspp.git ]; then
|
||||||
|
git clone --depth=1 --recursive https://github.com/libretro/libretro-ppsspp libretro-ppsspp.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd libretro-ppsspp.git
|
||||||
|
git pull
|
||||||
|
GIT_REV=`git log -n1 --format=%h`
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo "copying sources..."
|
||||||
|
rm -rf libretro-ppsspp-$GIT_REV
|
||||||
|
cp -R libretro-ppsspp.git libretro-ppsspp-$GIT_REV
|
||||||
|
|
||||||
|
echo "cleaning sources..."
|
||||||
|
rm -rf libretro-ppsspp-$GIT_REV/.git
|
||||||
|
|
||||||
|
echo "packing sources..."
|
||||||
|
tar cvJf libretro-ppsspp-$GIT_REV.tar.xz libretro-ppsspp-$GIT_REV
|
||||||
|
|
||||||
|
echo "remove temporary sourcedir..."
|
||||||
|
rm -rf libretro-ppsspp-$GIT_REV
|
Loading…
x
Reference in New Issue
Block a user