Lakka-LibreELEC/packages/emulation/libretro-mgba/package.mk
2023-04-10 16:12:06 +02:00

33 lines
1.1 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libretro-mgba"
PKG_VERSION="a69c3434afe8b26cb8f9463077794edfa7d5efad"
PKG_SHA256="e166ad04c46b631f9001fff6155dbde956b57983fdcb4e50d8bbb57980b99840"
PKG_LICENSE="MPLv2.0"
PKG_SITE="https://github.com/libretro/mgba"
PKG_URL="https://github.com/libretro/mgba/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="mGBA Game Boy Advance Emulator"
PKG_TOOLCHAIN="make"
PKG_LIBNAME="mgba_libretro.so"
PKG_LIBPATH="../${PKG_LIBNAME}"
PKG_LIBVAR="MGBA_LIB"
PKG_MAKE_OPTS_TARGET="-C ../ -f Makefile.libretro"
if [ "${ARCH}" = "arm" ]; then
PKG_MAKE_OPTS_TARGET+=" platform=unix-armv"
fi
if target_has_feature neon ; then
PKG_MAKE_OPTS_TARGET+=" HAVE_NEON=1"
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
}