]> Pileus Git - ~andy/sunrise/blobdiff - games-arcade/meandmyshadow/files/meandmyshadow-0.3-cmake.patch
games-arcade/meandmyshadow: respect GAMES_ variables as per bug 408811
[~andy/sunrise] / games-arcade / meandmyshadow / files / meandmyshadow-0.3-cmake.patch
index 7c8a9e17885fb7f6eb978b1c66602d27d505170f..6900e7a6843b5ba0ccc788df65d4a2b4e27b0495 100644 (file)
@@ -1,23 +1,39 @@
-# fix for modifiable directories
+Creator: hasufell <julian.ospald@googlemail.com>
+Date: Tue Mar 27 18:07:46 CEST 2012
+
+add Path options to build system
+see https://bugs.gentoo.org/show_bug.cgi?id=408811
 
 --- CMakeLists.txt
 +++ CMakeLists.txt
-@@ -85,8 +85,13 @@
+@@ -85,12 +85,20 @@
      ${CRYPTO_LIBRARY}
  )
  
 -install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION share/meandmyshadow/)
 -install(TARGETS meandmyshadow RUNTIME DESTINATION bin)
-+set(MEANDMYSHADOW_EXECUTABLE_DIR "bin" CACHE STRING "Path that represents the directory with meandmyshadow executable, CMAKE_INSTALL_PREFIX gets prepended")
-+set(MEANDMYSHADOW_DATA_DIR "share/meandmyshadow/data" CACHE STRING "Path that represents the directory with meandmyshadow data, CMAKE_INSTALL_PREFIX gets prepended")
++# Path options
++set(BINDIR "bin" CACHE STRING "Where to install binaries")
++set(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location")
++set(ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.")
++set(DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.")
 +
 +# install locations
-+install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION "${MEANDMYSHADOW_DATA_DIR}/meandmyshadow")
-+install(TARGETS meandmyshadow RUNTIME DESTINATION "${MEANDMYSHADOW_EXECUTABLE_DIR}")
++install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/)
++install(TARGETS meandmyshadow RUNTIME DESTINATION ${BINDIR})
 +
  if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") 
-       install(FILES meandmyshadow.desktop DESTINATION share/applications/)
-       install(FILES icons/16x16/meandmyshadow.png DESTINATION share/icons/hicolor/16x16/apps/)
+-      install(FILES meandmyshadow.desktop DESTINATION share/applications/)
+-      install(FILES icons/16x16/meandmyshadow.png DESTINATION share/icons/hicolor/16x16/apps/)
+-      install(FILES icons/32x32/meandmyshadow.png DESTINATION share/icons/hicolor/32x32/apps/)
+-      install(FILES icons/48x48/meandmyshadow.png DESTINATION share/icons/hicolor/48x48/apps/)
+-      install(FILES icons/64x64/meandmyshadow.png DESTINATION share/icons/hicolor/64x64/apps/)
++      install(FILES meandmyshadow.desktop DESTINATION ${DESKTOPDIR})
++      install(FILES icons/16x16/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/16x16/apps/)
++      install(FILES icons/32x32/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/32x32/apps/)
++      install(FILES icons/48x48/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/48x48/apps/)
++      install(FILES icons/64x64/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/64x64/apps/)
+ endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 --- src/config.h.in
 +++ src/config.h.in
 @@ -4,7 +4,7 @@
@@ -25,7 +41,7 @@
  //#define DATA_PATH
  #else
 -#define DATA_PATH "@CMAKE_INSTALL_PREFIX@/share/meandmyshadow/data/"
-+#define DATA_PATH "@CMAKE_INSTALL_PREFIX@/@MEANDMYSHADOW_DATA_DIR@/meandmyshadow/data/"
++#define DATA_PATH "@DATAROOTDIR@/meandmyshadow/data/"
  #endif
  
  #endif