From 61517a6581ccb0e63d34fbd80d29a9ae551a8ffb Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: May 17 2016 14:48:21 +0000 Subject: initial import, rhbz#1336141 --- diff --git a/.gitignore b/.gitignore index e69de29..90de3f7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/lxqt-config-randr-6ada849baca7918078e53f7dece4d96b2a0e6210.tar.gz diff --git a/lxqt-config-randr-qt5.patch b/lxqt-config-randr-qt5.patch new file mode 100644 index 0000000..faa9198 --- /dev/null +++ b/lxqt-config-randr-qt5.patch @@ -0,0 +1,55 @@ +diff -rNu lxqt-config-randr-0.1.2.orig/src/CMakeLists.txt lxqt-config-randr-0.1.2/src/CMakeLists.txt +--- lxqt-config-randr-0.1.2.orig/src/CMakeLists.txt 2013-11-10 04:46:16.000000000 +0100 ++++ lxqt-config-randr-0.1.2/src/CMakeLists.txt 2016-05-14 20:06:36.861115510 +0200 +@@ -1,5 +1,8 @@ + set(EXE_NAME lxqt-config-randr) +-find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) ++find_package(Qt5Core REQUIRED) ++find_package(Qt5Gui REQUIRED) ++find_package(Qt5Widgets REQUIRED) ++find_package(Qt5X11Extras) + find_package(X11 REQUIRED) + + include(CheckFunctionExists) +@@ -60,12 +63,10 @@ + set( RESOURCES_SRC_FILES + lxqtconfigrandr.qrc + ) +-QT4_WRAP_UI(UI_FILES ${UI_SOURCES_FILES} ) +-QT4_WRAP_CPP(MOC_FILES ${MOC_SOURCES_FILES} ) +-QT4_ADD_RESOURCES(RESOURCES_FILES ${RESOURCES_SRC_FILES} ) +-#QT4_ADD_TRANSLATION(RAZORRANDR_QM ${RAZORRANDR_TS} ) +- +-include(${QT_USE_FILE}) ++QT5_WRAP_UI(UI_FILES ${UI_SOURCES_FILES} ) ++QT5_WRAP_CPP(MOC_FILES ${MOC_SOURCES_FILES} ) ++QT5_ADD_RESOURCES(RESOURCES_FILES ${RESOURCES_SRC_FILES} ) ++#QT5_ADD_TRANSLATION(RAZORRANDR_QM ${RAZORRANDR_TS} ) + + INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} +@@ -81,10 +82,10 @@ + ) + + target_link_libraries(${EXE_NAME} +- ${QT_QTCORE_LIBRARY} +- ${QT_QTGUI_LIBRARY} + ${X11_LIBRARIES} + ${XRANDR_LIBRARY} + ) + ++qt5_use_modules (${EXE_NAME} Widgets) ++ + install(TARGETS ${EXE_NAME} RUNTIME DESTINATION bin) +diff -rNu lxqt-config-randr-0.1.2.orig/src/legacyrandrscreen.cpp lxqt-config-randr-0.1.2/src/legacyrandrscreen.cpp +--- lxqt-config-randr-0.1.2.orig/src/legacyrandrscreen.cpp 2013-11-10 04:46:16.000000000 +0100 ++++ lxqt-config-randr-0.1.2/src/legacyrandrscreen.cpp 2016-05-14 20:08:19.349024489 +0200 +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + diff --git a/lxqt-config-randr.spec b/lxqt-config-randr.spec new file mode 100644 index 0000000..5f7a0e3 --- /dev/null +++ b/lxqt-config-randr.spec @@ -0,0 +1,82 @@ +# https://codereview.qt-project.org/#/c/107725/ +%bcond_with qt5 + +%global gitdate 20140202 +%global commit0 6ada849baca7918078e53f7dece4d96b2a0e6210 + +Name: lxqt-config-randr +Version: 0.1.2 +%if 0%{?gitdate} +Release: 1.%{gitdate}git%(c=%{commit0}; echo ${c:0:7} )%{?dist} +%else +Release: 1%{?dist} +%endif +Summary: GUI interface to RandR extension + +License: GPLv2+ +URL: https://github.com/zballina/%{name} +%if 0%{?gitdate} +Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz +%else +Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +%endif +Patch0: %{name}-qt5.patch + +BuildRequires: pkgconfig(lxqt) +BuildRequires: desktop-file-utils + +%if %with qt5 +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5X11Extras) +%else +BuildRequires: qt4-devel +%endif + +%description +Qt-based tool to configure the X output using the RandR 1.3/1.2 extension, +based in KDE parts, intended to be a viable option for the LXQt desktop. + + +%prep +%if 0%{?gitdate} +%setup -qn%{name}-%{commit0} +# revert Virtual Modes: Fixing bug in Brightness setting (PR#6) +# commit/3aa7fa26fb61a7a521443ff3ef1d3abc574f609e +# prevents gcc error: 'sleep' was not declared in this scope +sed -i /sleep/d src/randrcrtc.cpp +%else +%setup -q +%endif +%if %with qt5 +%patch0 -p1 +%endif + +%build +mkdir -p %{_target_platform} +pushd %{_target_platform} +%cmake_lxqt .. +popd +%make_build -C %{_target_platform} + +%install +%make_install -C %{_target_platform} +# Exclude category as been Service +desktop-file-edit --remove-category=LXQt --remove-only-show-in=LXQt \ + --add-only-show-in=X-LXQt %{buildroot}%{_datadir}/applications/%{name}.desktop + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + + +%files +%license COPYING* +%doc AUTHORS README.md +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop + + +%changelog +* Fri May 13 2016 Raphael Groner - 0.1.2-1.20140202git6ada849 +- initial diff --git a/sources b/sources index e69de29..925574a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6ebc29ab33257581bc1e49491299b4f7 lxqt-config-randr-6ada849baca7918078e53f7dece4d96b2a0e6210.tar.gz