summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/kadu/files/kadu-0.10.1-buildsystem-improvements.patch')
-rw-r--r--net-im/kadu/files/kadu-0.10.1-buildsystem-improvements.patch272
1 files changed, 272 insertions, 0 deletions
diff --git a/net-im/kadu/files/kadu-0.10.1-buildsystem-improvements.patch b/net-im/kadu/files/kadu-0.10.1-buildsystem-improvements.patch
new file mode 100644
index 000000000000..d437ddd27da9
--- /dev/null
+++ b/net-im/kadu/files/kadu-0.10.1-buildsystem-improvements.patch
@@ -0,0 +1,272 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4417de6..70dbba3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,10 +4,9 @@ project (kadu)
+ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+-option (BUILD_PLUGINS "Switch to Off if you do not want to build plugins" ON)
+
+ # configuration
+-option (INSTALL_CMAKE_MODULE "Install cmake modules" ON)
++option (BUILD_PLUGINS "Switch to Off if you do not want to build plugins" ON)
+ if (UNIX)
+ option (SIG_HANDLING_ENABLED "Define if you want system signals handling" ON)
+ if (UNIX AND NOT APPLE)
+@@ -106,14 +105,15 @@ else (APPLE)
+ endif (APPLE)
+ endmacro (kadu_source_subdirectories)
+
++set (KADU_INSTALLS_SDK TRUE)
+ include (cmake/FindKadu.cmake)
+ include_directories (${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/kadu-core ${QT_INCLUDES})
+
+-if (INSTALL_CMAKE_MODULE)
++if (INSTALL_SDK)
+ install (FILES cmake/FindKadu.cmake DESTINATION ${KADU_CMAKE_MODULES_DIR})
+ install (PROGRAMS translations/plugintsupdate.sh DESTINATION ${KADU_PLUGINS_DIR}/sdk)
+ install (FILES translations/configuration-ui.xsl DESTINATION ${KADU_PLUGINS_DIR}/sdk)
+-endif (INSTALL_CMAKE_MODULE)
++endif (INSTALL_SDK)
+
+ # build
+ configure_file (${CMAKE_SOURCE_DIR}/kadu-config.h.cmake ${CMAKE_BINARY_DIR}/kadu-config.h)
+diff --git a/Plugins.cmake b/Plugins.cmake
+index ad63f20..524c164 100644
+--- a/Plugins.cmake
++++ b/Plugins.cmake
+@@ -1,4 +1,4 @@
+-set (COMPILE_PLUGINS
++set (DEFAULT_PLUGINS
+
+ # protocols
+ # GaduGadu protocol suppot
+@@ -100,7 +100,7 @@ set (COMPILE_PLUGINS
+ # Platform-speficic plugins
+
+ if (UNIX)
+- list (APPEND COMPILE_PLUGINS
++ list (APPEND DEFAULT_PLUGINS
+
+ # mediaplayer
+ # MPD mediaplayer support
+@@ -111,7 +111,7 @@ if (UNIX)
+ endif (UNIX)
+
+ if (UNIX AND NOT APPLE)
+- list (APPEND COMPILE_PLUGINS
++ list (APPEND DEFAULT_PLUGINS
+
+ # notifiers
+ # Freedesktop notification support
+@@ -130,7 +130,7 @@ if (UNIX AND NOT APPLE)
+ endif (UNIX AND NOT APPLE)
+
+ if (APPLE)
+- list (APPEND COMPILE_PLUGINS
++ list (APPEND DEFAULT_PLUGINS
+
+ # notifiers
+ # Growl notification support
+@@ -143,7 +143,7 @@ if (APPLE)
+ endif (APPLE)
+
+ if (WIN32)
+- list (APPEND COMPILE_PLUGINS
++ list (APPEND DEFAULT_PLUGINS
+
+ # mediaplayer
+ # Winamp Media Player support
+@@ -152,4 +152,35 @@ if (WIN32)
+ endif (WIN32)
+
+ # Sort the list so plugins will be built in alphabetical order
+-list (SORT COMPILE_PLUGINS)
++list (SORT DEFAULT_PLUGINS)
++
++# We must remember that the defaults may change and we want all Git users who didn't set
++# COMPILE_PLUGINS by hand to always have current defaults.
++# So if it is the very first run (and the user didn't manually specify COMPILE_PLUGINS)
++# or last time default plugins were compiled and the user didn't change COMPILE_PLUGINS manually,
++# pick the default plugins.
++if ((NOT COMPILE_PLUGINS) OR (HAVE_DEFAULT_PLUGINS AND ("${OLD_COMPILE_PLUGINS}" STREQUAL "${COMPILE_PLUGINS}")))
++ set (COMPILE_PLUGINS ${DEFAULT_PLUGINS})
++ set (HAVE_DEFAULT_PLUGINS "TRUE" CACHE INTERNAL "" FORCE)
++else ((NOT COMPILE_PLUGINS) OR (HAVE_DEFAULT_PLUGINS AND ("${OLD_COMPILE_PLUGINS}" STREQUAL "${COMPILE_PLUGINS}")))
++ # Replace whitespace and commas with semicolons
++ string (REGEX REPLACE "[ \t\n\r,]" ";" COMPILE_PLUGINS "${COMPILE_PLUGINS}")
++ # Convert to list
++ set (COMPILE_PLUGINS ${COMPILE_PLUGINS})
++
++ # Remove empty entries
++ list (REMOVE_ITEM COMPILE_PLUGINS "")
++
++ # Sort the list locally so we can compare with the default
++ set (_compile_plugins ${COMPILE_PLUGINS})
++ list (SORT _compile_plugins)
++
++ if ("${_compile_plugins}" STREQUAL "${DEFAULT_PLUGINS}")
++ set (HAVE_DEFAULT_PLUGINS "TRUE" CACHE INTERNAL "" FORCE)
++ else ("${_compile_plugins}" STREQUAL "${DEFAULT_PLUGINS}")
++ set (HAVE_DEFAULT_PLUGINS "FALSE" CACHE INTERNAL "" FORCE)
++ endif ("${_compile_plugins}" STREQUAL "${DEFAULT_PLUGINS}")
++endif ((NOT COMPILE_PLUGINS) OR (HAVE_DEFAULT_PLUGINS AND ("${OLD_COMPILE_PLUGINS}" STREQUAL "${COMPILE_PLUGINS}")))
++
++set (COMPILE_PLUGINS "${COMPILE_PLUGINS}" CACHE STRING "Plugins to compile" FORCE)
++set (OLD_COMPILE_PLUGINS "${COMPILE_PLUGINS}" CACHE INTERNAL "" FORCE)
+diff --git a/cmake/FindKadu.cmake b/cmake/FindKadu.cmake
+index dfa54e2..94f9c7c 100644
+--- a/cmake/FindKadu.cmake
++++ b/cmake/FindKadu.cmake
+@@ -62,6 +62,9 @@ if (CMAKE_COMPILER_IS_GNUCXX)
+ endif (CMAKE_COMPILER_IS_GNUCXX)
+
+ option (ENABLE_DEVELOPER_BUILD "Turn on some features helpful during development process (has nothing to do with debugging symbols)" OFF)
++if (KADU_INSTALLS_SDK)
++ option (INSTALL_SDK "Install SDK (API headers, cmake modules)" ON)
++endif (KADU_INSTALLS_SDK)
+
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR ENABLE_DEVELOPER_BUILD OR WIN32)
+ set (DEBUG_ENABLED 1)
+@@ -133,10 +136,16 @@ endif (WIN32)
+ set (KADU_PLUGINS_DIR ${KADU_DATA_DIR}/plugins)
+
+ macro (kadu_api_directories INCLUDE_DIR)
+- foreach (ARG ${ARGN})
+- file (GLOB API_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/${ARG}/*.h)
+- install (FILES ${API_HEADERS} DESTINATION ${KADU_INSTALL_INCLUDE_DIR}/kadu/${INCLUDE_DIR}/${ARG})
+- endforeach (ARG)
++ if (NOT KADU_INSTALLS_SDK)
++ message (FATAL_ERROR "kadu_api_directories called but KADU_INSTALLS_SDK is not set")
++ endif (NOT KADU_INSTALLS_SDK)
++
++ if (INSTALL_SDK)
++ foreach (ARG ${ARGN})
++ file (GLOB API_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/${ARG}/*.h)
++ install (FILES ${API_HEADERS} DESTINATION ${KADU_INSTALL_INCLUDE_DIR}/kadu/${INCLUDE_DIR}/${ARG})
++ endforeach (ARG)
++ endif (INSTALL_SDK)
+ endmacro (kadu_api_directories)
+
+ macro (kadu_configuration)
+diff --git a/plugins/docking/CMakeLists.txt b/plugins/docking/CMakeLists.txt
+index 9fadbc2..d2509bf 100644
+--- a/plugins/docking/CMakeLists.txt
++++ b/plugins/docking/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/docking
+diff --git a/plugins/encryption_ng/CMakeLists.txt b/plugins/encryption_ng/CMakeLists.txt
+index 2de13e9..ebf62fd 100644
+--- a/plugins/encryption_ng/CMakeLists.txt
++++ b/plugins/encryption_ng/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ include (FindPkgConfig)
+diff --git a/plugins/gadu_protocol/CMakeLists.txt b/plugins/gadu_protocol/CMakeLists.txt
+index f9d2c03..c9fd708 100644
+--- a/plugins/gadu_protocol/CMakeLists.txt
++++ b/plugins/gadu_protocol/CMakeLists.txt
+@@ -13,6 +13,7 @@ set (QT_USE_QTSCRIPT 1)
+ set (QT_USE_QTSCRIPTTOOLS 1)
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ include (FindPkgConfig)
+diff --git a/plugins/history/CMakeLists.txt b/plugins/history/CMakeLists.txt
+index 81f962f..9b97f3c 100644
+--- a/plugins/history/CMakeLists.txt
++++ b/plugins/history/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.8.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/history
+diff --git a/plugins/history_migration/CMakeLists.txt b/plugins/history_migration/CMakeLists.txt
+index 111f6ba..e99a868 100644
+--- a/plugins/history_migration/CMakeLists.txt
++++ b/plugins/history_migration/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.8.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/history_migration
+diff --git a/plugins/idle/CMakeLists.txt b/plugins/idle/CMakeLists.txt
+index 25b8fad..4d6cdaf 100644
+--- a/plugins/idle/CMakeLists.txt
++++ b/plugins/idle/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/idle
+diff --git a/plugins/jabber_protocol/CMakeLists.txt b/plugins/jabber_protocol/CMakeLists.txt
+index 3f581c9..a2b6104 100644
+--- a/plugins/jabber_protocol/CMakeLists.txt
++++ b/plugins/jabber_protocol/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.8.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ include (FindPkgConfig)
+diff --git a/plugins/mediaplayer/CMakeLists.txt b/plugins/mediaplayer/CMakeLists.txt
+index e1f0290..6aedb06 100644
+--- a/plugins/mediaplayer/CMakeLists.txt
++++ b/plugins/mediaplayer/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/mediaplayer
+diff --git a/plugins/qt4_docking/CMakeLists.txt b/plugins/qt4_docking/CMakeLists.txt
+index ae786f3..8cff0cf 100644
+--- a/plugins/qt4_docking/CMakeLists.txt
++++ b/plugins/qt4_docking/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.6.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ kadu_api_directories (plugins/qt4_docking
+diff --git a/plugins/sound/CMakeLists.txt b/plugins/sound/CMakeLists.txt
+index 2e37302..f60c38a 100644
+--- a/plugins/sound/CMakeLists.txt
++++ b/plugins/sound/CMakeLists.txt
+@@ -6,6 +6,7 @@ set (QT_MIN_VERSION "4.7.0")
+ set (CMAKE_MIN_VERSION "2.8.0")
+
+ set (KADU_FIND_REQUIRED true)
++set (KADU_INSTALLS_SDK TRUE)
+ include (FindKadu)
+
+ include (FindPkgConfig)