Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2021 18:13:33 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5845c06cfb5e - main - - Belatedly update Luminance HDR to the latest version 2.6.1.1 - Allow to build without internal help browser: it requires rather heavy QtWebEngine component which currently is also deprecated - Optionize FITS support; drop no longer needed PKGNAMESUFFIX and   CONFLICTS_INSTALL knobs
Message-ID:  <202105141813.14EIDXsL065468@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5845c06cfb5e766eac1ad3363c31c4b2229189b0

commit 5845c06cfb5e766eac1ad3363c31c4b2229189b0
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-05-14 18:04:48 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-05-14 18:06:43 +0000

    - Belatedly update Luminance HDR to the latest version 2.6.1.1
    - Allow to build without internal help browser: it requires rather
      heavy QtWebEngine component which currently is also deprecated
    - Optionize FITS support; drop no longer needed PKGNAMESUFFIX and
      CONFLICTS_INSTALL knobs
    
    PR:     239887
---
 graphics/luminance-qt5/Makefile                    | 42 +++++++++++-------
 graphics/luminance-qt5/distinfo                    |  6 +--
 graphics/luminance-qt5/files/patch-CMakeLists.txt  | 19 ++++++++
 graphics/luminance-qt5/files/patch-gentoo_7b52c8   | 26 -----------
 .../luminance-qt5/files/patch-src_CMakeLists.txt   | 12 ++++++
 .../files/patch-src_Exif_ExifOperations.cpp        | 11 -----
 .../files/patch-src_MainWindow_MainWindow.cpp      | 50 ++++++++++++++++++++++
 .../files/patch-src_MainWindow_MainWindow.h        | 22 ++++++++++
 .../files/patch-src_UI_CMakeLists.txt              | 19 ++++++++
 graphics/luminance-qt5/pkg-plist                   |  4 +-
 10 files changed, 154 insertions(+), 57 deletions(-)

diff --git a/graphics/luminance-qt5/Makefile b/graphics/luminance-qt5/Makefile
index b5071aa27eff..b7b6dcdcafa7 100644
--- a/graphics/luminance-qt5/Makefile
+++ b/graphics/luminance-qt5/Makefile
@@ -1,23 +1,18 @@
 # Created by: Yinghong Liu <relaxbsd@gmail.com>
 
 PORTNAME=	luminance-hdr
-DISTVERSION=	2.5.1
-PORTREVISION=	16
+DISTVERSION=	2.6.1.1
 CATEGORIES=	graphics
 MASTER_SITES=	SF/qtpfsgui/luminance/${DISTVERSION}
-PKGNAMESUFFIX=	-qt5
 
 MAINTAINER=	h2+fbsdports@fsfe.org
 COMMENT=	Complete open source solution for HDR photography
 
 LICENSE=	GPLv2
 
-DEPRECATED=	Uses EOL Python 2.7 via www/qt5-webengine
-EXPIRATION_DATE=2021-06-23
-
-BUILD_DEPENDS=	${LOCALBASE}/include/fftw3.h:math/fftw3
-LIB_DEPENDS=	libcfitsio.so:astro/cfitsio \
-		libImath.so:math/Imath \
+BUILD_DEPENDS=	${LOCALBASE}/include/fftw3.h:math/fftw3 \
+		${LOCALBASE}/include/eigen3/Eigen/Sparse:math/eigen3
+LIB_DEPENDS=	libImath.so:math/Imath \
 		libtiff.so:graphics/tiff \
 		libraw_r.so:graphics/libraw \
 		libfftw3f.so:math/fftw3-float \
@@ -31,23 +26,40 @@ LIB_DEPENDS=	libcfitsio.so:astro/cfitsio \
 CFLAGS+=	-I${LOCALBASE}/include/Imath
 
 USES=		cmake desktop-file-utils jpeg pkgconfig qt:5 tar:bzip2
-USE_QT=		concurrent core declarative gui location network printsupport \
-		sql svg webchannel webengine widgets xml \
+USE_QT=		concurrent core declarative gui location network \
+		printsupport sql svg widgets xml \
 		buildtools_build linguisttools_build qmake_build
 
-CONFLICTS_INSTALL=	luminance-hdr-[0-9]*
+OPTIONS_DEFINE=	CFITSIO DOCS HELPBROWSER
+OPTIONS_DEFAULT=	CFITSIO HELPBROWSER
+
+CFITSIO_LIB_DEPENDS=	libcfitsio.so:astro/cfitsio
+
+HELPBROWSER_DESC=	Build help browser (requires QtWebEngine)
+HELPBROWSER_USE=	QT=webchannel,webengine
+HELPBROWSER_CMAKE_ON=	-DWITH_HELPBROWSER:BOOL=ON
 
-OPTIONS_DEFINE=	DOCS
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MHELPBROWSER}
+DEPRECATED=	Uses EoL Python 2.7 via www/qt5-webengine
+EXPIRATION_DATE=	2021-06-23
+.endif
 
 post-patch:
 # Do not install yet another copy of GPL (we use license framework instead)
 # and fix installation path for docs (but not for internal help files)
 	@${REINPLACE_CMD} -e '/LICENSE/d ; \
-		/#info files/s,share/luminance-hdr,${DOCSDIR_REL},' \
+		/#info files/s,share/luminance-hdr/doc,${DOCSDIR_REL},' \
 			${WRKSRC}/CMakeLists.txt
 # Point to the right location for program where to look for GPL text
 	@${REINPLACE_CMD} -e 's,LICENSE,${LICENSE}, ; \
-		s,share/doc/luminance-hdr,share/licenses/${PKGNAME},' \
+		s,share/luminance-hdr/doc,share/licenses/${PKGNAME},' \
 			${WRKSRC}/src/UI/UMessageBox.cpp
 
+post-patch-HELPBROWSER-off:
+	@${REINPLACE_CMD} -e 's,name="documentationAction">,& \
+		<property name="enabled"><bool>false</bool></property>,' \
+			${WRKSRC}/src/MainWindow/MainWindow.ui
+
 .include <bsd.port.mk>
diff --git a/graphics/luminance-qt5/distinfo b/graphics/luminance-qt5/distinfo
index ffdaa156c05e..056110dd9b4e 100644
--- a/graphics/luminance-qt5/distinfo
+++ b/graphics/luminance-qt5/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1553968553
-SHA256 (luminance-hdr-2.5.1.tar.bz2) = a8986e0afba434a2e9da7e8aed19cdb763fedc8de2655bdb496c4ee9d3f41696
-SIZE (luminance-hdr-2.5.1.tar.bz2) = 10238826
+TIMESTAMP = 1610361253
+SHA256 (luminance-hdr-2.6.1.1.tar.bz2) = 0c8b6bc162eeb2f88555880d128c2e37504362c48c4f3337f5fca7dbde5330a2
+SIZE (luminance-hdr-2.6.1.1.tar.bz2) = 11569153
diff --git a/graphics/luminance-qt5/files/patch-CMakeLists.txt b/graphics/luminance-qt5/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..a9fa150e07f3
--- /dev/null
+++ b/graphics/luminance-qt5/files/patch-CMakeLists.txt
@@ -0,0 +1,19 @@
+--- CMakeLists.txt.orig	2021-01-11 09:41:28 UTC
++++ CMakeLists.txt
+@@ -64,6 +64,7 @@ find_package(Qt5Core             REQUIRED)
+ find_package(Qt5Concurrent       REQUIRED)
+ find_package(Qt5Widgets          REQUIRED)
+ find_package(Qt5Gui              REQUIRED)
++if (WITH_HELPBROWSER)
+ # QtWebEngine is preferred web engine because QtWebKit is deprecated since Qt 5.5:
+ # 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
+@@ -75,6 +76,8 @@ else()
+     find_package(Qt5WebKit           REQUIRED)
+     find_package(Qt5WebKitWidgets    REQUIRED)
+     add_definitions(-DUSE_DEPRECATED_QTWEBKIT)
++endif()
++    add_definitions(-DWITH_HELPBROWSER)
+ endif()
+ find_package(Qt5Xml              REQUIRED)
+ find_package(Qt5Sql              REQUIRED)
diff --git a/graphics/luminance-qt5/files/patch-gentoo_7b52c8 b/graphics/luminance-qt5/files/patch-gentoo_7b52c8
deleted file mode 100644
index c9b583d58f7a..000000000000
--- a/graphics/luminance-qt5/files/patch-gentoo_7b52c8
+++ /dev/null
@@ -1,26 +0,0 @@
-From e733c24baf0c87e0b3c45351ff916c5f3a652826 Mon Sep 17 00:00:00 2001
-From: Benitoite <kd6kxr@gmail.com>
-Date: Sun, 16 Dec 2018 22:18:37 -0800
-Subject: [PATCH] Define EXIV2_TEST_VERSION by including exiv2.hpp
-
-AppleClang 10 did not allow compilation without exiv2/exiv2.hpp or exiv2/version.hpp
-Also, version.hpp says use exiv2.hpp
-
-* 2018-12-29 asturm@gentoo.org: Backported to 2.5.1
----
- src/TransplantExif/TransplantExifDialog.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git src/TransplantExif/TransplantExifDialog.cpp src/TransplantExif/TransplantExifDialog.cpp
-index c38a51e4..1fac2e0f 100644
---- src/TransplantExif/TransplantExifDialog.cpp
-+++ src/TransplantExif/TransplantExifDialog.cpp
-@@ -26,6 +26,7 @@
- #include <QFileInfo>
- #include <image.hpp>
- #include <exif.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- #include "Common/global.h"
- #include "Common/config.h"
-
diff --git a/graphics/luminance-qt5/files/patch-src_CMakeLists.txt b/graphics/luminance-qt5/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..3ffaa008e31f
--- /dev/null
+++ b/graphics/luminance-qt5/files/patch-src_CMakeLists.txt
@@ -0,0 +1,12 @@
+--- src/CMakeLists.txt.orig	2021-01-11 09:41:28 UTC
++++ src/CMakeLists.txt
+@@ -22,7 +22,9 @@ ADD_SUBDIRECTORY(Exif)
+ ADD_SUBDIRECTORY(Fileformat)
+ ADD_SUBDIRECTORY(Alignment)
+ ADD_SUBDIRECTORY(HdrWizard)
++IF(WITH_HELPBROWSER)
+ ADD_SUBDIRECTORY(HelpBrowser)
++ENDIF()
+ ADD_SUBDIRECTORY(Preferences)
+ ADD_SUBDIRECTORY(Projection)
+ ADD_SUBDIRECTORY(Resize)
diff --git a/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp b/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp
deleted file mode 100644
index 77d199a6259d..000000000000
--- a/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Exif/ExifOperations.cpp.orig	2019-07-07 08:28:28 UTC
-+++ src/Exif/ExifOperations.cpp
-@@ -34,7 +34,7 @@
- 
- #include <boost/assign/list_of.hpp>
- 
--#include <exif.hpp>
-+#include <exiv2/exiv2.hpp>
- #include <image.hpp>
- 
- #include "ExifOperations.h"
diff --git a/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.cpp b/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.cpp
new file mode 100644
index 000000000000..bb8b6ccd2194
--- /dev/null
+++ b/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.cpp
@@ -0,0 +1,50 @@
+--- src/MainWindow/MainWindow.cpp.orig	2021-01-11 09:41:28 UTC
++++ src/MainWindow/MainWindow.cpp
+@@ -99,7 +99,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>
+@@ -209,7 +211,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),
+@@ -1060,6 +1064,7 @@ void MainWindow::on_normalSizeAct_triggered() {
+ }
+ // Zoom = Viewers (END)
+ 
++#ifdef WITH_HELPBROWSER
+ void MainWindow::on_documentationAction_triggered() {
+     if (sm_helpBrowser == nullptr) {
+         sm_helpBrowser =
+@@ -1080,6 +1085,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/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.h b/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.h
new file mode 100644
index 000000000000..3628fb7d6b4d
--- /dev/null
+++ b/graphics/luminance-qt5/files/patch-src_MainWindow_MainWindow.h
@@ -0,0 +1,22 @@
+--- src/MainWindow/MainWindow.h.orig	2021-01-11 09:41:28 UTC
++++ 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/graphics/luminance-qt5/files/patch-src_UI_CMakeLists.txt b/graphics/luminance-qt5/files/patch-src_UI_CMakeLists.txt
new file mode 100644
index 000000000000..54e8a0bd29c1
--- /dev/null
+++ b/graphics/luminance-qt5/files/patch-src_UI_CMakeLists.txt
@@ -0,0 +1,19 @@
+--- src/UI/CMakeLists.txt.orig	2021-01-11 09:41:28 UTC
++++ src/UI/CMakeLists.txt
+@@ -53,11 +53,14 @@ ADD_LIBRARY(ui STATIC ${FILES_H} ${FILES_CPP} ${FILES_
+ IF(MINGW)
+     TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql)
+ ELSE()
++    TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql)
++  IF(WITH_HELPBROWSER)
+     IF(Qt5WebEngineCore_FOUND)
+-        TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebEngineWidgets Qt5::Sql)
++        TARGET_LINK_LIBRARIES(ui Qt5::WebEngineWidgets)
+     ELSE()
+-        TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql)
++        TARGET_LINK_LIBRARIES(ui Qt5::WebKitWidgets)
+     ENDIF()
++  ENDIF()
+ ENDIF()
+ 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)
diff --git a/graphics/luminance-qt5/pkg-plist b/graphics/luminance-qt5/pkg-plist
index 566fbb217a00..6af8c5902241 100644
--- a/graphics/luminance-qt5/pkg-plist
+++ b/graphics/luminance-qt5/pkg-plist
@@ -1,7 +1,7 @@
 bin/luminance-hdr
 bin/luminance-hdr-cli
-share/appdata/luminance-hdr.appdata.xml
-share/applications/luminance-hdr.desktop
+share/appdata/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml
+share/applications/net.sourceforge.qtpfsgui.LuminanceHDR.desktop
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/Changelog
 %%PORTDOCS%%%%DOCSDIR%%/README.md



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105141813.14EIDXsL065468>