public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qt:master commit in: lxqt-base/lxqt-config/files/, lxqt-base/lxqt-config/
@ 2018-12-28 23:06 Jimi Huotari
  0 siblings, 0 replies; only message in thread
From: Jimi Huotari @ 2018-12-28 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     fa0507b627f2509fbe56f5aeb94c433a98886912
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 22:53:26 2018 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 23:05:14 2018 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=fa0507b6

lxqt-base/lxqt-config: make touchpad config/dependencies optional

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.12

 ...lxqt-config-0.14.0-make-touchpad-optional.patch | 202 +++++++++++++++++++++
 lxqt-base/lxqt-config/lxqt-config-9999.ebuild      |  15 +-
 lxqt-base/lxqt-config/metadata.xml                 |   1 +
 3 files changed, 217 insertions(+), 1 deletion(-)

diff --git a/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch b/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch
new file mode 100644
index 00000000..5d2674f2
--- /dev/null
+++ b/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch
@@ -0,0 +1,202 @@
+From 8219e93d5733d6c8e98028e6f21468f568d9848d Mon Sep 17 00:00:00 2001
+From: Jimi Huotari <chiitoo@gentoo.org>
+Date: Sun, 23 Dec 2018 23:30:57 +0200
+Subject: [PATCH] lxqt-config-input: make touchpad settings/dependencies
+ optional
+
+---
+ lxqt-config-input/CMakeLists.txt        | 73 ++++++++++++++++++++-----
+ lxqt-config-input/lxqt-config-input.cpp | 10 ++++
+ lxqt-config-input/touchpad-config.h.in  |  1 +
+ 3 files changed, 71 insertions(+), 13 deletions(-)
+ create mode 100644 lxqt-config-input/touchpad-config.h.in
+
+diff --git a/lxqt-config-input/CMakeLists.txt b/lxqt-config-input/CMakeLists.txt
+index a315e71..2d87a17 100644
+--- a/lxqt-config-input/CMakeLists.txt
++++ b/lxqt-config-input/CMakeLists.txt
+@@ -1,24 +1,46 @@
+ project(lxqt-config-input)
+ 
++option(WITH_TOUCHPAD "Build touchpad settings" ON)
++
+ find_package(X11 REQUIRED)
+-find_package(PkgConfig REQUIRED)
+-pkg_check_modules(XORG_LIBINPUT REQUIRED xorg-libinput)
+-pkg_check_modules(XORG_XI REQUIRED xi)
+-pkg_check_modules(LIBUDEV REQUIRED libudev)
+ 
+-include_directories(
++if (WITH_TOUCHPAD)
++    find_package(PkgConfig REQUIRED)
++    pkg_check_modules(XORG_LIBINPUT REQUIRED xorg-libinput)
++    pkg_check_modules(XORG_XI REQUIRED xi)
++    pkg_check_modules(LIBUDEV REQUIRED libudev)
++endif ()
++
++set(lxqt-config-input_INCS
+     ${X11_INCLUDE_DIR}
+-    ${XORG_LIBINPUT_INCLUDE_DIRS}
++    ${CMAKE_CURRENT_BINARY_DIR}
+     "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor"
+ )
+ 
++if (WITH_TOUCHPAD)
++    set(lxqt-config-input_INCS
++        ${lxqt-config-input_INCS}
++        ${XORG_LIBINPUT_INCLUDE_DIRS}
++    )
++endif ()
++
++include_directories(
++    ${lxqt-config-input_INCS}
++)
++
++#    "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h.in"
++configure_file(
++    "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h.in"
++    "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h"
++    @ONLY
++)
++
+ set(lxqt-config-input_HDRS
+     keyboardconfig.h
+     mouseconfig.h
+     mouseconfig.h
+     keyboardlayoutconfig.h
+     selectkeyboardlayoutdialog.h
+-    touchpadconfig.h
+ )
+ 
+ set(lxqt-config-input_SRCS
+@@ -27,8 +49,6 @@ set(lxqt-config-input_SRCS
+     mouseconfig.cpp
+     keyboardlayoutconfig.cpp
+     selectkeyboardlayoutdialog.cpp
+-    touchpadconfig.cpp
+-    touchpaddevice.cpp
+ )
+ 
+ set(lxqt-config-input_UIS
+@@ -36,9 +56,26 @@ set(lxqt-config-input_UIS
+     keyboardconfig.ui
+     keyboardlayoutconfig.ui
+     selectkeyboardlayoutdialog.ui
+-    touchpadconfig.ui
+ )
+ 
++if (WITH_TOUCHPAD)
++    set(lxqt-config-input_HDRS
++        ${lxqt-config-input_HDRS}
++        touchpadconfig.h
++    )
++
++    set(lxqt-config-input_SRCS
++        ${lxqt-config-input_SRCS}
++        touchpadconfig.cpp
++        touchpaddevice.cpp
++    )
++
++    set(lxqt-config-input_UIS
++        ${lxqt-config-input_UIS}
++        touchpadconfig.ui
++    )
++endif ()
++
+ # Translations **********************************
+ lxqt_translate_ts(QM_FILES
+     UPDATE_TRANSLATIONS
+@@ -67,14 +104,24 @@ add_executable(lxqt-config-input
+     ${QM_LOADER}
+ )
+ 
+-target_link_libraries(lxqt-config-input
++set(lxqt-config-input_TLBS
+     Qt5::Widgets
+     Qt5::X11Extras
+     ${X11_LIBRARIES}
+-    ${X11_Xinput_LIB}
+     lxqt
+     lxqt-config-cursor
+-    udev
++)
++
++if (WITH_TOUCHPAD)
++    set(lxqt-config-input_TLBS
++        ${lxqt-config-input_TLBS}
++        ${X11_Xinput_LIB}
++        udev
++    )
++endif ()
++
++target_link_libraries(lxqt-config-input
++    ${lxqt-config-input_TLBS}
+ )
+ 
+ set_target_properties(lxqt-config-input
+diff --git a/lxqt-config-input/lxqt-config-input.cpp b/lxqt-config-input/lxqt-config-input.cpp
+index 9aa3134..ec7fa73 100644
+--- a/lxqt-config-input/lxqt-config-input.cpp
++++ b/lxqt-config-input/lxqt-config-input.cpp
+@@ -25,8 +25,12 @@
+ #include "keyboardconfig.h"
+ #include "../liblxqt-config-cursor/selectwnd.h"
+ #include "keyboardlayoutconfig.h"
++#include "touchpad-config.h"
++
++#ifdef WITH_TOUCHPAD
+ #include "touchpadconfig.h"
+ #include "touchpaddevice.h"
++#endif
+ 
+ int main(int argc, char** argv) {
+     LXQt::SingleApplication app(argc, argv);
+@@ -41,9 +45,11 @@ int main(int argc, char** argv) {
+     app.setApplicationVersion(VERINFO);
+ 
+     dlgOptions.setCommandLine(&parser);
++#ifdef WITH_TOUCHPAD
+     QCommandLineOption loadOption("load-touchpad",
+             app.tr("Load last touchpad settings."));
+     parser.addOption(loadOption);
++#endif
+     parser.addVersionOption();
+     parser.addHelpOption();
+     parser.process(app);
+@@ -54,11 +60,13 @@ int main(int argc, char** argv) {
+       configName = "session";
+     LXQt::Settings settings(configName);
+ 
++#ifdef WITH_TOUCHPAD
+     bool loadLastTouchpadSettings = parser.isSet(loadOption);
+     if (loadLastTouchpadSettings) {
+         TouchpadDevice::loadSettings(&settings);
+         return 0;
+     }
++#endif
+ 
+     LXQt::ConfigDialog dlg(QObject::tr("Keyboard and Mouse Settings"), &settings);
+     app.setActivationWindow(&dlg);
+@@ -80,10 +88,12 @@ int main(int argc, char** argv) {
+     dlg.addPage(keyboardLayoutConfig, QObject::tr("Keyboard Layout"), "input-keyboard");
+     QObject::connect(&dlg, SIGNAL(reset()), keyboardLayoutConfig, SLOT(reset()));
+ 
++#ifdef WITH_TOUCHPAD
+     TouchpadConfig* touchpadConfig = new TouchpadConfig(&settings, &dlg);
+     dlg.addPage(touchpadConfig, QObject::tr("Mouse and Touchpad"), "input-tablet");
+     QObject::connect(&dlg, &LXQt::ConfigDialog::reset,
+                      touchpadConfig, &TouchpadConfig::reset);
++#endif
+ 
+     dlg.setWindowIcon(QIcon::fromTheme("input-keyboard"));
+ 
+diff --git a/lxqt-config-input/touchpad-config.h.in b/lxqt-config-input/touchpad-config.h.in
+new file mode 100644
+index 0000000..d5bdab6
+--- /dev/null
++++ b/lxqt-config-input/touchpad-config.h.in
+@@ -0,0 +1 @@
++#cmakedefine WITH_TOUCHPAD @WITH_TOUCHPAD@
+-- 
+2.20.1
+

diff --git a/lxqt-base/lxqt-config/lxqt-config-9999.ebuild b/lxqt-base/lxqt-config/lxqt-config-9999.ebuild
index c206dbd1..c3c4c117 100644
--- a/lxqt-base/lxqt-config/lxqt-config-9999.ebuild
+++ b/lxqt-base/lxqt-config/lxqt-config-9999.ebuild
@@ -18,7 +18,7 @@ fi
 
 LICENSE="GPL-2 GPL-2+ GPL-3 LGPL-2 LGPL-2+ LGPL-2.1+ WTFPL-2"
 SLOT="0"
-IUSE="+monitor"
+IUSE="+monitor +touchpad"
 
 RDEPEND="
 	>=dev-libs/libqtxdg-3.0.0
@@ -37,16 +37,24 @@ RDEPEND="
 	x11-libs/libXcursor
 	x11-libs/libXfixes
 	monitor? ( kde-plasma/libkscreen:5= )
+	touchpad? (
+		virtual/libudev
+		x11-drivers/xf86-input-libinput
+		x11-libs/libXext
+	)
 "
 DEPEND="${DEPEND}
 	dev-qt/linguist-tools:5
 	>=dev-util/lxqt-build-tools-0.5.0
 "
 
+PATCHES="${FILESDIR}/${PN}-0.14.0-make-touchpad-optional.patch"
+
 src_configure() {
 	local mycmakeargs=(
 		-DPULL_TRANSLATIONS=OFF
 		-DWITH_MONITOR="$(usex monitor)"
+		-DWITH_TOUCHPAD="$(usex touchpad)"
 	)
 	cmake-utils_src_configure
 }
@@ -58,6 +66,11 @@ src_install() {
 
 pkg_postinst() {
 	gnome2_icon_cache_update
+
+	if ! use touchpad; then
+		ewarn "Please do not report issues to upstream, if they are caused by"
+		ewarn "USE=\"-touchpad\", as upstream does not support such a build."
+	fi
 }
 
 pkg_postrm() {

diff --git a/lxqt-base/lxqt-config/metadata.xml b/lxqt-base/lxqt-config/metadata.xml
index d6f2207d..d9098239 100644
--- a/lxqt-base/lxqt-config/metadata.xml
+++ b/lxqt-base/lxqt-config/metadata.xml
@@ -10,5 +10,6 @@
 	</upstream>
 	<use>
 		<flag name="monitor" restrict="&gt;=lxqt-base/lxqt-config-0.13.0">Build monitor settings tool</flag>
+		<flag name="touchpad" restrict="&gt;=lxqt-base/lxqt-config-0.13.0">Build touchpad settings tool</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-28 23:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-28 23:06 [gentoo-commits] proj/qt:master commit in: lxqt-base/lxqt-config/files/, lxqt-base/lxqt-config/ Jimi Huotari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox