games-rpg/zelda-roth-se: initial import

This commit is contained in:
Julian Ospald 2016-12-04 01:02:18 +01:00
parent c1d1232f31
commit d79dd8aba3
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,53 @@
From e9b5bd907f5b50b17d65ebe2fa50760d322c537c Mon Sep 17 00:00:00 2001
From: Christopho <christopho@solarus-games.org>
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}
)

View File

@ -0,0 +1,47 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# 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} <<EOF
#!/bin/sh
exec solarus-run "/usr/share/solarus/zelda_roth_se" "\$@"
EOF
install_desktop_entry "Name=Zelda: Return of the Hylian"
}