From 3cbeae54078c6428567812717b6e8202a5673301 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Feb 14 2016 14:32:13 +0000 Subject: cleanup, pull in upstream fixes, FTBFS (#1307727) --- diff --git a/.gitignore b/.gitignore index ba6e953..0f1a489 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/libkscreen-1.0.4.tar.xz /libkscreen-1.0.5.tar.xz diff --git a/0004-Fix-crash-in-XRandr1.1-backend.patch b/0004-Fix-crash-in-XRandr1.1-backend.patch new file mode 100644 index 0000000..d8ada49 --- /dev/null +++ b/0004-Fix-crash-in-XRandr1.1-backend.patch @@ -0,0 +1,29 @@ +From 257aae50cffbcedf488245c289b30c334c2d5cc0 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sat, 20 Dec 2014 00:23:53 +0100 +Subject: [PATCH 4/7] Fix crash in XRandr1.1 backend + +REVIEW: 121605 +BUGS: 341485 +--- + backends/xrandr1.1/xrandr11.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/backends/xrandr1.1/xrandr11.cpp b/backends/xrandr1.1/xrandr11.cpp +index 3136957..c0380a6 100644 +--- a/backends/xrandr1.1/xrandr11.cpp ++++ b/backends/xrandr1.1/xrandr11.cpp +@@ -90,6 +90,10 @@ KScreen::Config* XRandR11::config() const + ScreenInfo info(xcbScreen->root); + ScreenSize size(xcbScreen->root); + ++ if (info.isNull() || size.isNull()) { ++ return 0; ++ } ++ + if (info->config_timestamp == m_currentTimestamp) { + return m_currentConfig; + } +-- +2.5.0 + diff --git a/0005-Avoid-target-name-collision.patch b/0005-Avoid-target-name-collision.patch new file mode 100644 index 0000000..2bab2f6 --- /dev/null +++ b/0005-Avoid-target-name-collision.patch @@ -0,0 +1,25 @@ +From 7b48eb334c8f02185aad2a23021e6bcf78a03e51 Mon Sep 17 00:00:00 2001 +From: Kevin Ottens +Date: Mon, 20 Jul 2015 18:32:26 +0200 +Subject: [PATCH 5/7] Avoid target name collision + +--- + tests/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 8372e77..1094aa3 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -6,7 +6,7 @@ macro(KSCREEN_TESTS) + include_directories(${QT_INCLUDES} ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${X11_Xrandr_INCLUDE_PATH}) + kde4_add_unit_test(${_testname} ${_testname}.cpp ${_testname}.moc) + target_link_libraries(${_testname} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} kscreen) +- add_test(${_testname} ${CMAKE_CURRENT_BINARY_DIR}/${_testname}) ++ add_test(libkscreen-${_testname} ${CMAKE_CURRENT_BINARY_DIR}/${_testname}) + endforeach(_testname) + endmacro(KSCREEN_TESTS) + +-- +2.5.0 + diff --git a/0006-Fix-quoting-problems-with-D-depending-on-required-cm.patch b/0006-Fix-quoting-problems-with-D-depending-on-required-cm.patch new file mode 100644 index 0000000..8011498 --- /dev/null +++ b/0006-Fix-quoting-problems-with-D-depending-on-required-cm.patch @@ -0,0 +1,78 @@ +From 3d8aedab6319b38840dd65e97a09d403c629a5d1 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Sun, 26 Jul 2015 00:04:06 +0200 +Subject: [PATCH 6/7] Fix quoting problems with -D depending on required cmake + version + +by using a generated header file instead. This is also nicer because +changing the version will only recompile the one file that includes +that header, instead of all. + +cmake_minimum_required must be before project(), and should be 2.8.9 +to match kdelibs4's own files. +--- + CMakeLists.txt | 12 +++++------- + backends/xrandr/xrandrconfig.cpp | 1 + + libkscreen-version.h.in | 1 + + 3 files changed, 7 insertions(+), 7 deletions(-) + create mode 100644 libkscreen-version.h.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e703ad5..8cd18ca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,9 @@ ++cmake_minimum_required(VERSION 2.8.9) + project(libkscreen) + set(libkscreen_VERSION_MAJOR 1) + set(libkscreen_VERSION_MINOR 0) + set(libkscreen_VERSION_RELEASE 5) + set(libkscreen_VERSION "${libkscreen_VERSION_MAJOR}.${libkscreen_VERSION_MINOR}.${libkscreen_VERSION_RELEASE}") +-add_definitions("-DLIBKSCREEN_VERSION=\\\"${libkscreen_VERSION}\\\"") +- +-cmake_minimum_required(VERSION 2.8.0) + + if(POLICY CMP0017) + cmake_policy(SET CMP0017 NEW) +@@ -61,15 +59,15 @@ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" + ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) + + include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} ${KDE4_INCLUDES}) ++set(LIBKSCREEN_VERSION ${libkscreen_VERSION}) ++configure_file(${libkscreen_SOURCE_DIR}/libkscreen-version.h.in libkscreen-version.h @ONLY) + + add_subdirectory(src) + add_subdirectory(backends) + add_subdirectory(tests) + +-configure_file(${libkscreen_SOURCE_DIR}/LibKScreenConfig.cmake.in +- ${libkscreen_BINARY_DIR}/LibKScreenConfig.cmake +- @ONLY +-) ++configure_file(${libkscreen_SOURCE_DIR}/LibKScreenConfig.cmake.in LibKScreenConfig.cmake @ONLY) ++ + # this file is used by to check if the installed version can be used. + macro_write_basic_cmake_version_file(${libkscreen_BINARY_DIR}/LibKScreenConfigVersion.cmake + ${libkscreen_VERSION_MAJOR} ${libkscreen_VERSION_MINOR} ${libkscreen_VERSION_RELEASE}) +diff --git a/backends/xrandr/xrandrconfig.cpp b/backends/xrandr/xrandrconfig.cpp +index c75d5ea..683ac7a 100644 +--- a/backends/xrandr/xrandrconfig.cpp ++++ b/backends/xrandr/xrandrconfig.cpp +@@ -25,6 +25,7 @@ + #include "config.h" + #include "output.h" + #include "edid.h" ++#include + + #include + #include +diff --git a/libkscreen-version.h.in b/libkscreen-version.h.in +new file mode 100644 +index 0000000..b2a9ca6 +--- /dev/null ++++ b/libkscreen-version.h.in +@@ -0,0 +1 @@ ++#cmakedefine LIBKSCREEN_VERSION "@LIBKSCREEN_VERSION@" +-- +2.5.0 + diff --git a/0007-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch b/0007-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch new file mode 100644 index 0000000..96e5508 --- /dev/null +++ b/0007-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch @@ -0,0 +1,32 @@ +From 76aba9ff19cf10f7e8fbf6753235bbb47cd2d295 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Mon, 27 Jul 2015 09:46:16 +0200 +Subject: [PATCH 7/7] Fix building apps that use kscreen and which fail with + "-lqjson not found" + +when CMP0003 is NEW. +This is because qjson's target name doesn't contain "::" so cmake doesn't +magically look for it as a target, it assumes it's a library. + +Reviewed by Alex Merry. +--- + LibKScreenConfig.cmake.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/LibKScreenConfig.cmake.in b/LibKScreenConfig.cmake.in +index 45e4fad..4b77f1f 100644 +--- a/LibKScreenConfig.cmake.in ++++ b/LibKScreenConfig.cmake.in +@@ -5,6 +5,9 @@ + # LibKScreen_LIBRARY - The library needed to use LibKScreen + # LibKScreen_VERSION - The LibKScreen version + ++# qjson's target name doesn't contain "::", so look for it explicitly ++find_package(QJSON REQUIRED) ++ + get_filename_component(_currentDir ${CMAKE_CURRENT_LIST_FILE} PATH) # The current directory + get_filename_component(rootDir ${_currentDir}/@relInstallDir@ ABSOLUTE) # The install prefix + +-- +2.5.0 + diff --git a/libkscreen.spec b/libkscreen.spec index 18bff9a..0d5017d 100644 --- a/libkscreen.spec +++ b/libkscreen.spec @@ -1,19 +1,23 @@ Name: libkscreen Epoch: 1 Version: 1.0.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Display configuration library License: GPLv2+ -URL: https://projects.kde.org/projects/extragear/libs/libkscreen +URL: https://projects.kde.org/libkscreen Source0: http://download.kde.org/stable/libkscreen/%{version}/src/libkscreen-%{version}.tar.xz ## upstreamable patches # already fixed upstream (to 1.0.6 now) -Patch1: libkscreen-1.0.5-VERSION_RELEASE.patch +Patch0: libkscreen-1.0.5-VERSION_RELEASE.patch ## upstream patches +Patch4: 0004-Fix-crash-in-XRandr1.1-backend.patch +Patch5: 0005-Avoid-target-name-collision.patch +Patch6: 0006-Fix-quoting-problems-with-D-depending-on-required-cm.patch +Patch7: 0007-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch BuildRequires: kdelibs4-devel BuildRequires: pkgconfig(xrandr) @@ -29,20 +33,17 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} # add qsjon dep to account for: # LibKScreenTargetsWithPrefix-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "Qt4::QtCore;-lpthread;KDE4__kdecore;qjson" Requires: pkgconfig(QJson) - %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%setup -q - -%patch1 -p1 -b .VERSION_RELEASE +%autosetup -p1 %build -mkdir -p %{_target_platform} +mkdir %{_target_platform} pushd %{_target_platform} %{cmake_kde4} .. popd @@ -75,6 +76,9 @@ test "$(pkg-config --modversion kscreen)" = "%{version}" %changelog +* Sun Feb 14 2016 Rex Dieter 1.0.5-6 +- cleanup, pull in upstream fixes, FTBFS (#1307727) + * Thu Feb 04 2016 Fedora Release Engineering - 1:1.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild