git: c6d1ece34a22 - main - graphics/libQGLViewer: update 2.7.2 → 2.9.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 05 Apr 2024 09:15:58 UTC
The branch main has been updated by yuri:

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

commit c6d1ece34a22c51a3977fd0be9572c3d8201b589
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-04-05 09:11:37 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-04-05 09:15:40 +0000

    graphics/libQGLViewer: update 2.7.2 → 2.9.1
    
    Will flavorize this port next.
    
    Reported by:    portscout
---
 graphics/libQGLViewer/Makefile                   | 18 ++++++++++++------
 graphics/libQGLViewer/distinfo                   |  6 +++---
 graphics/libQGLViewer/files/patch-CMakeLists.txt | 18 ++++++++++++++++++
 graphics/libQGLViewer/pkg-plist                  |  9 ++-------
 math/g2o/Makefile                                |  4 ++--
 math/octomap/Makefile                            |  3 ++-
 6 files changed, 39 insertions(+), 19 deletions(-)

diff --git a/graphics/libQGLViewer/Makefile b/graphics/libQGLViewer/Makefile
index e8662b18fe8e..dc36b262dec0 100644
--- a/graphics/libQGLViewer/Makefile
+++ b/graphics/libQGLViewer/Makefile
@@ -1,20 +1,26 @@
 PORTNAME=	libQGLViewer
-DISTVERSION=	2.7.2
-PORTREVISION=	1
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.9.1
 CATEGORIES=	graphics devel
-MASTER_SITES=	http://www.libqglviewer.com/src/
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	C++ library based on Qt5 that eases the creation of OpenGL 3D viewers
-WWW=		http://libqglviewer.com/index.html
+WWW=		https://github.com/GillesDebunne/libQGLViewer
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENCE
 
-USES=		compiler:c++11-lang gl qmake qt:5
+USES=		cmake compiler:c++17-lang gl qt:5
 USE_GL=		gl glu
-USE_QT=		core designer gui opengl widgets xml buildtools:build
+USE_QT=		core designer gui opengl widgets xml \
+		buildtools:build qmake:build
 USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	GillesDebunne
+
+CMAKE_OFF=	USE_QT6
+
 PLIST_SUB=	SHL3=${DISTVERSION} SHL2=${DISTVERSION:C/\.[0-9]$//} SHL1=${DISTVERSION:C/\.[0-9]\.[0-9]$//}
 
 OPTIONS_DEFINE=	DOCS
diff --git a/graphics/libQGLViewer/distinfo b/graphics/libQGLViewer/distinfo
index 3dd1e20e973e..632c9a7f995d 100644
--- a/graphics/libQGLViewer/distinfo
+++ b/graphics/libQGLViewer/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1579081853
-SHA256 (libQGLViewer-2.7.2.tar.gz) = e2d2799dec5cff74548e951556a1fa06a11d9bcde2ce6593f9c27a17543b7c08
-SIZE (libQGLViewer-2.7.2.tar.gz) = 3135146
+TIMESTAMP = 1712301434
+SHA256 (GillesDebunne-libQGLViewer-v2.9.1_GH0.tar.gz) = ea4f9ac627c136a6851ffd3763b154f21c87a58bcec4e5d5b2d07e65a403096b
+SIZE (GillesDebunne-libQGLViewer-v2.9.1_GH0.tar.gz) = 2499763
diff --git a/graphics/libQGLViewer/files/patch-CMakeLists.txt b/graphics/libQGLViewer/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..8686c4f3eb41
--- /dev/null
+++ b/graphics/libQGLViewer/files/patch-CMakeLists.txt
@@ -0,0 +1,18 @@
+--- CMakeLists.txt.orig	2024-04-05 07:42:05 UTC
++++ CMakeLists.txt
+@@ -17,11 +17,13 @@ set(CMAKE_AUTOUIC ON)
+ set(CMAKE_AUTOUIC ON)
+ 
+ # This will find the Qt files.
++if (USE_QT6)
+ find_package(Qt6 COMPONENTS Core Widgets Xml OpenGL OpenGLWidgets)
+ if (Qt6_FOUND)
+     message("Building with Qt6")
+-    set(QtLibs Qt::Core Qt::Widgets Qt::Xml Qt::OpenGL Qt::OpenGLWidgets)
+-else()
++    set(QtLibs Qt::Core Qt::Widgets Qt::Xml Qt::OpenGL Qt::OpenGLWidgets)
++endif(Qt6_FOUND)
++else(USE_QT6)
+     find_package(Qt5 5.15 REQUIRED COMPONENTS Core Widgets Xml OpenGL)
+     message("Building with Qt5")
+     set(QtLibs Qt::Core Qt::Widgets Qt::Xml Qt::OpenGL)
diff --git a/graphics/libQGLViewer/pkg-plist b/graphics/libQGLViewer/pkg-plist
index 29d64671a919..340a63317d35 100644
--- a/graphics/libQGLViewer/pkg-plist
+++ b/graphics/libQGLViewer/pkg-plist
@@ -8,12 +8,7 @@ include/QGLViewer/manipulatedCameraFrame.h
 include/QGLViewer/manipulatedFrame.h
 include/QGLViewer/mouseGrabber.h
 include/QGLViewer/qglviewer.h
-include/QGLViewer/qglviewer_fr.qm
 include/QGLViewer/quaternion.h
 include/QGLViewer/vec.h
-lib/libQGLViewer-qt5.prl
-lib/libQGLViewer-qt5.so
-lib/libQGLViewer-qt5.so.%%SHL1%%
-lib/libQGLViewer-qt5.so.%%SHL2%%
-lib/libQGLViewer-qt5.so.%%SHL3%%
-lib/qt5/plugins/designer/libqglviewerplugin.so
+lib/libQGLViewer.so
+libdata/pkgconfig/libQGLViewer.pc
diff --git a/math/g2o/Makefile b/math/g2o/Makefile
index e61c62a4f6e3..8dc49a0a9ddd 100644
--- a/math/g2o/Makefile
+++ b/math/g2o/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	g2o
 DISTVERSION=	20230806
-PORTREVISION=	9
+PORTREVISION=	10
 DISTVERSIONSUFFIX=	_git
 CATEGORIES=	math
 
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libamd.so:math/suitesparse-amd \
 		libcholmod.so:math/suitesparse-cholmod \
 		libcolamd.so:math/suitesparse-colamd \
 		libcxsparse.so:math/suitesparse-cxsparse \
-		libQGLViewer-qt5.so:graphics/libQGLViewer \
+		libQGLViewer.so:graphics/libQGLViewer \
 		libmetis.so:math/metis \
 		libopenblas.so:math/openblas \
 		libsuitesparseconfig.so:math/suitesparse-config
diff --git a/math/octomap/Makefile b/math/octomap/Makefile
index 7ad8273f53f0..312d15ca6833 100644
--- a/math/octomap/Makefile
+++ b/math/octomap/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	octomap
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.10.0
+PORTREVISION=	1
 CATEGORIES=	math
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -12,7 +13,7 @@ LICENSE_COMB=	dual
 LICENSE_FILE_BSD3CLAUSE=	${WRKSRC}/octomap/LICENSE.txt
 LICENSE_FILE_GPLv2=	${WRKSRC}/octovis/LICENSE.txt
 
-LIB_DEPENDS=	libQGLViewer-qt5.so:graphics/libQGLViewer
+LIB_DEPENDS=	libQGLViewer.so:graphics/libQGLViewer
 
 USES=		cmake:testing compiler:c++11-lang localbase:ldflags gl qt:5
 USE_QT=		core gui opengl xml widgets buildtools:build qmake:build