diff --git a/packages/emulation/libretro-uae/package.mk b/packages/emulation/libretro-uae/package.mk new file mode 100644 index 0000000000..bbd8d5ca31 --- /dev/null +++ b/packages/emulation/libretro-uae/package.mk @@ -0,0 +1,45 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2018-present 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 . +################################################################################ + +PKG_NAME="libretro-uae" +PKG_VERSION="555bfce" +PKG_SHA256="a28bb68a8bfec18e7d7122f9d8b28b0edad7e60cad4dfd98e4c4fd059b017f85" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/libretro/libretro-uae" +PKG_URL="https://github.com/libretro/libretro-uae/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain kodi-platform" +PKG_SECTION="emulation" +PKG_LONGDESC="libretro wrapper for UAE emulator." +PKG_BUILD_FLAGS="-lto" + +PKG_LIBNAME="puae_libretro.so" +PKG_LIBPATH="$PKG_LIBNAME" +PKG_LIBVAR="UAE_LIB" + +pre_configure_target() { + if [ "$TARGET_ARCH" = "arm" ]; then + CFLAGS="$CFLAGS -DARM -marm" + fi +} + +makeinstall_target() { + mkdir -p $SYSROOT_PREFIX/usr/lib/cmake/$PKG_NAME + cp $PKG_LIBPATH $SYSROOT_PREFIX/usr/lib/$PKG_LIBNAME + echo "set($PKG_LIBVAR $SYSROOT_PREFIX/usr/lib/$PKG_LIBNAME)" > $SYSROOT_PREFIX/usr/lib/cmake/$PKG_NAME/$PKG_NAME-config.cmake +}