* [gentoo-commits] proj/kde:master commit in: kde-frameworks/khtml/files/, kde-frameworks/khtml/
@ 2022-08-08 14:39 Andreas Sturmlechner
0 siblings, 0 replies; only message in thread
From: Andreas Sturmlechner @ 2022-08-08 14:39 UTC (permalink / raw
To: gentoo-commits
commit: 6dca8d3182b5525fdf03da321014d3068b0f6de4
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 8 11:52:08 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Aug 8 14:21:42 2022 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6dca8d31
kde-frameworks/khtml: Fix build with USE -X
Upstream commit 9712a641636bf9b794e1ce3b7ec00534de56faa1
Bug: https://bugs.gentoo.org/813450
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../khtml/files/khtml-5.96.0-with_x11.patch | 100 +++++++++++++++++++++
kde-frameworks/khtml/khtml-5.97.0.ebuild | 6 +-
kde-frameworks/khtml/khtml-9999.ebuild | 4 +-
3 files changed, 106 insertions(+), 4 deletions(-)
diff --git a/kde-frameworks/khtml/files/khtml-5.96.0-with_x11.patch b/kde-frameworks/khtml/files/khtml-5.96.0-with_x11.patch
new file mode 100644
index 0000000000..fb75eaa49c
--- /dev/null
+++ b/kde-frameworks/khtml/files/khtml-5.96.0-with_x11.patch
@@ -0,0 +1,100 @@
+From 9712a641636bf9b794e1ce3b7ec00534de56faa1 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 6 Aug 2022 11:03:35 +0200
+Subject: [PATCH] Add CMake option to build WITH_X11
+
+We want to be able to build without X11 support even if some of the used
+libraries may not work w/o X11 themselves yet or need to be built with
+X11 support for other reverse dependencies.
+
+HAVE_X11 already exists and is set automagically so far, but using
+-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
+as required in their cmake config. This is a behavior change as previously
+it was silently disabled if X11 was not found.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 14 +++++++-------
+ src/CMakeLists.txt | 5 ++---
+ tests/CMakeLists.txt | 4 ++--
+ 3 files changed, 11 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bca3622..700a0a7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -60,9 +60,13 @@ set_package_properties(Perl PROPERTIES
+ PURPOSE "Required for generating JS bindings for elements"
+ )
+
+-if(NOT APPLE)
+- find_package(X11)
+- set(HAVE_X11 ${X11_FOUND})
++if(NOT WIN32 AND NOT APPLE)
++ option(WITH_X11 "Build with X11 integration" ON)
++ if(WITH_X11)
++ find_package(X11 REQUIRED)
++ set(HAVE_X11 1)
++ find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras)
++ endif()
+ endif()
+
+ find_package(Phonon4Qt5 4.6.60)
+@@ -94,10 +98,6 @@ set_package_properties(PNG PROPERTIES DESCRIPTION "PNG decoding library"
+ PURPOSE "Required for decoding and displaying PNG images"
+ )
+
+-if(NOT WIN32 AND NOT APPLE AND X11_FOUND)
+- find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras)
+-endif()
+-
+ find_package(Gperf REQUIRED)
+
+ # remove definitions set by KDEFrameworkCompilerSettings which we fail to meet
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 573fa88..14b2e73 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -592,7 +592,6 @@ target_link_libraries(KF5KHtml
+ ${JPEG_LIBRARIES}
+ ${GIF_LIBRARIES}
+ ${PNG_LIBRARIES}
+- ${X11_LIBRARIES}
+ Qt5::PrintSupport
+ KF5::Archive
+ KF5::SonnetCore
+@@ -604,8 +603,8 @@ target_link_libraries(KF5KHtml
+ KF5::Bookmarks
+ KF5::KIOWidgets # KUrlRequester
+ )
+-if(NOT WIN32 AND NOT APPLE AND X11_FOUND)
+- target_link_libraries(KF5KHtml PRIVATE Qt5::X11Extras)
++if(NOT WIN32 AND NOT APPLE AND HAVE_X11)
++ target_link_libraries(KF5KHtml PRIVATE ${X11_LIBRARIES} Qt5::X11Extras)
+ endif()
+
+ if (KJS_DEBUGGER)
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index ae079ae..b6347d7 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include(ECMMarkAsTest)
+
+-if(NOT WIN32 AND NOT APPLE AND X11_FOUND)
++if(NOT WIN32 AND NOT APPLE AND HAVE_X11)
+ find_package(Qt5X11Extras "${REQUIRED_QT_VERSION}" CONFIG REQUIRED)
+ set_package_properties(Qt5X11Extras PROPERTIES PURPOSE "Required for tests")
+ endif()
+@@ -79,7 +79,7 @@ endif()
+
+ # Note that testregression can't be compiled by default, it needs private Qt headers.
+ # See also BUILDING-TESTREGRESSION
+-if (KHTML_BUILD_TESTREGRESSION)
++if (KHTML_BUILD_TESTREGRESSION AND HAVE_X11)
+
+ set(testregression_SRCS
+ test_regression.cpp
+--
+GitLab
+
diff --git a/kde-frameworks/khtml/khtml-5.97.0.ebuild b/kde-frameworks/khtml/khtml-5.97.0.ebuild
index fa15c5abcc..401fdf99db 100644
--- a/kde-frameworks/khtml/khtml-5.97.0.ebuild
+++ b/kde-frameworks/khtml/khtml-5.97.0.ebuild
@@ -40,7 +40,7 @@ RDEPEND="
=kde-frameworks/ktextwidgets-${PVCUT}*:5
=kde-frameworks/kwallet-${PVCUT}*:5
=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
- =kde-frameworks/kwindowsystem-${PVCUT}*:5
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5[X?]
=kde-frameworks/kxmlgui-${PVCUT}*:5
=kde-frameworks/sonnet-${PVCUT}*:5
media-libs/giflib:=
@@ -62,9 +62,11 @@ BDEPEND="
dev-util/gperf
"
+PATCHES=( "${FILESDIR}/${PN}-5.96.0-with_x11.patch" )
+
src_configure() {
local mycmakeargs=(
- $(cmake_use_find_package X X11)
+ -DWITH_X11=$(usex X)
)
ecm_src_configure
diff --git a/kde-frameworks/khtml/khtml-9999.ebuild b/kde-frameworks/khtml/khtml-9999.ebuild
index ffb0ab1640..127dea59b0 100644
--- a/kde-frameworks/khtml/khtml-9999.ebuild
+++ b/kde-frameworks/khtml/khtml-9999.ebuild
@@ -40,7 +40,7 @@ RDEPEND="
=kde-frameworks/ktextwidgets-${PVCUT}*:5
=kde-frameworks/kwallet-${PVCUT}*:5
=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
- =kde-frameworks/kwindowsystem-${PVCUT}*:5
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5[X?]
=kde-frameworks/kxmlgui-${PVCUT}*:5
=kde-frameworks/sonnet-${PVCUT}*:5
media-libs/giflib:=
@@ -64,7 +64,7 @@ BDEPEND="
src_configure() {
local mycmakeargs=(
- $(cmake_use_find_package X X11)
+ -DWITH_X11=$(usex X)
)
ecm_src_configure
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-08 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 14:39 [gentoo-commits] proj/kde:master commit in: kde-frameworks/khtml/files/, kde-frameworks/khtml/ Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox