From d79dd8aba3beb6793f6031c8ef03e1c85ad88a7b Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 4 Dec 2016 01:02:18 +0100 Subject: [PATCH] games-rpg/zelda-roth-se: initial import --- ...bd907f5b50b17d65ebe2fa50760d322c537c.patch | 53 +++++++++++++++++++ .../zelda-roth-se-1.1.0.exheres-0 | 47 ++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 packages/games-rpg/zelda-roth-se/files/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.patch create mode 100644 packages/games-rpg/zelda-roth-se/zelda-roth-se-1.1.0.exheres-0 diff --git a/packages/games-rpg/zelda-roth-se/files/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.patch b/packages/games-rpg/zelda-roth-se/files/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.patch new file mode 100644 index 00000000..1ded5e21 --- /dev/null +++ b/packages/games-rpg/zelda-roth-se/files/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.patch @@ -0,0 +1,53 @@ +From e9b5bd907f5b50b17d65ebe2fa50760d322c537c Mon Sep 17 00:00:00 2001 +From: Christopho +Date: Fri, 12 Aug 2016 10:12:54 +0200 +Subject: [PATCH] Update cmake file to previous fixes from zsdx + +--- + CMakeLists.txt | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7bafe7a..f6286c9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,16 @@ project(ZELDA_ROTH_SE) + + set(quest_name "zelda_roth_se") + ++set(SOLARUS_INSTALL_DATAROOTDIR "share" CACHE PATH "dataroot dir") ++set(SOLARUS_INSTALL_DATADIR "${SOLARUS_INSTALL_DATAROOTDIR}/solarus" CACHE PATH "data dir") ++set(SOLARUS_INSTALL_BINDIR "bin" CACHE PATH "bin dir") ++ ++if (IS_ABSOLUTE ${SOLARUS_INSTALL_DATADIR}) ++ set(SOLARUS_INSTALL_ABSOLUTE_DATADIR ${SOLARUS_INSTALL_DATADIR}) ++else() ++ set(SOLARUS_INSTALL_ABSOLUTE_DATADIR ${CMAKE_INSTALL_PREFIX}/${SOLARUS_INSTALL_DATADIR}) ++endif() ++ + # data files list + file(GLOB_RECURSE data_files + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/data +@@ -47,7 +57,7 @@ add_custom_target(${quest_name}_data + add_custom_command( + OUTPUT ${quest_name} + COMMAND echo '\#!/bin/sh' > ${quest_name} +- COMMAND echo 'solarus-run ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $*' >> ${quest_name} ++ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name} + ) + add_custom_target(${quest_name}_command + ALL +@@ -56,11 +66,11 @@ add_custom_target(${quest_name}_command + + # install the data archive + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/data.solarus +- DESTINATION share/solarus/${quest_name} ++ DESTINATION ${SOLARUS_INSTALL_DATADIR}/${quest_name} + ) + + # install the script + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${quest_name} +- DESTINATION bin ++ DESTINATION ${SOLARUS_INSTALL_BINDIR} + ) + diff --git a/packages/games-rpg/zelda-roth-se/zelda-roth-se-1.1.0.exheres-0 b/packages/games-rpg/zelda-roth-se/zelda-roth-se-1.1.0.exheres-0 new file mode 100644 index 00000000..a54390e7 --- /dev/null +++ b/packages/games-rpg/zelda-roth-se/zelda-roth-se-1.1.0.exheres-0 @@ -0,0 +1,47 @@ +# Copyright 2016 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require desktop-utils +require github [ user=solarus-games tag=v${PV} ] +require cmake [ api=2 ] +require gtk-icon-cache + +SUMMARY="Zelda fangame with Solarus - Remake of Zelda Return of the Hylian" +HOMEPAGE="http://www.solarus-games.org/ ${HOMEPAGE}" + +LICENCES="CCPL-Attribution-ShareAlike-3.0 GPL-3" +SLOT="0" +PLATFORMS="~amd64 ~x86" + +DEPENDENCIES=" + build: + app-arch/zip + run: + games-engines/solarus[~>1.5.0] +" + +CMAKE_SRC_CONFIGURE_PARAMS=( + -DSOLARUS_INSTALL_DATAROOTDIR=/usr/share + -DSOLARUS_INSTALL_BINDIR="/usr/$(exhost --target)/bin" +) + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.patch +) + +src_install() { + cmake_src_install + + insinto /usr/share/icons/hicolor/128x128/apps + newins "${CMAKE_SOURCE}"/data/logos/icon_128.png ${PN}.png + + # install proper wrapper script + edo rm "${IMAGE%/}"/usr/$(exhost --target)/bin/zelda_roth_se + herebin ${PN} <