From ddb48948a57e75a520f81f34068fcc2588b6abaf Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: May 02 2020 17:18:34 +0000 Subject: use bundled synaptics header, if needed fix feature macro logic (defined as 1 on, undefined off) minor cleanups --- diff --git a/plasma-desktop-5.18.4.1-override-include-dirs.patch b/plasma-desktop-5.18.4.1-override-include-dirs.patch new file mode 100644 index 0000000..3118913 --- /dev/null +++ b/plasma-desktop-5.18.4.1-override-include-dirs.patch @@ -0,0 +1,85 @@ +From b11915786a97f55074b7bfe4eec6f3c5cc08ae78 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Mon, 6 Apr 2020 00:41:07 +0200 +Subject: [PATCH 1/2] cmake modules: Allow include dir overrides for various + input drivers + +FindEvdev - evdev-properties.h +FindSynaptics - synaptics-properties.h +FindXorgLibinput - libinput-properties.h + +Hint: Dependency for touchpad (Synaptics): xserver-properties.h (xorg-server) +--- + cmake/modules/FindEvdev.cmake | 4 ++++ + cmake/modules/FindSynaptics.cmake | 4 ++++ + cmake/modules/FindXorgLibinput.cmake | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/cmake/modules/FindEvdev.cmake b/cmake/modules/FindEvdev.cmake +index 153128a90..c19c31a96 100644 +--- a/cmake/modules/FindEvdev.cmake ++++ b/cmake/modules/FindEvdev.cmake +@@ -31,6 +31,8 @@ + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + ++if(NOT Evdev_INCLUDE_DIRS) ++ + find_package(PkgConfig) + pkg_check_modules(PC_EVDEV xorg-evdev>=2.8.99.1) + +@@ -39,6 +41,8 @@ find_path(Evdev_INCLUDE_DIRS + HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR} + ) + ++endif() ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Evdev REQUIRED_VARS Evdev_INCLUDE_DIRS) + +diff --git a/cmake/modules/FindSynaptics.cmake b/cmake/modules/FindSynaptics.cmake +index fb5f9bc3e..eb56965e0 100644 +--- a/cmake/modules/FindSynaptics.cmake ++++ b/cmake/modules/FindSynaptics.cmake +@@ -31,6 +31,8 @@ + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + ++if(NOT Synaptics_INCLUDE_DIRS) ++ + find_package(PkgConfig) + pkg_check_modules(PC_SYNAPTICS xorg-synaptics) + +@@ -39,6 +41,8 @@ find_path(Synaptics_INCLUDE_DIRS + HINTS ${PC_SYNAPTICS_INCLUDE_DIRS} ${PC_SYNAPTICS_INCLUDEDIR} + ) + ++endif() ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Synaptics REQUIRED_VARS Synaptics_INCLUDE_DIRS) + +diff --git a/cmake/modules/FindXorgLibinput.cmake b/cmake/modules/FindXorgLibinput.cmake +index 1550751ae..5b7af5e79 100644 +--- a/cmake/modules/FindXorgLibinput.cmake ++++ b/cmake/modules/FindXorgLibinput.cmake +@@ -31,6 +31,8 @@ + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + ++if(NOT XORGLIBINPUT_INCLUDE_DIRS) ++ + find_package(PkgConfig) + pkg_check_modules(PC_XORGLIBINPUT xorg-libinput) + +@@ -39,6 +41,8 @@ find_path(XORGLIBINPUT_INCLUDE_DIRS + HINTS ${PC_XORGLIBINPUT_INCLUDE_DIRS} ${PC_XORGLIBINPUT_INCLUDEDIR} + ) + ++endif() ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(XorgLibinput REQUIRED_VARS XORGLIBINPUT_INCLUDE_DIRS) + +-- +2.26.2 diff --git a/plasma-desktop.spec b/plasma-desktop.spec index fc32946..7389d4f 100644 --- a/plasma-desktop.spec +++ b/plasma-desktop.spec @@ -4,14 +4,14 @@ %global synaptics 1 %global scim 1 %if 0%{?rhel} && 0%{?rhel} > 7 -%global synaptics 0 -%global scim 0 +%undefine synaptics +%undefine scim %endif Name: plasma-desktop Summary: Plasma Desktop shell Version: 5.18.4.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and (GPLv2 or GPLv3) URL: https://cgit.kde.org/%{name}.git @@ -34,6 +34,9 @@ Source0: http://download.kde.org/%{stable}/plasma/%{verdir}/%{name}-%{version}.t Patch100: plasma-desktop-5.8-default_favorites.patch ## upstreamable patches +Patch200: https://gitweb.gentoo.org/proj/kde.git/plain/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch +# use this bundled copy (from f31) if not provided already +Source200: synaptics-properties.h # filter qmk/plugins provides %global __provides_exclude_from ^(%{_kf5_qmldir}/.*\\.so|%{_kf5_qtplugindir}/.*\\.so)$ @@ -188,13 +191,21 @@ BuildArch: noarch ## upstream patches ## upstreamable patches +%patch200 -p1 +%if ! 0%{?synaptics} +install -pD %{SOURCE200} 3rdparty/xorg/synaptics-properties.h +%endif ## downstream patches %patch100 -p1 -# FIXME: relax plasma-breeze dep +# relax plasma-breeze/plasma-workspace deps sed -i.breeze_ver \ - -e "s|find_package(Breeze \${PROJECT_VERSION} |find_package(Breeze %{majmin_ver} |" \ + -e "s|find_package(Breeze \${PROJECT_VERSION} |find_package(Breeze %{majmin_ver} |g" \ + -e "s|find_package(LibKWorkspace \${PROJECT_VERSION} |find_package(LibKWorkspace %{majmin_ver} |g" \ + -e "s|find_package(LibColorCorrect \${PROJECT_VERSION} |find_package(LibColorCorrect %{majmin_ver} |g" \ + -e "s|find_package(LibNotificationManager \${PROJECT_VERSION} |find_package(LibNotificationManager %{majmin_ver} |g" \ + -e "s|find_package(LibTaskManager \${PROJECT_VERSION} |find_package(LibTaskManager %{majmin_ver} |g" \ CMakeLists.txt @@ -206,7 +217,8 @@ sed -i.breeze_ver \ mkdir %{_target_platform} pushd %{_target_platform} -%{cmake_kf5} .. +%{cmake_kf5} .. \ + %{?!synaptics:-DSynaptics_INCLUDE_DIRS:PATH="$(pwd)/3rdparty"} popd %make_build -C %{_target_platform} @@ -223,10 +235,6 @@ cat %{name}.lang %{name}-doc.lang | sort | uniq -u > plasmadesktop5.lang # No -devel rm -fv %{buildroot}%{_libdir}/libkfontinst{,ui}.so -# rename script to force it to run again (initial 5.5.0 version was buggy) -mv %{buildroot}%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/updates/obsolete_kickoffrc.js \ - %{buildroot}%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/updates/obsolete_kickoffrc-1.js - ## unpackaged files rm -rfv %{buildroot}%{_datadir}/kdm/pics/users/ # odd locale stuff? @@ -273,7 +281,6 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/org.kde.{kfontview,k %{_kf5_qmldir}/org/kde/activities/settings/ %{_kf5_datadir}/plasma/* %ifnarch s390 s390x -%if 0%{?synaptics} # touchpad %{_kf5_datadir}/kservices5/kded/touchpad.desktop %{_bindir}/kcm-touchpad-list-devices @@ -281,7 +288,6 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/org.kde.{kfontview,k %{_datadir}/config.kcfg/touchpad.kcfg %{_datadir}/config.kcfg/touchpaddaemon.kcfg %{_datadir}/dbus-1/interfaces/org.kde.touchpad.xml -%endif # kcminput %{_kf5_bindir}/kapplymousetheme %{_kf5_datadir}/kcmmouse/ @@ -340,6 +346,11 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/org.kde.{kfontview,k %changelog +* Sat May 02 2020 Rex Dieter - 5.18.4.1-2 +- use bundled synaptics header, if needed +- fix feature macro logic (defined as 1 on, undefined off) +- minor cleanups + * Sat Apr 04 2020 Rex Dieter - 5.18.4.1-1 - 5.18.4.1 diff --git a/synaptics-properties.h b/synaptics-properties.h new file mode 100644 index 0000000..0f79b64 --- /dev/null +++ b/synaptics-properties.h @@ -0,0 +1,161 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. Red + * Hat makes no representations about the suitability of this software + * for any purpose. It is provided "as is" without express or implied + * warranty. + * + * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Authors: Peter Hutterer + */ + +#ifndef _SYNAPTICS_PROPERTIES_H_ +#define _SYNAPTICS_PROPERTIES_H_ + +/** + * Properties exported by the synaptics driver. These properties are + * recognized by the driver and will change its behavior when modified. + * For a description of what each property does, see synaptics.h. + */ + +/* 32 bit, 4 values, left, right, top, bottom */ +#define SYNAPTICS_PROP_EDGES "Synaptics Edges" + +/* 32 bit, 3 values, low, high, */ +#define SYNAPTICS_PROP_FINGER "Synaptics Finger" + +/* 32 bit */ +#define SYNAPTICS_PROP_TAP_TIME "Synaptics Tap Time" + +/* 32 bit */ +#define SYNAPTICS_PROP_TAP_MOVE "Synaptics Tap Move" + +/* 32 bit, 3 values, single touch timeout, max tapping time for double + * taps, duration of a single click */ +#define SYNAPTICS_PROP_TAP_DURATIONS "Synaptics Tap Durations" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_CLICKPAD "Synaptics ClickPad" + +/* 8 bit (BOOL), */ +#define SYNAPTICS_PROP_TAP_FAST "Synaptics Tap FastTap" + +/* 32 bit */ +#define SYNAPTICS_PROP_MIDDLE_TIMEOUT "Synaptics Middle Button Timeout" + +/* 32 bit */ +#define SYNAPTICS_PROP_TWOFINGER_PRESSURE "Synaptics Two-Finger Pressure" + +/* 32 bit */ +#define SYNAPTICS_PROP_TWOFINGER_WIDTH "Synaptics Two-Finger Width" + +/* 32 bit, 2 values, vert, horiz */ +#define SYNAPTICS_PROP_SCROLL_DISTANCE "Synaptics Scrolling Distance" + +/* 8 bit (BOOL), 3 values, vertical, horizontal, corner */ +#define SYNAPTICS_PROP_SCROLL_EDGE "Synaptics Edge Scrolling" + +/* 8 bit (BOOL), 2 values, vertical, horizontal */ +#define SYNAPTICS_PROP_SCROLL_TWOFINGER "Synaptics Two-Finger Scrolling" + +/* FLOAT, 4 values, min, max, accel, */ +#define SYNAPTICS_PROP_SPEED "Synaptics Move Speed" + +/* 8 bit (BOOL), 2 values, updown, leftright */ +#define SYNAPTICS_PROP_BUTTONSCROLLING "Synaptics Button Scrolling" + +/* 8 bit (BOOL), 2 values, updown, leftright */ +#define SYNAPTICS_PROP_BUTTONSCROLLING_REPEAT "Synaptics Button Scrolling Repeat" + +/* 32 bit */ +#define SYNAPTICS_PROP_BUTTONSCROLLING_TIME "Synaptics Button Scrolling Time" + +/* 8 bit, valid values (0, 1, 2) */ +#define SYNAPTICS_PROP_OFF "Synaptics Off" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_GUESTMOUSE "Synaptics Guestmouse Off" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_LOCKED_DRAGS "Synaptics Locked Drags" + +/* 32 bit */ +#define SYNAPTICS_PROP_LOCKED_DRAGS_TIMEOUT "Synaptics Locked Drags Timeout" + +/* 8 bit, up to MAX_TAP values (see synaptics.h), 0 disables an + * element. order: RT, RB, LT, LB, F1, F2, F3 */ +#define SYNAPTICS_PROP_TAP_ACTION "Synaptics Tap Action" + +/* 8 bit, up to MAX_CLICK values (see synaptics.h), 0 disables an + * element. order: Finger 1, 2, 3 */ +#define SYNAPTICS_PROP_CLICK_ACTION "Synaptics Click Action" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_CIRCULAR_SCROLLING "Synaptics Circular Scrolling" + +/* FLOAT */ +#define SYNAPTICS_PROP_CIRCULAR_SCROLLING_DIST "Synaptics Circular Scrolling Distance" + +/* 8 bit, valid values 0..8 (inclusive) + * order: any edge, top, top + right, right, right + bottom, bottom, bottom + + * left, left, left + top */ +#define SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER "Synaptics Circular Scrolling Trigger" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_CIRCULAR_PAD "Synaptics Circular Pad" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_PALM_DETECT "Synaptics Palm Detection" + +/* 32 bit, 2 values, width, z */ +#define SYNAPTICS_PROP_PALM_DIMENSIONS "Synaptics Palm Dimensions" + +/* FLOAT, 2 values, speed, friction */ +#define SYNAPTICS_PROP_COASTING_SPEED "Synaptics Coasting Speed" + +/* CARD32, 2 values, min, max */ +#define SYNAPTICS_PROP_PRESSURE_MOTION "Synaptics Pressure Motion" + +/* FLOAT, 2 values, min, max */ +#define SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR "Synaptics Pressure Motion Factor" + +/* 8 bit (BOOL) */ +#define SYNAPTICS_PROP_GRAB "Synaptics Grab Event Device" + +/* 8 bit (BOOL), 1 value, tap-and-drag */ +#define SYNAPTICS_PROP_GESTURES "Synaptics Gestures" + +/* 8 bit (BOOL), 7 values (read-only), has_left, has_middle, has_right, + * has_double, has_triple, has_pressure, has_width */ +#define SYNAPTICS_PROP_CAPABILITIES "Synaptics Capabilities" + +/* 32 bit unsigned, 2 values, vertical, horizontal in units/millimeter */ +#define SYNAPTICS_PROP_RESOLUTION "Synaptics Pad Resolution" + +/* 32 bit, 4 values, left, right, top, bottom */ +#define SYNAPTICS_PROP_AREA "Synaptics Area" + +/* 32 bit, 4 values, left, right, top, buttom */ +#define SYNAPTICS_PROP_SOFTBUTTON_AREAS "Synaptics Soft Button Areas" + +/* 32 bit, 4 values, left, right, top, buttom */ +#define SYNAPTICS_PROP_SECONDARY_SOFTBUTTON_AREAS "Synaptics Secondary Soft Button Areas" + +/* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */ +#define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation" + +#endif /* _SYNAPTICS_PROPERTIES_H_ */