git: 60c597255369 - main - graphics/lux: Add new port

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Fri, 01 Apr 2022 05:39:35 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=60c597255369b19614c7430ad6d7a158c0df3cfe

commit 60c597255369b19614c7430ad6d7a158c0df3cfe
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-03-18 23:09:02 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-04-01 05:38:53 +0000

    graphics/lux: Add new port
    
    lux is an image viewer for 'normal' images and the most common types of
    panoramic images, typically showing a 'rectilinear' view to the image
    data, which looks as if this view had been taken with an 'ordinary'
    lens.  The view can be zoomed, panned, scrolled, rotated and modified in
    several ways.  lux displays images, it does not modify them.  But it can
    produce high-quality images from the view it shows.  lux can also
    produce synoptic views of several images and do stitching, HDR blending,
    exposure fusions, focus stacks and deghosting, usually from 'PTO' files,
    processing a subset of the panotools standard used by panorama stitching
    software like hugin.
    
    WWW: https://bitbucket.org/kfj/pv
    
    PR:             262943
---
 graphics/Makefile                          |  1 +
 graphics/lux/Makefile                      | 43 ++++++++++++++++++++++++++++++
 graphics/lux/distinfo                      |  3 +++
 graphics/lux/files/patch-CMakeLists.txt    | 22 +++++++++++++++
 graphics/lux/files/patch-tinyfiledialogs.c | 16 +++++++++++
 graphics/lux/pkg-descr                     | 12 +++++++++
 6 files changed, 97 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index f29c01f44e01..467d91b1e4af 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -528,6 +528,7 @@
     SUBDIR += linux-c7-tiff
     SUBDIR += linux-c7-wayland
     SUBDIR += lua-gd
+    SUBDIR += lux
     SUBDIR += luminance-qt5
     SUBDIR += lximage-qt
     SUBDIR += magnum
diff --git a/graphics/lux/Makefile b/graphics/lux/Makefile
new file mode 100644
index 000000000000..3ca569c3aa1f
--- /dev/null
+++ b/graphics/lux/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	lux
+PORTVERSION=	1.1.0a
+CATEGORIES=	graphics
+MASTER_SITES=	https://bitbucket.org/kfj/pv/get/
+PKGNAMESUFFIX=	-pv	# distinguish from www/lux
+DISTNAME=	${COMMIT}
+
+MAINTAINER=	fuz@fuz.su
+COMMENT=	Panorama and image viewer
+
+LICENSE=	GPLv3 SANSATION
+LICENSE_COMB=	multi
+LICENSE_NAME_SANSATION=	Sansation freeware font family license
+LICENSE_FILE_GPLv3=	${WRKSRC}/LICENSE
+LICENSE_FILE_SANSATION=	${WRKSRC}/Sansation_1.31_ReadMe.txt
+LICENSE_PERMS_SANSATION=	dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
+
+BUILD_DEPENDS=	vc>0:devel/vc
+LIB_DEPENDS=	libvigraimpex.so:graphics/vigra \
+		libsfml-window.so:devel/sfml \
+		libexiv2.so:graphics/exiv2
+
+USES=		cmake dos2unix pkgconfig tar:bz2
+DOS2UNIX_FILES=	tinyfiledialogs.c
+CONFLICTS=	lux
+DESKTOP_ENTRIES=	"Lux Panorama Viewer" \
+			"panorama and image viewer" "lux-pv" "lux" \
+			"Graphics;ImageProcessing;Photography;Viewer;" \
+			false
+
+WRKSRC=		${WRKDIR}/kfj-pv-${COMMIT}
+COMMIT=		b5011de5af40
+PLIST_FILES=	bin/lux \
+		share/icons/hicolor/512x512/apps/lux-pv.png \
+		share/lux/fonts/Sansation_1.31_ReadMe.txt \
+		share/lux/fonts/Sansation_Regular.ttf
+
+post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps
+	${INSTALL_DATA} ${WRKSRC}/scripts/PV_512x512x32.png \
+	    ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps/lux-pv.png
+
+.include <bsd.port.mk>
diff --git a/graphics/lux/distinfo b/graphics/lux/distinfo
new file mode 100644
index 000000000000..8c90a45cce74
--- /dev/null
+++ b/graphics/lux/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1648645726
+SHA256 (b5011de5af40.tar.bz2) = da653c2c4a0cceac79f330a95153bf17d22315020bd21224c2fa1bba5420bb6b
+SIZE (b5011de5af40.tar.bz2) = 870231
diff --git a/graphics/lux/files/patch-CMakeLists.txt b/graphics/lux/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..5378953d52d5
--- /dev/null
+++ b/graphics/lux/files/patch-CMakeLists.txt
@@ -0,0 +1,22 @@
+--- CMakeLists.txt.orig	2022-03-28 19:04:00 UTC
++++ CMakeLists.txt
+@@ -106,7 +106,7 @@ message(STATUS "***** SYSTEM PROCESSOR ${CMAKE_SYSTEM_
+ # flavours which are on by default:
+ 
+ option(FLV_FALLBACK "SETS FALLBACK FLAVOUR" ON)
+-option(FLV_SSE42    "SETS SSE42 FLAVOUR"    OFF)
++option(FLV_SSE42    "SETS SSE42 FLAVOUR"    ON)
+ option(FLV_AVX      "SETS AVX FLAVOUR"      ON)
+ option(FLV_AVX2     "SETS AVX2 FLAVOUR"     ON)
+ option(FLV_AVX512f  "SETS AVX512f FLAVOUR"  ON)
+@@ -115,8 +115,8 @@ option(FLV_NATIVE   "SETS NATIVE FLAVOUR"   OFF)
+ set(i86 FALSE)
+ 
+ if(UNIX OR APPLE)
+-  if (    ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64
+-       OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL i686)
++  if (    ${CMAKE_SYSTEM_PROCESSOR} STREQUAL amd64
++       OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386)
+ 	  set(i86 TRUE)
+   endif()
+ elseif(WIN32)
diff --git a/graphics/lux/files/patch-tinyfiledialogs.c b/graphics/lux/files/patch-tinyfiledialogs.c
new file mode 100644
index 000000000000..044de50cece0
--- /dev/null
+++ b/graphics/lux/files/patch-tinyfiledialogs.c
@@ -0,0 +1,16 @@
+--- tinyfiledialogs.c.orig	2022-03-08 00:31:39 UTC
++++ tinyfiledialogs.c
+@@ -47,13 +47,6 @@ Thanks for contributions, bug corrections & thorough t
+ - Paul Rouget
+ */
+ 
+-
+-#ifndef __sun
+-#ifndef _POSIX_C_SOURCE
+-#define _POSIX_C_SOURCE 2 /* to accept POSIX 2 in old ANSI C standards */
+-#endif
+-#endif
+-
+ #if !defined(_WIN32) && ( defined(__GNUC__) || defined(__clang__) )
+ #if !defined(_GNU_SOURCE)
+  #define _GNU_SOURCE /* used only to resolve symbolic links. Can be commented out */
diff --git a/graphics/lux/pkg-descr b/graphics/lux/pkg-descr
new file mode 100644
index 000000000000..4b98690afb09
--- /dev/null
+++ b/graphics/lux/pkg-descr
@@ -0,0 +1,12 @@
+lux is an image viewer for 'normal' images and the most common types of
+panoramic images, typically showing a 'rectilinear' view to the image
+data, which looks as if this view had been taken with an 'ordinary'
+lens.  The view can be zoomed, panned, scrolled, rotated and modified in
+several ways.  lux displays images, it does not modify them.  But it can
+produce high-quality images from the view it shows.  lux can also
+produce synoptic views of several images and do stitching, HDR blending,
+exposure fusions, focus stacks and deghosting, usually from 'PTO' files,
+processing a subset of the panotools standard used by panorama stitching
+software like hugin.
+
+WWW: https://bitbucket.org/kfj/pv