forked from hasufell/hasufell-repository
dev-games/mygui: fix install destinations after cmake.exlib change
This commit is contained in:
parent
e46fef040f
commit
112d4b18cd
@ -1,45 +0,0 @@
|
|||||||
From: Julian Ospald <hasufell@gentoo.org>
|
|
||||||
Date: Sat Oct 27 22:39:31 UTC 2012
|
|
||||||
Subject: FHS
|
|
||||||
Upstream: no
|
|
||||||
|
|
||||||
paths hardcoded until upstream fixed the logic
|
|
||||||
|
|
||||||
--- mygui-MyGUI3.2.2.orig/CMake/InstallResources.cmake
|
|
||||||
+++ mygui-MyGUI3.2.2/CMake/InstallResources.cmake
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
else ()
|
|
||||||
install(FILES
|
|
||||||
${MYGUI_BINARY_DIR}/bin/${FILENAME}
|
|
||||||
- DESTINATION "bin"
|
|
||||||
+ DESTINATION "/etc/MYGUI"
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
endfunction(install_file)
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
if (WIN32)
|
|
||||||
set(MYGUI_MEDIA_DIR "../../Media")
|
|
||||||
elseif (UNIX)
|
|
||||||
- set(MYGUI_MEDIA_DIR "../share/MYGUI/Media")
|
|
||||||
+ set(MYGUI_MEDIA_DIR "${CMAKE_INSTALL_PREFIX}/share/MYGUI/Media")
|
|
||||||
else ()
|
|
||||||
set(MYGUI_MEDIA_DIR "../../Media")
|
|
||||||
endif ()
|
|
||||||
--- mygui-MyGUI3.2.2.orig/Common/Base/Ogre/BaseManager.cpp
|
|
||||||
+++ mygui-MyGUI3.2.2/Common/Base/Ogre/BaseManager.cpp
|
|
||||||
@@ -49,13 +49,13 @@
|
|
||||||
mWindow(nullptr),
|
|
||||||
mExit(false),
|
|
||||||
mPluginCfgName("plugins.cfg"),
|
|
||||||
- mResourceXMLName("resources.xml"),
|
|
||||||
+ mResourceXMLName("/etc/MYGUI/resources.xml"),
|
|
||||||
mResourceFileName("MyGUI_Core.xml")
|
|
||||||
{
|
|
||||||
#if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
|
|
||||||
mResourcePath = macBundlePath() + "/Contents/Resources/";
|
|
||||||
#else
|
|
||||||
- mResourcePath = "";
|
|
||||||
+ mResourcePath = "/etc/MYGUI/";
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,168 @@
|
|||||||
|
From fbdfac84763ce525e7d243eefbb23c013db93e32 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Julian Ospald <hasufell@posteo.de>
|
||||||
|
Date: Tue, 24 May 2016 18:06:54 +0200
|
||||||
|
Subject: [PATCH] Use GNUInstallDirs
|
||||||
|
|
||||||
|
This will probably not make it upstream since they try to
|
||||||
|
be windows compatible.
|
||||||
|
---
|
||||||
|
CMake/ConfigureBuild.cmake | 2 +-
|
||||||
|
CMake/Utils/MyGUIConfigTargets.cmake | 40 +++++++++++++-------------
|
||||||
|
CMakeLists.txt | 1 +
|
||||||
|
MyGUIEngine/CMakeLists.txt | 2 +-
|
||||||
|
Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt | 2 +-
|
||||||
|
5 files changed, 24 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
|
||||||
|
index 9c6aad9..b655848 100644
|
||||||
|
--- a/CMake/ConfigureBuild.cmake
|
||||||
|
+++ b/CMake/ConfigureBuild.cmake
|
||||||
|
@@ -47,7 +47,7 @@ if (UNIX)
|
||||||
|
else ()
|
||||||
|
configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
|
||||||
|
endif ()
|
||||||
|
- install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)
|
||||||
|
+ install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|
||||||
|
# configure additional packages
|
||||||
|
|
||||||
|
diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake
|
||||||
|
index d48d2a3..61b80a5 100644
|
||||||
|
--- a/CMake/Utils/MyGUIConfigTargets.cmake
|
||||||
|
+++ b/CMake/Utils/MyGUIConfigTargets.cmake
|
||||||
|
@@ -60,27 +60,27 @@ endfunction(mygui_create_vcproj_userfile)
|
||||||
|
# install targets according to current build type
|
||||||
|
function(mygui_install_target TARGETNAME SUFFIX)
|
||||||
|
install(TARGETS ${TARGETNAME}
|
||||||
|
- RUNTIME DESTINATION "bin${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
|
||||||
|
- LIBRARY DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
|
||||||
|
- ARCHIVE DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
|
||||||
|
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
|
||||||
|
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
|
||||||
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
|
||||||
|
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Release None ""
|
||||||
|
)
|
||||||
|
install(TARGETS ${TARGETNAME}
|
||||||
|
- RUNTIME DESTINATION "bin${MYGUI_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
- LIBRARY DESTINATION "lib${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
- ARCHIVE DESTINATION "lib${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS RelWithDebInfo
|
||||||
|
)
|
||||||
|
install(TARGETS ${TARGETNAME}
|
||||||
|
- RUNTIME DESTINATION "bin${MYGUI_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
|
||||||
|
- LIBRARY DESTINATION "lib${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
|
||||||
|
- ARCHIVE DESTINATION "lib${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
|
||||||
|
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
|
||||||
|
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
|
||||||
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
|
||||||
|
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS MinSizeRel
|
||||||
|
)
|
||||||
|
install(TARGETS ${TARGETNAME}
|
||||||
|
- RUNTIME DESTINATION "bin${MYGUI_DEBUG_PATH}" CONFIGURATIONS Debug
|
||||||
|
- LIBRARY DESTINATION "lib${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
|
||||||
|
- ARCHIVE DESTINATION "lib${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
|
||||||
|
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}" CONFIGURATIONS Debug
|
||||||
|
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
|
||||||
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
|
||||||
|
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Debug
|
||||||
|
)
|
||||||
|
endfunction(mygui_install_target)
|
||||||
|
@@ -364,11 +364,11 @@ function(mygui_install_app PROJECTNAME)
|
||||||
|
if (MYGUI_INSTALL_PDB)
|
||||||
|
# install debug pdb files
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_DEBUG_PATH}/${PROJECTNAME}.pdb
|
||||||
|
- DESTINATION bin${MYGUI_DEBUG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
)
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_RELWDBG_PATH}/${PROJECTNAME}.pdb
|
||||||
|
- DESTINATION bin${MYGUI_RELWDBG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}
|
||||||
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
@@ -400,7 +400,7 @@ function(mygui_plugin PROJECTNAME)
|
||||||
|
set_target_properties(${PROJECTNAME} PROPERTIES PREFIX "")
|
||||||
|
|
||||||
|
install(FILES ${HEADER_FILES}
|
||||||
|
- DESTINATION include/MYGUI
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/MYGUI
|
||||||
|
)
|
||||||
|
endfunction(mygui_plugin)
|
||||||
|
|
||||||
|
@@ -431,20 +431,20 @@ function(mygui_config_lib PROJECTNAME)
|
||||||
|
# install debug pdb files
|
||||||
|
if (MYGUI_STATIC)
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/lib${MYGUI_LIB_DEBUG_PATH}/${PROJECTNAME}Static_d.pdb
|
||||||
|
- DESTINATION lib${MYGUI_LIB_DEBUG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
)
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/lib${MYGUI_LIB_RELWDBG_PATH}/${PROJECTNAME}Static.pdb
|
||||||
|
- DESTINATION lib${MYGUI_LIB_RELWDBG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}
|
||||||
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_DEBUG_PATH}/${PROJECTNAME}_d.pdb
|
||||||
|
- DESTINATION bin${MYGUI_DEBUG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
)
|
||||||
|
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_RELWDBG_PATH}/${PROJECTNAME}.pdb
|
||||||
|
- DESTINATION bin${MYGUI_RELWDBG_PATH}
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}
|
||||||
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
@@ -459,7 +459,7 @@ function(mygui_config_sample PROJECTNAME)
|
||||||
|
# set install RPATH for Unix systems
|
||||||
|
if (UNIX AND MYGUI_FULL_RPATH)
|
||||||
|
set_property(TARGET ${PROJECTNAME} APPEND PROPERTY
|
||||||
|
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
+ INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
set_property(TARGET ${PROJECTNAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
endif ()
|
||||||
|
endfunction(mygui_config_sample)
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 9fc5694..0cddafa 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -17,6 +17,7 @@ set(CMAKE_MODULE_PATH
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Packages"
|
||||||
|
)
|
||||||
|
+include(GNUInstallDirs)
|
||||||
|
include(CMakeDependentOption)
|
||||||
|
include(MacroLogFeature)
|
||||||
|
include(MyGUIConfigTargets)
|
||||||
|
diff --git a/MyGUIEngine/CMakeLists.txt b/MyGUIEngine/CMakeLists.txt
|
||||||
|
index c5eab54..839ff43 100644
|
||||||
|
--- a/MyGUIEngine/CMakeLists.txt
|
||||||
|
+++ b/MyGUIEngine/CMakeLists.txt
|
||||||
|
@@ -64,5 +64,5 @@ endif ()
|
||||||
|
|
||||||
|
# install MyGUIEngine headers
|
||||||
|
install(FILES ${HEADER_FILES}
|
||||||
|
- DESTINATION include/MYGUI
|
||||||
|
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/MYGUI"
|
||||||
|
)
|
||||||
|
diff --git a/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt b/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
|
||||||
|
index 169ad05..4bd7cd1 100644
|
||||||
|
--- a/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
|
||||||
|
+++ b/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
|
||||||
|
@@ -30,7 +30,7 @@ link_directories(${OPENGL_LIB_DIR} ${PNG_LIBRARY})
|
||||||
|
|
||||||
|
# installation rules
|
||||||
|
install(FILES ${HEADER_FILES}
|
||||||
|
- DESTINATION include/MYGUI
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/MYGUI
|
||||||
|
)
|
||||||
|
mygui_install_target(${PROJECTNAME} "")
|
||||||
|
|
||||||
|
--
|
||||||
|
2.8.3
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
Source: Julian Ospald <hasufell@posteo.de>
|
|
||||||
Upstream: no
|
|
||||||
Reason: Fix installation destination
|
|
||||||
|
|
||||||
diff -ru mygui-MyGUI3.2.2.orig/CMake/ConfigureBuild.cmake mygui-MyGUI3.2.2/CMake/ConfigureBuild.cmake
|
|
||||||
--- mygui-MyGUI3.2.2.orig/CMake/ConfigureBuild.cmake 2015-01-26 10:32:35.000000000 -0500
|
|
||||||
+++ mygui-MyGUI3.2.2/CMake/ConfigureBuild.cmake 2015-03-14 01:09:40.743621643 -0400
|
|
||||||
@@ -4,6 +4,8 @@
|
|
||||||
# also prepare package files for pkg-config and CMake.
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
+include(GNUInstallDirs)
|
|
||||||
+
|
|
||||||
# should we build static libs?
|
|
||||||
if (MYGUI_STATIC)
|
|
||||||
set(MYGUI_LIB_TYPE STATIC)
|
|
||||||
@@ -47,7 +49,7 @@
|
|
||||||
else ()
|
|
||||||
configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
|
|
||||||
endif ()
|
|
||||||
- install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)
|
|
||||||
+ install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
||||||
|
|
||||||
# configure additional packages
|
|
||||||
|
|
@ -26,11 +26,14 @@ DEPENDENCIES="
|
|||||||
|
|
||||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||||
-p0 "${FILES}"/${PNV}-underlinking.patch
|
-p0 "${FILES}"/${PNV}-underlinking.patch
|
||||||
-p1 "${FILES}"/${PNV}-build.patch
|
-p1 "${FILES}"/${PNV}-Use-GNUInstallDirs.patch
|
||||||
-p1 "${FILES}"/${PNV}-FHS.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
CMAKE_SRC_CONFIGURE_PARAMS=(
|
CMAKE_SRC_CONFIGURE_PARAMS=(
|
||||||
|
-DCMAKE_INSTALL_BINDIR="/usr$(exhost --target)/bin"
|
||||||
|
-DCMAKE_INSTALL_INCLUDEDIR="/usr/$(exhost --target)/include"
|
||||||
|
-DCMAKE_INSTALL_LIBDIR="/usr/$(exhost --target)/lib"
|
||||||
|
-DCMAKE_INSTALL_PREFIX="/usr"
|
||||||
-DMYGUI_BUILD_DEMOS=OFF
|
-DMYGUI_BUILD_DEMOS=OFF
|
||||||
-DMYGUI_BUILD_DOCS=OFF
|
-DMYGUI_BUILD_DOCS=OFF
|
||||||
-DMYGUI_BUILD_PLUGINS=ON
|
-DMYGUI_BUILD_PLUGINS=ON
|
||||||
@ -50,11 +53,9 @@ CMAKE_SRC_CONFIGURE_PARAMS=(
|
|||||||
src_install() {
|
src_install() {
|
||||||
cmake_src_install
|
cmake_src_install
|
||||||
|
|
||||||
keepdir /etc/MYGUI
|
|
||||||
|
|
||||||
# test media not needed at runtime
|
# test media not needed at runtime
|
||||||
edo rm -rf "${IMAGE}"/usr/share/MYGUI/Media/UnitTests
|
edo rm -r "${IMAGE}"/usr/share/MYGUI/Media/UnitTests
|
||||||
# wrapper not available for linux, remove related media
|
# wrapper not available for linux, remove related media
|
||||||
edo rm -rf "${IMAGE}"/usr/share/MYGUI/Media/Wrapper
|
edo rm -r "${IMAGE}"/usr/share/MYGUI/Media/Wrapper
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user