Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-games/mygui/files: mygui-3.2.0-FHS.patch mygui-3.2.0-build.patch mygui-3.2.0-underlinking.patch
Date: Wed, 31 Oct 2012 20:37:37
Message-Id: 20121031203720.4F82E21600@flycatcher.gentoo.org
1 hasufell 12/10/31 20:37:20
2
3 Added: mygui-3.2.0-FHS.patch mygui-3.2.0-build.patch
4 mygui-3.2.0-underlinking.patch
5 Log:
6 initial import wrt #261895
7
8 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
9
10 Revision Changes Path
11 1.1 dev-games/mygui/files/mygui-3.2.0-FHS.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-FHS.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-FHS.patch?rev=1.1&content-type=text/plain
15
16 Index: mygui-3.2.0-FHS.patch
17 ===================================================================
18 From: Julian Ospald <hasufell@g.o>
19 Date: Sat Oct 27 22:39:31 UTC 2012
20 Subject: FHS
21
22 paths hardcoded until upstream fixed the logic
23
24 --- Common/Base/Ogre/BaseManager.cpp
25 +++ Common/Base/Ogre/BaseManager.cpp
26 @@ -47,14 +47,14 @@
27 mWindow(nullptr),
28 mExit(false),
29 mPluginCfgName("plugins.cfg"),
30 - mResourceXMLName("resources.xml"),
31 + mResourceXMLName("/etc/MYGUI/resources.xml"),
32 mResourceFileName("MyGUI_Core.xml"),
33 mNode(nullptr)
34 {
35 #if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
36 mResourcePath = macBundlePath() + "/Contents/Resources/";
37 #else
38 - mResourcePath = "";
39 + mResourcePath = "/etc/MYGUI/";
40 #endif
41 }
42
43 @@ -65,12 +65,16 @@
44 bool BaseManager::create()
45 {
46 Ogre::String pluginsPath;
47 + char *homedir;
48 + homedir = getenv("HOME");
49 + std::string homePath;
50 + homePath = homedir;
51
52 #ifndef OGRE_STATIC_LIB
53 pluginsPath = mResourcePath + mPluginCfgName;
54 #endif
55
56 - mRoot = new Ogre::Root(pluginsPath, mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");
57 + mRoot = new Ogre::Root(pluginsPath, homePath + "/mygui-ogre.cfg", homePath + "/mygui-Ogre.log");
58
59 setupResources();
60
61 --- CMake/InstallResources.cmake
62 +++ CMake/InstallResources.cmake
63 @@ -24,7 +24,7 @@
64 else ()
65 install(FILES
66 ${MYGUI_BINARY_DIR}/bin/${FILENAME}
67 - DESTINATION "bin"
68 + DESTINATION "/etc/MYGUI"
69 )
70 endif ()
71 endfunction(install_file)
72 @@ -51,7 +51,7 @@
73 if (WIN32)
74 set(MYGUI_MEDIA_DIR "../../Media")
75 elseif (UNIX)
76 - set(MYGUI_MEDIA_DIR "../share/MYGUI/Media")
77 + set(MYGUI_MEDIA_DIR "${CMAKE_INSTALL_PREFIX}/share/MYGUI/Media")
78 else ()
79 set(MYGUI_MEDIA_DIR "../../Media")
80 endif ()
81
82
83
84 1.1 dev-games/mygui/files/mygui-3.2.0-build.patch
85
86 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-build.patch?rev=1.1&view=markup
87 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-build.patch?rev=1.1&content-type=text/plain
88
89 Index: mygui-3.2.0-build.patch
90 ===================================================================
91 From: Julian Ospald <hasufell@g.o>
92 Date: Fri Jun 15 21:58:45 UTC 2012
93
94 use proper destinations and allow Gentoo build type
95 rename demo targets to avoid confusion
96
97 --- CMake/Utils/MyGUIConfigTargets.cmake
98 +++ CMake/Utils/MyGUIConfigTargets.cmake
99 @@ -1,6 +1,8 @@
100 # Configure settings and install targets
101 # FIXME: Copypasted from Ogre and need lots of changes
102
103 +include(GNUInstallDirs)
104 +
105 if (WIN32)
106 set(MYGUI_RELEASE_PATH "/Release")
107 set(MYGUI_RELWDBG_PATH "/RelWithDebInfo")
108 @@ -56,6 +58,12 @@
109 # install targets according to current build type
110 function(mygui_install_target TARGETNAME SUFFIX)
111 install(TARGETS ${TARGETNAME}
112 + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" CONFIGURATIONS Gentoo ""
113 + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" CONFIGURATIONS Gentoo ""
114 + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" CONFIGURATIONS Gentoo ""
115 + FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Gentoo ""
116 + )
117 + install(TARGETS ${TARGETNAME}
118 RUNTIME DESTINATION "bin${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
119 LIBRARY DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
120 ARCHIVE DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
121 @@ -170,7 +178,13 @@
122 endif ()
123 add_executable(${PROJECTNAME} ${MYGUI_EXEC_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
124 endif ()
125 - set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER})
126 +
127 + # rename demo target
128 + if (${SOLUTIONFOLDER} STREQUAL "Demos")
129 + set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER} OUTPUT_NAME MYGUI-${PROJECTNAME})
130 + else()
131 + set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER})
132 + endif()
133
134 add_dependencies(${PROJECTNAME} MyGUIEngine Common)
135
136 @@ -326,4 +340,4 @@
137 INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
138 set_property(TARGET ${PROJECTNAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
139 endif ()
140 -endfunction(mygui_config_sample)
141 \ No newline at end of file
142 +endfunction(mygui_config_sample)
143 --- CMake/ConfigureBuild.cmake
144 +++ CMake/ConfigureBuild.cmake
145 @@ -4,6 +4,8 @@
146 # also prepare package files for pkg-config and CMake.
147 #######################################################################
148
149 +include(GNUInstallDirs)
150 +
151 # should we build static libs?
152 if (MYGUI_STATIC)
153 set(MYGUI_LIB_TYPE STATIC)
154 @@ -47,7 +49,7 @@
155 else ()
156 configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
157 endif ()
158 - install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)
159 + install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
160
161 # configure additional packages
162
163
164
165
166 1.1 dev-games/mygui/files/mygui-3.2.0-underlinking.patch
167
168 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-underlinking.patch?rev=1.1&view=markup
169 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-games/mygui/files/mygui-3.2.0-underlinking.patch?rev=1.1&content-type=text/plain
170
171 Index: mygui-3.2.0-underlinking.patch
172 ===================================================================
173 From: Julian Ospald <hasufell@g.o>
174 Date: Fri Jun 15 10:42:42 UTC 2012
175 Subject: build system
176
177 fix underlinking
178
179 --- MyGUIEngine/CMakeLists.txt
180 +++ MyGUIEngine/CMakeLists.txt
181 @@ -48,7 +48,10 @@
182 if (MYGUI_USE_FREETYPE)
183 target_link_libraries(${PROJECTNAME}
184 ${FREETYPE_LIBRARIES}
185 - )
186 + dl)
187 +else()
188 + target_link_libraries(${PROJECTNAME}
189 + dl)
190 endif()
191
192 # platform specific dependencies