diff --git a/packages/emulation/rcheevos/package.mk b/packages/emulation/rcheevos/package.mk new file mode 100644 index 0000000000..ec3070825e --- /dev/null +++ b/packages/emulation/rcheevos/package.mk @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="rcheevos" +PKG_VERSION="9.2.0" +PKG_SHA256="c8ed6ca74f905ea0c256250e46cced579922880001337e7c3d3d68179ad89d4e" +PKG_LICENSE="MIT" +PKG_SITE="https://github.com/RetroAchievements/rcheevos" +PKG_URL="https://github.com/RetroAchievements/rcheevos/archive/v${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_LONGDESC="Library to parse and evaluate achievements and leaderboards for RetroAchievements" +PKG_BUILD_FLAGS="+pic" + +post_unpack() { + # rcheevos doesn't come with any build files, use a copy of the cmake file in + # game.libretro (depends/common/rcheevos/CMakeLists.txt) + cp "${PKG_DIR}/source/CMakeLists.txt" "${PKG_BUILD}" +} diff --git a/packages/emulation/rcheevos/source/CMakeLists.txt b/packages/emulation/rcheevos/source/CMakeLists.txt new file mode 100644 index 0000000000..bda8019474 --- /dev/null +++ b/packages/emulation/rcheevos/source/CMakeLists.txt @@ -0,0 +1,64 @@ +project(rcheevos) + +cmake_minimum_required(VERSION 3.0) + +# Disable Lua for now +add_definitions(-DRC_DISABLE_LUA) + +include_directories( + include +) + +add_library(${PROJECT_NAME}lib + src/rcheevos/alloc.c + src/rcheevos/compat.c + src/rcheevos/condition.c + src/rcheevos/condset.c + src/rcheevos/consoleinfo.c + src/rcheevos/format.c + src/rcheevos/lboard.c + src/rcheevos/memref.c + src/rcheevos/operand.c + src/rcheevos/richpresence.c + src/rcheevos/runtime.c + src/rcheevos/runtime_progress.c + src/rcheevos/trigger.c + src/rcheevos/value.c + src/rhash/cdreader.c + src/rhash/hash.c + src/rhash/md5.c + src/rurl/url.c +) + +#add_dependencies(rcheevos +# lua # TODO +#) + +#target_link_libraries(rcheevos +# lua +#) + +install(TARGETS + ${PROJECT_NAME}lib + ARCHIVE DESTINATION + lib + DESTINATION + lib +) + +install( + FILES + include/rcheevos.h + include/rconsoles.h + include/rhash.h + include/rurl.h + DESTINATION + include/${PROJECT_NAME} +) + +#install( +# DIRECTORY +# include +# DESTINATION +# include +#)