diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-action/openclonk/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'games-action/openclonk/files')
3 files changed, 91 insertions, 0 deletions
diff --git a/games-action/openclonk/files/openclonk-7.0-paths.patch b/games-action/openclonk/files/openclonk-7.0-paths.patch new file mode 100644 index 000000000000..4ebd6034a59b --- /dev/null +++ b/games-action/openclonk/files/openclonk-7.0-paths.patch @@ -0,0 +1,68 @@ +Updated for openclonk-6.0, based on this patch: + From: Julian Ospald <hasufell@gentoo.org> + Date: Thu Feb 6 19:58:45 UTC 2014 + Subject: make paths modifiable + +--- openclonk-release-6.0-src.orig/CMakeLists.txt ++++ openclonk-release-6.0-src/CMakeLists.txt +@@ -42,6 +42,16 @@ + set(${_var} "${_string}" PARENT_SCOPE) + endfunction() + ++ ++############################################################################ ++# User selectable paths ++############################################################################ ++set(INSTALL_BINDIR "bin/" CACHE PATH "Binary install destination") ++set(INSTALL_GAMES_BINDIR "games/bin" CACHE PATH "Games binary install destination") ++set(INSTALL_DATAROOTDIR "share/" CACHE PATH "Data root install destination") ++set(INSTALL_DATADIR "${INSTALL_DATAROOTDIR}" CACHE PATH "Data install destination") ++ ++ + ############################################################################ + # User selectable options + ############################################################################ +@@ -1212,10 +1222,16 @@ + # Assemble compiler flags + ############################################################################ + if(UNIX) ++ if(NOT IS_ABSOLUTE "${INSTALL_DATADIR}") ++ set(ABSOLUTE_INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_DATADIR}") ++ else() ++ set(ABSOLUTE_INSTALL_DATADIR "${INSTALL_DATADIR}") ++ endif() ++ + # Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached, + # and when the path is changed both the old and new definition appears + # in the list of flags. +- add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/games/openclonk\"") ++ add_definitions("-DOC_SYSTEM_DATA_DIR=\"${ABSOLUTE_INSTALL_DATADIR}/openclonk\"") + endif() + if(OC_CXX_FLAGS) + list(REMOVE_DUPLICATES OC_CXX_FLAGS) +@@ -1537,7 +1553,7 @@ + DEPENDS "${native_c4group}" + VERBATIM + ) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION "${INSTALL_DATADIR}/openclonk") + endif() + endforeach() + +@@ -1546,13 +1562,13 @@ + add_dependencies(data groups) + + # Install new files +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION share/applications) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION "${INSTALL_DATAROOTDIR}/applications") + # Update the MIME cache -- this makes the clonk:// protocol handler actually work + install(CODE "execute_process(COMMAND update-desktop-database)") + + # Install binaries +- install(TARGETS openclonk DESTINATION games) +- install(TARGETS c4group DESTINATION bin) ++ install(TARGETS openclonk DESTINATION "${INSTALL_GAMES_BINDIR}") ++ install(TARGETS c4group DESTINATION "${INSTALL_BINDIR}") + else() + install(TARGETS openclonk + BUNDLE DESTINATION . diff --git a/games-action/openclonk/files/openclonk-7.0-postinst.patch b/games-action/openclonk/files/openclonk-7.0-postinst.patch new file mode 100644 index 000000000000..26ad61ec6784 --- /dev/null +++ b/games-action/openclonk/files/openclonk-7.0-postinst.patch @@ -0,0 +1,14 @@ +update-desktop-database is called from the pkg_postinst stage instead. + +--- openclonk-release-6.0-src.orig/CMakeLists.txt ++++ openclonk-release-6.0-src/CMakeLists.txt +@@ -1564,7 +1564,8 @@ + # Install new files + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION "${INSTALL_DATAROOTDIR}/applications") + # Update the MIME cache -- this makes the clonk:// protocol handler actually work +- install(CODE "execute_process(COMMAND update-desktop-database)") ++ # --> ebuild, pkg_postinst stage ++ #install(CODE "execute_process(COMMAND update-desktop-database)") + + # Install binaries + install(TARGETS openclonk DESTINATION "${INSTALL_GAMES_BINDIR}") diff --git a/games-action/openclonk/files/openclonk-wrapper-script.sh b/games-action/openclonk/files/openclonk-wrapper-script.sh new file mode 100644 index 000000000000..9f7e64442887 --- /dev/null +++ b/games-action/openclonk/files/openclonk-wrapper-script.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# wrapper prevents the game to look for .ocp files in the current dir +# which can lead to weird behavior and game freeze + +[ -d ~/.clonk/openclonk ] || mkdir -p ~/.clonk/openclonk + +cd ~/.clonk/openclonk + +exec clonk "$@" |