]> Pileus Git - ~andy/sunrise/blobdiff - games-arcade/meandmyshadow/files/meandmyshadow-0.3-cmake.patch
games-arcade/meandmyshadow: New Ebuild for bug 408811 thanks to barul Enlik chithead
[~andy/sunrise] / games-arcade / meandmyshadow / files / meandmyshadow-0.3-cmake.patch
diff --git a/games-arcade/meandmyshadow/files/meandmyshadow-0.3-cmake.patch b/games-arcade/meandmyshadow/files/meandmyshadow-0.3-cmake.patch
new file mode 100644 (file)
index 0000000..7c8a9e1
--- /dev/null
@@ -0,0 +1,31 @@
+# fix for modifiable directories
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -85,8 +85,13 @@
+     ${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")
++
++# install locations
++install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION "${MEANDMYSHADOW_DATA_DIR}/meandmyshadow")
++install(TARGETS meandmyshadow RUNTIME DESTINATION "${MEANDMYSHADOW_EXECUTABLE_DIR}")
++
+ 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/)
+--- src/config.h.in
++++ src/config.h.in
+@@ -4,7 +4,7 @@
+ #if defined(WIN32)
+ //#define DATA_PATH
+ #else
+-#define DATA_PATH "@CMAKE_INSTALL_PREFIX@/share/meandmyshadow/data/"
++#define DATA_PATH "@CMAKE_INSTALL_PREFIX@/@MEANDMYSHADOW_DATA_DIR@/meandmyshadow/data/"
+ #endif
+ #endif