From: "Johannes Huber (johu)" <johu@gentoo.org>
To: gentoo-commits@lists.gentoo.org
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:37 +0000 (UTC) [thread overview]
Message-ID: <20131124173637.8B5BF2004B@flycatcher.gentoo.org> (raw)
johu 13/11/24 17:36:37
Added: kid3-3.0.1-rpath.patch
kid3-3.0.1-qt5-automagic.patch
Log:
Version bump wrt bug #471974.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD)
Revision Changes Path
1.1 media-sound/kid3/files/kid3-3.0.1-rpath.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/kid3/files/kid3-3.0.1-rpath.patch?rev=1.1&view=markup
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
Index: kid3-3.0.1-rpath.patch
===================================================================
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 3eeaa3b..070d040 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -19,6 +19,21 @@ endif (BUILD_QT_APP)
if (BUILD_KDE_APP)
find_package(KDE4 REQUIRED)
include (KDE4Defaults)
+
+ if (BUILD_SHARED_LIBS)
+ # FindKDE4Internal.cmake will overwrite our RPATH if LIB_INSTALL_DIR (which
+ # defaults to ${CMAKE_INSTALL_PREFIX}/lib) is not an implicit link directory.
+ # In practice this means that most values for CMAKE_INSTALL_PREFIX other
+ # than /usr will cause the RPATH to be overwritten and the kid3 executable
+ # will not find its libraries. This happens also for the default value
+ # /usr/local for CMAKE_INSTALL_PREFIX.
+ # The RPATH is set again here to reverse this.
+ list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}" _isSystemDir)
+ if ("${_isSystemDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}")
+ endif ("${_isSystemDir}" STREQUAL "-1")
+ endif (BUILD_SHARED_LIBS)
+
add_subdirectory(kde)
kde4_install_icons(${ICON_INSTALL_DIR})
endif (BUILD_KDE_APP)
1.1 media-sound/kid3/files/kid3-3.0.1-qt5-automagic.patch
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
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
Index: kid3-3.0.1-qt5-automagic.patch
===================================================================
commit eb0f92737ec44c496b34e6a370a16cda83dc391c
Author: Urs Fleisch <ufleisch@users.sourceforge.net>
Date: Sat Nov 23 10:41:40 2013 +0100
Fix automagic detection of Qt5, [bugs:#84].
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f47bc2..c5bd306 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ project(kid3)
cmake_minimum_required(VERSION 2.8)
set(BUILD_SHARED_LIBS ON CACHE BOOL "build shared libraries")
+set(WITH_QT4 OFF CACHE BOOL "force use of Qt4")
+set(WITH_QT5 OFF CACHE BOOL "force use of Qt5")
set(WITH_TAGLIB ON CACHE BOOL "build with TagLib")
set(WITH_MP4V2 OFF CACHE BOOL "build with mp4v2")
set(WITH_ID3LIB ON CACHE BOOL "build with id3lib")
@@ -152,83 +154,111 @@ include (CheckCXXSourceCompiles)
include (CheckCXXCompilerFlag)
include (CheckLibraryExists)
-
+# Find Qt
+set(_qt5Dir)
set(QT_EXECUTABLE_COMPILE_FLAGS)
-string(REGEX MATCH "^(.*[Qq]t5.*).bin.qmake.*" _qt5Dir "${QT_QMAKE_EXECUTABLE}")
-if (_qt5Dir)
- set(_qt5Dir ${CMAKE_MATCH_1})
-endif (_qt5Dir)
-
-if (NOT _qt5Dir)
+if (NOT WITH_QT4)
+ string(REGEX MATCH "^(.*[Qq]t5.*).bin.qmake.*" _qt5Dir "${QT_QMAKE_EXECUTABLE}")
+ if (_qt5Dir)
+ set(_qt5Dir ${CMAKE_MATCH_1})
+ endif (_qt5Dir)
+endif (NOT WITH_QT4)
+
+if (NOT WITH_QT5 AND NOT _qt5Dir)
set(_QT4_COMPONENTS QtCore QtGui QtNetwork QtXml)
if (WIN32)
set(QT_USE_QTMAIN TRUE)
endif (WIN32)
set(QT_USE_QTDBUS ${WITH_DBUS})
find_package(Qt4 COMPONENTS ${_QT4_COMPONENTS})
- if (QT_QMAKE_EXECUTABLE)
+ if (Qt4_FOUND)
include (${QT_USE_FILE})
- message(STATUS "Qt4 found, explicitly set QT_QMAKE_EXECUTABLE to use a different version.")
- else (QT_QMAKE_EXECUTABLE)
+ if (NOT WITH_QT4)
+ message(STATUS "Qt4 found, explicitly set WITH_QT5 or QT_QMAKE_EXECUTABLE to use a different version.")
+ endif (NOT WITH_QT4)
+ endif (Qt4_FOUND)
+endif (NOT WITH_QT5 AND NOT _qt5Dir)
+
+if (NOT WITH_QT4 AND NOT Qt4_FOUND)
+ if (_qt5Dir)
+ set(Qt5Core_DIR "${_qt5Dir}/lib/cmake/Qt5Core")
find_package(Qt5Core)
- if (Qt5Core_QMAKE_EXECUTABLE)
- set(_qt5Dir ${_qt5_corelib_install_prefix})
- else (Qt5Core_QMAKE_EXECUTABLE)
- message(FATAL_ERROR "Neither Qt4 nor Qt5 found.")
- endif (Qt5Core_QMAKE_EXECUTABLE)
- endif (QT_QMAKE_EXECUTABLE)
-endif (NOT _qt5Dir)
-
-if (_qt5Dir)
- set(HAVE_QT5 1)
- set(WITH_PHONON OFF)
- set(Qt5Core_DIR "${_qt5Dir}/lib/cmake/Qt5Core")
- set(Qt5Gui_DIR "${_qt5Dir}/lib/cmake/Qt5Gui")
- set(Qt5Widgets_DIR "${_qt5Dir}/lib/cmake/Qt5Widgets")
- set(Qt5Network_DIR "${_qt5Dir}/lib/cmake/Qt5Network")
- set(Qt5Xml_DIR "${_qt5Dir}/lib/cmake/Qt5Xml")
- set(Qt5Multimedia_DIR "${_qt5Dir}/lib/cmake/Qt5Multimedia")
- set(Qt5LinguistTools_DIR "${_qt5Dir}/lib/cmake/Qt5LinguistTools")
- set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
- set(QT_INCLUDES)
- set(QT_DEFINITIONS)
- set(QT_LIBRARIES)
- foreach (_qt5Component Core Gui Widgets Network Xml Multimedia LinguistTools Test)
- find_package("Qt5${_qt5Component}")
- set(QT_INCLUDES ${QT_INCLUDES} ${Qt5${_qt5Component}_INCLUDE_DIRS})
- set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5${_qt5Component}_DEFINITIONS})
- set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5${_qt5Component}_LIBRARIES})
- endforeach ()
- set(QT_EXECUTABLE_COMPILE_FLAGS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
- if (WITH_DBUS)
- set(Qt5DBus_DIR "${_qt5Dir}/lib/cmake/Qt5DBus")
- find_package("Qt5DBus")
- if (Qt5DBus_LIBRARIES)
- set(QT_INCLUDES ${QT_INCLUDES} ${Qt5DBus_INCLUDE_DIRS})
- set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5DBus_DEFINITIONS})
- set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5DBus_LIBRARIES})
+ if (Qt5Core_FOUND)
+ message(STATUS "Qt5Core found in ${_qt5Dir}")
+ set(Qt5Gui_DIR "${_qt5Dir}/lib/cmake/Qt5Gui")
+ set(Qt5Widgets_DIR "${_qt5Dir}/lib/cmake/Qt5Widgets")
+ set(Qt5Network_DIR "${_qt5Dir}/lib/cmake/Qt5Network")
+ set(Qt5Xml_DIR "${_qt5Dir}/lib/cmake/Qt5Xml")
+ set(Qt5Multimedia_DIR "${_qt5Dir}/lib/cmake/Qt5Multimedia")
+ set(Qt5LinguistTools_DIR "${_qt5Dir}/lib/cmake/Qt5LinguistTools")
+ set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
+ if (WITH_DBUS)
+ set(Qt5DBus_DIR "${_qt5Dir}/lib/cmake/Qt5DBus")
+ endif (WITH_DBUS)
+ endif (Qt5Core_FOUND)
+ else (_qt5Dir)
+ find_package(Qt5Core)
+ endif (_qt5Dir)
+ if (Qt5Core_FOUND)
+ set(HAVE_QT5 1)
+ set(WITH_PHONON OFF)
+ set(QT_INCLUDES)
+ set(QT_DEFINITIONS)
+ set(QT_LIBRARIES)
+ set(_qt5Components Core Gui Widgets Network Xml Multimedia LinguistTools Test)
+ if (WITH_DBUS)
+ set(_qt5Components ${_qt5Components} DBus)
+ endif (WITH_DBUS)
+ foreach (_qt5Component ${_qt5Components})
+ find_package("Qt5${_qt5Component}")
+ if (Qt5${_qt5Component}_FOUND)
+ set(QT_INCLUDES ${QT_INCLUDES} ${Qt5${_qt5Component}_INCLUDE_DIRS})
+ set(QT_DEFINITIONS ${QT_DEFINITIONS} ${Qt5${_qt5Component}_DEFINITIONS})
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5${_qt5Component}_LIBRARIES})
+ endif (Qt5${_qt5Component}_FOUND)
+ endforeach ()
+ if (Qt5DBus_FOUND)
set(HAVE_QTDBUS 1)
- endif (Qt5DBus_LIBRARIES)
- endif (WITH_DBUS)
- set(QT_LIBRARY_DIR "${_qt5Dir}/lib")
- set(QT_INCLUDE_DIR "${_qt5Dir}/include")
- set(QT_LUPDATE_EXECUTABLE ${_qt5Dir}/bin/lupdate)
- set(QT_PLUGINS_DIR ${_qt5Dir}/plugins)
-
- macro(qt4_add_translation)
- qt5_add_translation(${ARGV})
- endmacro(qt4_add_translation)
-
- macro(qt4_wrap_cpp)
- qt5_wrap_cpp(${ARGV})
- endmacro(qt4_wrap_cpp)
-
- macro(qt4_add_resources)
- qt5_add_resources(${ARGV})
- endmacro(qt4_add_resources)
-
- message(STATUS "Found Qt5: ${_qt5_corelib_install_prefix} (found version \"${Qt5Core_VERSION_STRING}\")")
-endif (_qt5Dir)
+ endif (Qt5DBus_FOUND)
+ set(QT_EXECUTABLE_COMPILE_FLAGS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
+ get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
+ get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
+ get_target_property(QT_LUPDATE_EXECUTABLE Qt5::lupdate LOCATION)
+ get_target_property(QT_PLUGINS_DIR Qt5::QJpegPlugin LOCATION)
+ if (QT_PLUGINS_DIR)
+ get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
+ get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
+ elseif (_qt5Dir)
+ set(QT_PLUGINS_DIR ${_qt5Dir}/plugins)
+ else (QT_PLUGINS_DIR)
+ # Before Qt 5.2, there seems to be no way to get the plugins directory.
+ # Assume it is on the same level as the bin directory.
+ get_filename_component(QT_PLUGINS_DIR ${QT_LUPDATE_EXECUTABLE} PATH)
+ get_filename_component(QT_PLUGINS_DIR ${QT_PLUGINS_DIR} PATH)
+ set(QT_PLUGINS_DIR ${QT_PLUGINS_DIR}/plugins)
+ endif (QT_PLUGINS_DIR)
+
+ macro(qt4_add_translation)
+ qt5_add_translation(${ARGV})
+ endmacro(qt4_add_translation)
+
+ macro(qt4_wrap_cpp)
+ qt5_wrap_cpp(${ARGV})
+ endmacro(qt4_wrap_cpp)
+
+ macro(qt4_add_resources)
+ qt5_add_resources(${ARGV})
+ endmacro(qt4_add_resources)
+
+ get_target_property(_qmakeLocation Qt5::qmake LOCATION)
+ message(STATUS "Found Qt-Version ${Qt5Core_VERSION_STRING} (using ${_qmakeLocation})")
+ endif (Qt5Core_FOUND)
+endif (NOT WITH_QT4 AND NOT Qt4_FOUND)
+
+if (NOT Qt4_FOUND AND NOT Qt5Core_FOUND)
+ message(FATAL_ERROR "Neither Qt4 nor Qt5 found.")
+endif (NOT Qt4_FOUND AND NOT Qt5Core_FOUND)
+
# Check that QT_NO_DEBUG is defined for release configurations
foreach (_buildType RELWITHDEBINFO RELEASE MINSIZEREL)
reply other threads:[~2013-11-24 17:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131124173637.8B5BF2004B@flycatcher.gentoo.org \
--to=johu@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox