- 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
This commit is contained in:
parent
67e4c03a38
commit
5845c06cfb
10 changed files with 154 additions and 57 deletions
|
@ -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
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
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
|
||||
|
||||
.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>
|
||||
|
|
|
@ -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
|
||||
|
|
19
graphics/luminance-qt5/files/patch-CMakeLists.txt
Normal file
19
graphics/luminance-qt5/files/patch-CMakeLists.txt
Normal file
|
@ -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)
|
|
@ -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"
|
||||
|
12
graphics/luminance-qt5/files/patch-src_CMakeLists.txt
Normal file
12
graphics/luminance-qt5/files/patch-src_CMakeLists.txt
Normal file
|
@ -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)
|
|
@ -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"
|
|
@ -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) {
|
|
@ -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();
|
19
graphics/luminance-qt5/files/patch-src_UI_CMakeLists.txt
Normal file
19
graphics/luminance-qt5/files/patch-src_UI_CMakeLists.txt
Normal file
|
@ -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)
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue