public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-plasma/plasma-desktop/files/, kde-plasma/plasma-desktop/
Date: Wed,  8 Apr 2020 15:51:05 +0000 (UTC)	[thread overview]
Message-ID: <1586361001.f431f03a9373c22aace77d9f15fba456f46505a9.asturm@gentoo> (raw)

commit:     f431f03a9373c22aace77d9f15fba456f46505a9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  5 22:55:11 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Apr  8 15:50:01 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=f431f03a

kde-plasma/plasma-desktop: Pull evdev/libinput headers, drop USE mouse

Add patch to FindEvdev and FindXorgLibinput to override include dirs.
This makes it possible to get rid of both xf86-input-libinput but more
importantly xf86-input-evdev dependencies only to build Mouse KCM.

Package-Manager: Portage-2.3.97, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ma-desktop-5.18.4.1-override-include-dirs.patch | 58 ++++++++++++++++++++++
 kde-plasma/plasma-desktop/metadata.xml             |  1 -
 .../plasma-desktop-5.18.49.9999.ebuild             | 32 +++++++++---
 .../plasma-desktop/plasma-desktop-9999.ebuild      | 32 +++++++++---
 4 files changed, 108 insertions(+), 15 deletions(-)

diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch
new file mode 100644
index 0000000000..54b8419e98
--- /dev/null
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch
@@ -0,0 +1,58 @@
+From d44a6c8a732c3f82092f3fa3044000f1f8b3a0ec Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 6 Apr 2020 00:41:07 +0200
+Subject: [PATCH] cmake modules: Allow include dir overrides in FindEvdev,
+ FindXorgLibinput
+
+---
+ cmake/modules/FindEvdev.cmake        | 4 ++++
+ cmake/modules/FindXorgLibinput.cmake | 4 ++++
+ 2 files changed, 8 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/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.0
+

diff --git a/kde-plasma/plasma-desktop/metadata.xml b/kde-plasma/plasma-desktop/metadata.xml
index 9b61884e37..ad05be8124 100644
--- a/kde-plasma/plasma-desktop/metadata.xml
+++ b/kde-plasma/plasma-desktop/metadata.xml
@@ -8,7 +8,6 @@
 	<use>
 		<flag name="emoji">Build emojipicker applet using <pkg>app-i18n/ibus</pkg> and <pkg>media-fonts/noto-emoji</pkg></flag>
 		<flag name="ibus">Use ibus input method via <pkg>app-i18n/ibus</pkg></flag>
-		<flag name="mouse">Enable mouse KCM</flag>
 		<flag name="scim">Enable applets that use <pkg>app-i18n/scim</pkg></flag>
 		<flag name="touchpad">Enable touchpad KCM</flag>
 	</use>

diff --git a/kde-plasma/plasma-desktop/plasma-desktop-5.18.49.9999.ebuild b/kde-plasma/plasma-desktop/plasma-desktop-5.18.49.9999.ebuild
index 0f09b8a685..7d850cd93e 100644
--- a/kde-plasma/plasma-desktop/plasma-desktop-5.18.49.9999.ebuild
+++ b/kde-plasma/plasma-desktop/plasma-desktop-5.18.49.9999.ebuild
@@ -13,10 +13,19 @@ inherit ecm kde.org
 
 DESCRIPTION="KDE Plasma desktop"
 
+# Avoid pulling in xf86-input-{evdev,libinput} DEPEND just for 1 header
+SHA_EVDEV="425ed601"
+SHA_LIBINPUT="e52daf20"
+XORG_URI="https://gitlab.freedesktop.org/xorg/driver/PKG/-/raw"
+SRC_URI+="
+	${XORG_URI/PKG/xf86-input-evdev}/${SHA_EVDEV}/include/evdev-properties.h -> evdev-properties.h-${SHA_EVDEV}
+	${XORG_URI/PKG/xf86-input-libinput}/${SHA_LIBINPUT}/include/libinput-properties.h -> libinput-properties.h-${SHA_LIBINPUT}
+"
+
 LICENSE="GPL-2" # TODO: CHECK
 SLOT="5"
 KEYWORDS=""
-IUSE="emoji +fontconfig ibus +mouse scim +semantic-desktop touchpad"
+IUSE="emoji +fontconfig ibus scim +semantic-desktop touchpad"
 
 COMMON_DEPEND="
 	>=dev-qt/qtconcurrent-${QTMIN}:5
@@ -104,10 +113,6 @@ DEPEND="${COMMON_DEPEND}
 	dev-libs/boost
 	x11-base/xorg-proto
 	fontconfig? ( x11-libs/libXrender )
-	mouse? (
-		x11-drivers/xf86-input-evdev
-		x11-drivers/xf86-input-libinput
-	)
 "
 RDEPEND="${COMMON_DEPEND}
 	>=dev-qt/qtgraphicaleffects-${QTMIN}:5
@@ -122,6 +127,19 @@ RDEPEND="${COMMON_DEPEND}
 	!<kde-plasma/kdeplasma-addons-5.15.80
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-5.18.4.1-override-include-dirs.patch" # downstream patch
+)
+
+src_unpack() {
+	kde.org_src_unpack
+	mkdir "${WORKDIR}/include" || die "Failed to prepare evdev/libinput dir"
+	cp "${DISTDIR}"/evdev-properties.h-${SHA_EVDEV} \
+		"${WORKDIR}"/include/evdev-properties.h || die "Failed to copy evdev"
+	cp "${DISTDIR}"/libinput-properties.h-${SHA_LIBINPUT} \
+		"${WORKDIR}"/include/libinput-properties.h || die "Failed to copy libinput"
+}
+
 src_prepare() {
 	ecm_src_prepare
 
@@ -134,8 +152,8 @@ src_prepare() {
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package fontconfig Fontconfig)
-		$(cmake_use_find_package mouse Evdev)
-		$(cmake_use_find_package mouse XorgLibinput)
+		-DEvdev_INCLUDE_DIRS="${WORKDIR}"/include
+		-DXORGLIBINPUT_INCLUDE_DIRS="${WORKDIR}"/include
 		$(cmake_use_find_package scim SCIM)
 		$(cmake_use_find_package semantic-desktop KF5Baloo)
 		$(cmake_use_find_package touchpad Synaptics)

diff --git a/kde-plasma/plasma-desktop/plasma-desktop-9999.ebuild b/kde-plasma/plasma-desktop/plasma-desktop-9999.ebuild
index 718317a06d..ec6504cb73 100644
--- a/kde-plasma/plasma-desktop/plasma-desktop-9999.ebuild
+++ b/kde-plasma/plasma-desktop/plasma-desktop-9999.ebuild
@@ -13,10 +13,19 @@ inherit ecm kde.org
 
 DESCRIPTION="KDE Plasma desktop"
 
+# Avoid pulling in xf86-input-{evdev,libinput} DEPEND just for 1 header
+SHA_EVDEV="425ed601"
+SHA_LIBINPUT="e52daf20"
+XORG_URI="https://gitlab.freedesktop.org/xorg/driver/PKG/-/raw"
+SRC_URI+="
+	${XORG_URI/PKG/xf86-input-evdev}/${SHA_EVDEV}/include/evdev-properties.h -> evdev-properties.h-${SHA_EVDEV}
+	${XORG_URI/PKG/xf86-input-libinput}/${SHA_LIBINPUT}/include/libinput-properties.h -> libinput-properties.h-${SHA_LIBINPUT}
+"
+
 LICENSE="GPL-2" # TODO: CHECK
 SLOT="5"
 KEYWORDS=""
-IUSE="emoji +fontconfig ibus +mouse scim +semantic-desktop touchpad"
+IUSE="emoji +fontconfig ibus scim +semantic-desktop touchpad"
 
 COMMON_DEPEND="
 	>=dev-qt/qtconcurrent-${QTMIN}:5
@@ -104,10 +113,6 @@ DEPEND="${COMMON_DEPEND}
 	dev-libs/boost
 	x11-base/xorg-proto
 	fontconfig? ( x11-libs/libXrender )
-	mouse? (
-		x11-drivers/xf86-input-evdev
-		x11-drivers/xf86-input-libinput
-	)
 "
 RDEPEND="${COMMON_DEPEND}
 	>=dev-qt/qtgraphicaleffects-${QTMIN}:5
@@ -122,6 +127,19 @@ RDEPEND="${COMMON_DEPEND}
 	!<kde-plasma/kdeplasma-addons-5.15.80
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-5.18.4.1-override-include-dirs.patch" # downstream patch
+)
+
+src_unpack() {
+	kde.org_src_unpack
+	mkdir "${WORKDIR}/include" || die "Failed to prepare evdev/libinput dir"
+	cp "${DISTDIR}"/evdev-properties.h-${SHA_EVDEV} \
+		"${WORKDIR}"/include/evdev-properties.h || die "Failed to copy evdev"
+	cp "${DISTDIR}"/libinput-properties.h-${SHA_LIBINPUT} \
+		"${WORKDIR}"/include/libinput-properties.h || die "Failed to copy libinput"
+}
+
 src_prepare() {
 	ecm_src_prepare
 
@@ -134,8 +152,8 @@ src_prepare() {
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package fontconfig Fontconfig)
-		$(cmake_use_find_package mouse Evdev)
-		$(cmake_use_find_package mouse XorgLibinput)
+		-DEvdev_INCLUDE_DIRS="${WORKDIR}"/include
+		-DXORGLIBINPUT_INCLUDE_DIRS="${WORKDIR}"/include
 		$(cmake_use_find_package scim SCIM)
 		$(cmake_use_find_package semantic-desktop KF5Baloo)
 		$(cmake_use_find_package touchpad Synaptics)


             reply	other threads:[~2020-04-08 15:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 15:51 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-17 20:05 [gentoo-commits] proj/kde:master commit in: kde-plasma/plasma-desktop/files/, kde-plasma/plasma-desktop/ Andreas Sturmlechner
2024-05-20 19:21 Andreas Sturmlechner
2023-12-14 21:24 Andreas Sturmlechner
2020-05-16 22:05 Andreas Sturmlechner
2020-05-07 21:05 Andreas Sturmlechner
2020-04-26 21:37 Andreas Sturmlechner
2020-04-25 12:58 Andreas Sturmlechner
2020-04-24 15:55 Andreas Sturmlechner
2020-02-13 22:41 Andreas Sturmlechner
2015-07-01 20:40 Johannes Huber
2015-01-28 19:51 Johannes Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586361001.f431f03a9373c22aace77d9f15fba456f46505a9.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox