Gentoo Archives: gentoo-commits

From: "Johannes Huber (johu)" <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-sound/kid3/files: kid3-3.0.1-rpath.patch kid3-3.0.1-qt5-automagic.patch
Date: Sun, 24 Nov 2013 17:36:43
Message-Id: 20131124173637.8B5BF2004B@flycatcher.gentoo.org
1 johu 13/11/24 17:36:37
2
3 Added: kid3-3.0.1-rpath.patch
4 kid3-3.0.1-qt5-automagic.patch
5 Log:
6 Version bump wrt bug #471974.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD)
9
10 Revision Changes Path
11 1.1 media-sound/kid3/files/kid3-3.0.1-rpath.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/kid3/files/kid3-3.0.1-rpath.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/kid3/files/kid3-3.0.1-rpath.patch?rev=1.1&content-type=text/plain
15
16 Index: kid3-3.0.1-rpath.patch
17 ===================================================================
18 diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
19 index 3eeaa3b..070d040 100644
20 --- a/src/app/CMakeLists.txt
21 +++ b/src/app/CMakeLists.txt
22 @@ -19,6 +19,21 @@ endif (BUILD_QT_APP)
23 if (BUILD_KDE_APP)
24 find_package(KDE4 REQUIRED)
25 include (KDE4Defaults)
26 +
27 + if (BUILD_SHARED_LIBS)
28 + # FindKDE4Internal.cmake will overwrite our RPATH if LIB_INSTALL_DIR (which
29 + # defaults to ${CMAKE_INSTALL_PREFIX}/lib) is not an implicit link directory.
30 + # In practice this means that most values for CMAKE_INSTALL_PREFIX other
31 + # than /usr will cause the RPATH to be overwritten and the kid3 executable
32 + # will not find its libraries. This happens also for the default value
33 + # /usr/local for CMAKE_INSTALL_PREFIX.
34 + # The RPATH is set again here to reverse this.
35 + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}" _isSystemDir)
36 + if ("${_isSystemDir}" STREQUAL "-1")
37 + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}")
38 + endif ("${_isSystemDir}" STREQUAL "-1")
39 + endif (BUILD_SHARED_LIBS)
40 +
41 add_subdirectory(kde)
42 kde4_install_icons(${ICON_INSTALL_DIR})
43 endif (BUILD_KDE_APP)
44
45
46
47 1.1 media-sound/kid3/files/kid3-3.0.1-qt5-automagic.patch
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/kid3/files/kid3-3.0.1-qt5-automagic.patch?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/kid3/files/kid3-3.0.1-qt5-automagic.patch?rev=1.1&content-type=text/plain
51
52 Index: kid3-3.0.1-qt5-automagic.patch
53 ===================================================================
54 commit eb0f92737ec44c496b34e6a370a16cda83dc391c
55 Author: Urs Fleisch <ufleisch@×××××××××××××××××.net>
56 Date: Sat Nov 23 10:41:40 2013 +0100
57
58 Fix automagic detection of Qt5, [bugs:#84].
59
60 diff --git a/CMakeLists.txt b/CMakeLists.txt
61 index 1f47bc2..c5bd306 100644
62 --- a/CMakeLists.txt
63 +++ b/CMakeLists.txt
64 @@ -23,6 +23,8 @@ project(kid3)
65 cmake_minimum_required(VERSION 2.8)
66
67 set(BUILD_SHARED_LIBS ON CACHE BOOL "build shared libraries")
68 +set(WITH_QT4 OFF CACHE BOOL "force use of Qt4")
69 +set(WITH_QT5 OFF CACHE BOOL "force use of Qt5")
70 set(WITH_TAGLIB ON CACHE BOOL "build with TagLib")
71 set(WITH_MP4V2 OFF CACHE BOOL "build with mp4v2")
72 set(WITH_ID3LIB ON CACHE BOOL "build with id3lib")
73 @@ -152,83 +154,111 @@ include (CheckCXXSourceCompiles)
74 include (CheckCXXCompilerFlag)
75 include (CheckLibraryExists)
76
77 -
78 +# Find Qt
79 +set(_qt5Dir)
80 set(QT_EXECUTABLE_COMPILE_FLAGS)
81 -string(REGEX MATCH "^(.*[Qq]t5.*).bin.qmake.*" _qt5Dir "${QT_QMAKE_EXECUTABLE}")
82 -if (_qt5Dir)
83 - set(_qt5Dir ${CMAKE_MATCH_1})
84 -endif (_qt5Dir)
85 -
86 -if (NOT _qt5Dir)
87 +if (NOT WITH_QT4)
88 + string(REGEX MATCH "^(.*[Qq]t5.*).bin.qmake.*" _qt5Dir "${QT_QMAKE_EXECUTABLE}")
89 + if (_qt5Dir)
90 + set(_qt5Dir ${CMAKE_MATCH_1})
91 + endif (_qt5Dir)
92 +endif (NOT WITH_QT4)
93 +
94 +if (NOT WITH_QT5 AND NOT _qt5Dir)
95 set(_QT4_COMPONENTS QtCore QtGui QtNetwork QtXml)
96 if (WIN32)
97 set(QT_USE_QTMAIN TRUE)
98 endif (WIN32)
99 set(QT_USE_QTDBUS ${WITH_DBUS})
100 find_package(Qt4 COMPONENTS ${_QT4_COMPONENTS})
101 - if (QT_QMAKE_EXECUTABLE)
102 + if (Qt4_FOUND)
103 include (${QT_USE_FILE})
104 - message(STATUS "Qt4 found, explicitly set QT_QMAKE_EXECUTABLE to use a different version.")
105 - else (QT_QMAKE_EXECUTABLE)
106 + if (NOT WITH_QT4)
107 + message(STATUS "Qt4 found, explicitly set WITH_QT5 or QT_QMAKE_EXECUTABLE to use a different version.")
108 + endif (NOT WITH_QT4)
109 + endif (Qt4_FOUND)
110 +endif (NOT WITH_QT5 AND NOT _qt5Dir)
111 +
112 +if (NOT WITH_QT4 AND NOT Qt4_FOUND)
113 + if (_qt5Dir)
114 + set(Qt5Core_DIR "${_qt5Dir}/lib/cmake/Qt5Core")
115 find_package(Qt5Core)
116 - if (Qt5Core_QMAKE_EXECUTABLE)
117 - set(_qt5Dir ${_qt5_corelib_install_prefix})
118 - else (Qt5Core_QMAKE_EXECUTABLE)
119 - message(FATAL_ERROR "Neither Qt4 nor Qt5 found.")
120 - endif (Qt5Core_QMAKE_EXECUTABLE)
121 - endif (QT_QMAKE_EXECUTABLE)
122 -endif (NOT _qt5Dir)
123 -
124 -if (_qt5Dir)
125 - set(HAVE_QT5 1)
126 - set(WITH_PHONON OFF)
127 - set(Qt5Core_DIR "${_qt5Dir}/lib/cmake/Qt5Core")
128 - set(Qt5Gui_DIR "${_qt5Dir}/lib/cmake/Qt5Gui")
129 - set(Qt5Widgets_DIR "${_qt5Dir}/lib/cmake/Qt5Widgets")
130 - set(Qt5Network_DIR "${_qt5Dir}/lib/cmake/Qt5Network")
131 - set(Qt5Xml_DIR "${_qt5Dir}/lib/cmake/Qt5Xml")
132 - set(Qt5Multimedia_DIR "${_qt5Dir}/lib/cmake/Qt5Multimedia")
133 - set(Qt5LinguistTools_DIR "${_qt5Dir}/lib/cmake/Qt5LinguistTools")
134 - set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
135 - set(QT_INCLUDES)
136 - set(QT_DEFINITIONS)
137 - set(QT_LIBRARIES)
138 - foreach (_qt5Component Core Gui Widgets Network Xml Multimedia LinguistTools Test)
139 - find_package("Qt5${_qt5Component}")
140 - set(QT_INCLUDES ${QT_INCLUDES} ${Qt5${_qt5Component}_INCLUDE_DIRS})
141 - set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5${_qt5Component}_DEFINITIONS})
142 - set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5${_qt5Component}_LIBRARIES})
143 - endforeach ()
144 - set(QT_EXECUTABLE_COMPILE_FLAGS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
145 - if (WITH_DBUS)
146 - set(Qt5DBus_DIR "${_qt5Dir}/lib/cmake/Qt5DBus")
147 - find_package("Qt5DBus")
148 - if (Qt5DBus_LIBRARIES)
149 - set(QT_INCLUDES ${QT_INCLUDES} ${Qt5DBus_INCLUDE_DIRS})
150 - set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5DBus_DEFINITIONS})
151 - set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5DBus_LIBRARIES})
152 + if (Qt5Core_FOUND)
153 + message(STATUS "Qt5Core found in ${_qt5Dir}")
154 + set(Qt5Gui_DIR "${_qt5Dir}/lib/cmake/Qt5Gui")
155 + set(Qt5Widgets_DIR "${_qt5Dir}/lib/cmake/Qt5Widgets")
156 + set(Qt5Network_DIR "${_qt5Dir}/lib/cmake/Qt5Network")
157 + set(Qt5Xml_DIR "${_qt5Dir}/lib/cmake/Qt5Xml")
158 + set(Qt5Multimedia_DIR "${_qt5Dir}/lib/cmake/Qt5Multimedia")
159 + set(Qt5LinguistTools_DIR "${_qt5Dir}/lib/cmake/Qt5LinguistTools")
160 + set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
161 + if (WITH_DBUS)
162 + set(Qt5DBus_DIR "${_qt5Dir}/lib/cmake/Qt5DBus")
163 + endif (WITH_DBUS)
164 + endif (Qt5Core_FOUND)
165 + else (_qt5Dir)
166 + find_package(Qt5Core)
167 + endif (_qt5Dir)
168 + if (Qt5Core_FOUND)
169 + set(HAVE_QT5 1)
170 + set(WITH_PHONON OFF)
171 + set(QT_INCLUDES)
172 + set(QT_DEFINITIONS)
173 + set(QT_LIBRARIES)
174 + set(_qt5Components Core Gui Widgets Network Xml Multimedia LinguistTools Test)
175 + if (WITH_DBUS)
176 + set(_qt5Components ${_qt5Components} DBus)
177 + endif (WITH_DBUS)
178 + foreach (_qt5Component ${_qt5Components})
179 + find_package("Qt5${_qt5Component}")
180 + if (Qt5${_qt5Component}_FOUND)
181 + set(QT_INCLUDES ${QT_INCLUDES} ${Qt5${_qt5Component}_INCLUDE_DIRS})
182 + set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5${_qt5Component}_DEFINITIONS})
183 + set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5${_qt5Component}_LIBRARIES})
184 + endif (Qt5${_qt5Component}_FOUND)
185 + endforeach ()
186 + if (Qt5DBus_FOUND)
187 set(HAVE_QTDBUS 1)
188 - endif (Qt5DBus_LIBRARIES)
189 - endif (WITH_DBUS)
190 - set(QT_LIBRARY_DIR "${_qt5Dir}/lib")
191 - set(QT_INCLUDE_DIR "${_qt5Dir}/include")
192 - set(QT_LUPDATE_EXECUTABLE ${_qt5Dir}/bin/lupdate)
193 - set(QT_PLUGINS_DIR ${_qt5Dir}/plugins)
194 -
195 - macro(qt4_add_translation)
196 - qt5_add_translation(${ARGV})
197 - endmacro(qt4_add_translation)
198 -
199 - macro(qt4_wrap_cpp)
200 - qt5_wrap_cpp(${ARGV})
201 - endmacro(qt4_wrap_cpp)
202 -
203 - macro(qt4_add_resources)
204 - qt5_add_resources(${ARGV})
205 - endmacro(qt4_add_resources)
206 -
207 - message(STATUS "Found Qt5: ${_qt5_corelib_install_prefix} (found version \"${Qt5Core_VERSION_STRING}\")")
208 -endif (_qt5Dir)
209 + endif (Qt5DBus_FOUND)
210 + set(QT_EXECUTABLE_COMPILE_FLAGS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
211 + get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
212 + get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
213 + get_target_property(QT_LUPDATE_EXECUTABLE Qt5::lupdate LOCATION)
214 + get_target_property(QT_PLUGINS_DIR Qt5::QJpegPlugin LOCATION)
215 + if (QT_PLUGINS_DIR)
216 + get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
217 + get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
218 + elseif (_qt5Dir)
219 + set(QT_PLUGINS_DIR ${_qt5Dir}/plugins)
220 + else (QT_PLUGINS_DIR)
221 + # Before Qt 5.2, there seems to be no way to get the plugins directory.
222 + # Assume it is on the same level as the bin directory.
223 + get_filename_component(QT_PLUGINS_DIR ${QT_LUPDATE_EXECUTABLE} PATH)
224 + get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
225 + set(QT_PLUGINS_DIR ${QT_PLUGINS_DIR}/plugins)
226 + endif (QT_PLUGINS_DIR)
227 +
228 + macro(qt4_add_translation)
229 + qt5_add_translation(${ARGV})
230 + endmacro(qt4_add_translation)
231 +
232 + macro(qt4_wrap_cpp)
233 + qt5_wrap_cpp(${ARGV})
234 + endmacro(qt4_wrap_cpp)
235 +
236 + macro(qt4_add_resources)
237 + qt5_add_resources(${ARGV})
238 + endmacro(qt4_add_resources)
239 +
240 + get_target_property(_qmakeLocation Qt5::qmake LOCATION)
241 + message(STATUS "Found Qt-Version ${Qt5Core_VERSION_STRING} (using ${_qmakeLocation})")
242 + endif (Qt5Core_FOUND)
243 +endif (NOT WITH_QT4 AND NOT Qt4_FOUND)
244 +
245 +if (NOT Qt4_FOUND AND NOT Qt5Core_FOUND)
246 + message(FATAL_ERROR "Neither Qt4 nor Qt5 found.")
247 +endif (NOT Qt4_FOUND AND NOT Qt5Core_FOUND)
248 +
249
250 # Check that QT_NO_DEBUG is defined for release configurations
251 foreach (_buildType RELWITHDEBINFO RELEASE MINSIZEREL)