summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2025-01-20 18:29:58 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2025-01-21 23:16:18 +0100
commit469cc3488f867366a4d81eebd9e3b7a775099e79 (patch)
tree875d0e8947621b9fe5e466ecea382c3ef13d960f /media-gfx
parentapp-emulation/virtualbox-extpack-oracle: add 7.1.6 (diff)
downloadgentoo-469cc3488f867366a4d81eebd9e3b7a775099e79.tar.gz
gentoo-469cc3488f867366a4d81eebd9e3b7a775099e79.tar.bz2
gentoo-469cc3488f867366a4d81eebd9e3b7a775099e79.zip
media-gfx/luminance-hdr: Drop help browser and dev-qt/qtwebengine:5
Bug: https://bugs.gentoo.org/926664 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-no-qtwebengine.patch213
-rw-r--r--media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild105
2 files changed, 318 insertions, 0 deletions
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-no-qtwebengine.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-no-qtwebengine.patch
new file mode 100644
index 000000000000..1d0865875259
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-no-qtwebengine.patch
@@ -0,0 +1,213 @@
+From 94f7edf3712b735219eb31eda71b7e188d718bdd Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 21 Jan 2025 19:35:21 +0100
+Subject: [PATCH 1/2] CMake: UI: Drop bogus Qt5WebKit/Qt5WebEngineWidgets
+ dependency
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ src/UI/CMakeLists.txt | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt
+index 96df52b4..4f6cb53e 100644
+--- a/src/UI/CMakeLists.txt
++++ b/src/UI/CMakeLists.txt
+@@ -50,14 +50,6 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
+ QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
+
+ ADD_LIBRARY(ui STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H})
+-IF(MINGW)
+- TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql)
+-ELSE()
+- IF(Qt5WebEngineCore_FOUND)
+- TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebEngineWidgets Qt5::Sql)
+- ELSE()
+- TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql)
+- ENDIF()
+-ENDIF()
++TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql)
+ SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE)
+ SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} ui PARENT_SCOPE)
+--
+2.45.3
+
+
+From d3e354dba3e1e20d5bcf3d97222d951b857bcb23 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 20 Jan 2025 18:18:16 +0100
+Subject: [PATCH 2/2] CMake: Hard-disable helpbrowser (with it Qt5WebEngine)
+
+Gentoo-bug: https://bugs.gentoo.org/926664
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 32 +++++++++++++++++++-------------
+ src/CMakeLists.txt | 4 +++-
+ src/MainWindow/MainWindow.cpp | 8 ++++++++
+ src/MainWindow/MainWindow.h | 4 ++++
+ src/MainWindow/MainWindow.ui | 1 +
+ 5 files changed, 35 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3c8b093f..5f0aaa6d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,6 +59,8 @@ else( HAS_BRANCH_PREDICTION )
+ set( BRANCH_PREDICTION 0 )
+ endif( HAS_BRANCH_PREDICTION )
+
++option(WITH_HELPBROWSER "Build help browser" ON)
++
+ # find and setup Qt5 for this project
+
+ find_package(Qt5Core REQUIRED)
+@@ -69,13 +71,15 @@ find_package(Qt5Gui REQUIRED)
+ # https://wiki.qt.io/New-Features-in-Qt-5.5#Deprecated_Functionality. Unfortunately,
+ # some Qt distributions still provide QtWebKit instead of QtWebEngine. So first we
+ # try to find QtWebEngine and if not found, we fall back to QtWebKit.
+-find_package(Qt5WebEngineCore QUIET)
+-if(Qt5WebEngineCore_FOUND)
+- find_package(Qt5WebEngineWidgets REQUIRED)
+-else()
+- find_package(Qt5WebKit REQUIRED)
+- find_package(Qt5WebKitWidgets REQUIRED)
+- add_definitions(-DUSE_DEPRECATED_QTWEBKIT)
++if(WITH_HELPBROWSER)
++ find_package(Qt5WebEngineCore QUIET)
++ if(Qt5WebEngineCore_FOUND)
++ find_package(Qt5WebEngineWidgets REQUIRED)
++ else()
++ find_package(Qt5WebKit REQUIRED)
++ find_package(Qt5WebKitWidgets REQUIRED)
++ add_definitions(-DUSE_DEPRECATED_QTWEBKIT)
++ endif()
+ endif()
+ find_package(Qt5Xml REQUIRED)
+ find_package(Qt5Sql REQUIRED)
+@@ -96,12 +100,14 @@ set(LIBS ${LIBS}
+ ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES}
+ ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
+
+-if(Qt5WebEngineCore_FOUND)
+- message(STATUS "Building with QtWebEngine")
+- set(LIBS ${LIBS} ${QT_QTWEBENGINE_LIBRARIES})
+-else()
+- message(STATUS "Building with QtWebKit")
+- set(LIBS ${LIBS} ${QT_QTWEBKIT_LIBRARIES})
++if(WITH_HELPBROWSER)
++ if(Qt5WebEngineCore_FOUND)
++ message(STATUS "Building with QtWebEngine")
++ set(LIBS ${LIBS} ${QT_QTWEBENGINE_LIBRARIES})
++ else()
++ message(STATUS "Building with QtWebKit")
++ set(LIBS ${LIBS} ${QT_QTWEBKIT_LIBRARIES})
++ endif()
+ endif()
+
+ FIND_PACKAGE(Git)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a5757bb9..8221c7ec 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -22,7 +22,9 @@ ADD_SUBDIRECTORY(Exif)
+ ADD_SUBDIRECTORY(Fileformat)
+ ADD_SUBDIRECTORY(Alignment)
+ ADD_SUBDIRECTORY(HdrWizard)
+-ADD_SUBDIRECTORY(HelpBrowser)
++if(WITH_HELPBROWSER)
++ ADD_SUBDIRECTORY(HelpBrowser)
++endif()
+ ADD_SUBDIRECTORY(Preferences)
+ ADD_SUBDIRECTORY(Projection)
+ ADD_SUBDIRECTORY(Resize)
+diff --git a/src/MainWindow/MainWindow.cpp b/src/MainWindow/MainWindow.cpp
+index 6459229a..b49d3d14 100644
+--- a/src/MainWindow/MainWindow.cpp
++++ b/src/MainWindow/MainWindow.cpp
+@@ -98,7 +98,9 @@
+ #include <HdrWizard/AutoAntighosting.h>
+ #include <HdrWizard/HdrWizard.h>
+ #include <HdrWizard/WhiteBalance.h>
++#ifdef WITH_HELPBROWSER
+ #include <HelpBrowser/helpbrowser.h>
++#endif
+ #include <LibpfsAdditions/formathelper.h>
+ #include <Preferences/PreferencesDialog.h>
+ #include <PreviewPanel/PreviewPanel.h>
+@@ -208,7 +210,9 @@ int MainWindow::sm_counter = 0;
+ QMap<int, MainWindow *> MainWindow::sm_mainWindowMap =
+ QMap<int, MainWindow *>();
+ QScopedPointer<UpdateChecker> MainWindow::sm_updateChecker;
++#ifdef WITH_HELPBROWSER
+ HelpBrowser *MainWindow::sm_helpBrowser = nullptr;
++#endif
+
+ MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent),
+@@ -1059,6 +1063,7 @@ void MainWindow::on_normalSizeAct_triggered() {
+ }
+ // Zoom = Viewers (END)
+
++#ifdef WITH_HELPBROWSER
+ void MainWindow::on_documentationAction_triggered() {
+ if (sm_helpBrowser == nullptr) {
+ sm_helpBrowser =
+@@ -1079,6 +1084,7 @@ void MainWindow::on_documentationAction_triggered() {
+ void MainWindow::helpBrowserClosed() {
+ sm_helpBrowser = nullptr;
+ }
++#endif
+
+ void MainWindow::enterWhatsThis() { QWhatsThis::enterWhatsThisMode(); }
+
+@@ -1451,9 +1457,11 @@ void MainWindow::closeEvent(QCloseEvent *event) {
+ }
+ sm_NumMainWindows--;
+ if (sm_NumMainWindows == 0) {
++#ifdef WITH_HELPBROWSER
+ if (sm_helpBrowser) {
+ sm_helpBrowser->close();
+ }
++#endif
+ }
+
+ if (sm_NumMainWindows == 0) {
+diff --git a/src/MainWindow/MainWindow.h b/src/MainWindow/MainWindow.h
+index 029cf813..68aa2fd4 100644
+--- a/src/MainWindow/MainWindow.h
++++ b/src/MainWindow/MainWindow.h
+@@ -146,7 +146,9 @@ class MainWindow : public QMainWindow {
+ void on_normalSizeAct_triggered();
+ void updateMagnificationButtons(GenericViewer *);
+
++#ifdef WITH_HELPBROWSER
+ void on_documentationAction_triggered();
++#endif
+ void enterWhatsThis();
+
+ void on_OptionsAction_triggered();
+@@ -180,7 +182,9 @@ class MainWindow : public QMainWindow {
+ void enableCrop(bool);
+ void disableCrop();
+
++#ifdef WITH_HELPBROWSER
+ void helpBrowserClosed();
++#endif
+ void on_actionDonate_triggered();
+
+ void onUpdateAvailable();
+diff --git a/src/MainWindow/MainWindow.ui b/src/MainWindow/MainWindow.ui
+index 775bfb2c..e4734a43 100644
+--- a/src/MainWindow/MainWindow.ui
++++ b/src/MainWindow/MainWindow.ui
+@@ -423,6 +423,7 @@
+ </property>
+ </action>
+ <action name="documentationAction">
++ <property name="enabled"><bool>false</bool></property>
+ <property name="icon">
+ <iconset theme="help-contents">
+ <normaloff>.</normaloff>.</iconset>
+--
+2.45.3
+
diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild
new file mode 100644
index 000000000000..ed4929187cb3
--- /dev/null
+++ b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs flag-o-matic xdg-utils
+
+DESCRIPTION="Graphical user interface that provides a workflow for HDR imaging"
+HOMEPAGE="http://qtpfsgui.sourceforge.net https://github.com/LuminanceHDR/LuminanceHDR"
+SRC_URI="https://downloads.sourceforge.net/qtpfsgui/${P/_/.}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cpu_flags_x86_sse2 fits openmp test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ media-gfx/exiv2:=
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:=
+ media-libs/libraw:=
+ >=media-libs/openexr-3:0=
+ media-libs/tiff:=
+ sci-libs/fftw:3.0=[threads]
+ sci-libs/gsl:=
+ fits? ( sci-libs/cfitsio:= )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/eigen:3
+ test? ( dev-cpp/gtest )
+"
+BDEPEND="dev-qt/linguist-tools:5"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-openexr3.patch
+ "${FILESDIR}"/${P}-fixheaders.patch
+ "${FILESDIR}"/${PN}-2.6.0-cmake.patch
+ "${FILESDIR}"/${PN}-2.6.0-no-git.patch
+ "${FILESDIR}"/${PN}-2.6.0-docs.patch
+ "${FILESDIR}"/${PN}-2.5.1-openmp-automagic.patch
+ "${FILESDIR}"/${PN}-2.6.1.1-boost-1.85.patch
+ # patch by ArchLinux
+ "${FILESDIR}"/${P}-exiv2-0.28.patch
+ # inspired by FreeBSD
+ "${FILESDIR}"/${P}-no-qtwebengine.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ if use cpu_flags_x86_sse2 ; then
+ append-flags -msse2
+ else
+ eerror "This package requires a CPU supporting the SSE2 instruction set."
+ die "SSE2 support missing"
+ fi
+
+ append-flags -std=c++17
+
+ local mycmakeargs=(
+ -DWITH_HELPBROWSER=OFF
+ $(cmake_use_find_package fits CFITSIO)
+ -DUSE_OPENMP="$(usex openmp)"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ mkdir -p "${D}/usr/share/metainfo" || die
+ mv "${D}/usr/share/appdata/"* "${D}/usr/share/metainfo/" || die
+ rmdir "${D}/usr/share/appdata" || die
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}