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

47 lines
1.4 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libretro-vecx"
PKG_VERSION="8e932c1d585ae9e467186dea9e73ce38fe1490f7"
PKG_SHA256="19eaa6d1ad035c01e979550787319f7d0b2398288f7c657eefea6c6d9b4cf49f"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/libretro/libretro-vecx"
PKG_URL="https://github.com/libretro/libretro-vecx/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="libretro adaptation of vecx"
PKG_TOOLCHAIN="make"
PKG_LIBNAME="vecx_libretro.so"
PKG_LIBPATH="${PKG_LIBNAME}"
PKG_LIBVAR="VECX_LIB"
PKG_MAKE_OPTS_TARGET="-f Makefile.libretro"
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL}"
fi
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
fi
if [ "${VULKAN_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${VULKAN}"
fi
if [ "${PROJECT}" = "RPi" ]; then
if [ "${OPENGLES}" = "mesa" ]; then
PKG_MAKE_OPTS_TARGET+=" platform=rpi-mesa"
else
PKG_MAKE_OPTS_TARGET+=" platform=rpi"
fi
elif [ "${OPENGLES_SUPPORT}" = "yes" ]; then
PKG_MAKE_OPTS_TARGET+=" HAS_GLES=1 GLES=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
}