aboutsummaryrefslogtreecommitdiff
path: root/games/zbom/0001-Respect-solarus-install-variables.patch
diff options
context:
space:
mode:
authorHunter Sezen <orbea@riseup.net>2019-08-24 07:22:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-08-24 07:22:33 +0700
commit4d1fce68801fb022fcf3597b5c6b5b6806bab981 (patch)
tree23b8553cc81be3e8c0cec15b33069d9394163423 /games/zbom/0001-Respect-solarus-install-variables.patch
parentb1dcc0159444a4ba04b1de64fd569baff9fd1a0c (diff)
games/zbom: Added (Zelda fangame for the solarus engine).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/zbom/0001-Respect-solarus-install-variables.patch')
-rw-r--r--games/zbom/0001-Respect-solarus-install-variables.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/games/zbom/0001-Respect-solarus-install-variables.patch b/games/zbom/0001-Respect-solarus-install-variables.patch
new file mode 100644
index 000000000000..a16325f99809
--- /dev/null
+++ b/games/zbom/0001-Respect-solarus-install-variables.patch
@@ -0,0 +1,57 @@
+From 265c1fcc47b4981f5ed6eaa127d87924fa8e13b1 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Mon, 19 Aug 2019 15:50:42 -0700
+Subject: [PATCH] Respect solarus install variables.
+
+---
+ CMakeLists.txt | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a9f7bb2..bbea7efd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,16 @@ project(ZBOM)
+
+ set(quest_name "zbom")
+
++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
+@@ -46,8 +56,8 @@ add_custom_target(${quest_name}_data
+ # create a script that executes the engine with this quest
+ add_custom_command(
+ OUTPUT ${quest_name}
+- COMMAND echo '\#!/bin/bash' > ${quest_name}
+- COMMAND echo 'solarus ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $*' >> ${quest_name}
++ COMMAND echo '\#!/bin/sh' > ${quest_name}
++ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name}
+ )
+ add_custom_target(${quest_name}_command
+ ALL
+@@ -56,10 +66,10 @@ 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}
+ )
+--
+2.22.0
+