diff options
Diffstat (limited to 'games-action/openclonk/files/openclonk-5.5.1-paths.patch')
-rw-r--r-- | games-action/openclonk/files/openclonk-5.5.1-paths.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/games-action/openclonk/files/openclonk-5.5.1-paths.patch b/games-action/openclonk/files/openclonk-5.5.1-paths.patch new file mode 100644 index 000000000000..02776e21ed69 --- /dev/null +++ b/games-action/openclonk/files/openclonk-5.5.1-paths.patch @@ -0,0 +1,67 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Thu Feb 6 19:58:45 UTC 2014 +Subject: make paths modifiable + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,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 + ############################################################################ +@@ -1170,10 +1180,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) +@@ -1474,20 +1490,20 @@ + DEPENDS 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() + + if (NOT APPLE) + add_custom_target(groups DEPENDS ${OC_C4GROUPS}) + 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") + + # 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 . |