git: 2495f4fa5120 - main - graphics/{,py-}f3d: Update 1.3.1 → 2.0.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 12 May 2023 07:43:17 UTC
The branch main has been updated by yuri:

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

commit 2495f4fa5120df95fac7c96805b2eddb9d92a6e3
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-05-12 07:41:57 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-05-12 07:43:15 +0000

    graphics/{,py-}f3d: Update 1.3.1 → 2.0.0
    
    Reported by:    portscout
---
 graphics/f3d/Makefile                              | 47 +++++++++++--------
 graphics/f3d/distinfo                              |  8 ++--
 .../f3d/files/patch-application_CMakeLists.txt     | 11 -----
 .../f3d/files/patch-library_testing_CMakeLists.txt | 11 -----
 graphics/f3d/pkg-plist                             | 52 +++++++++++++++++++++-
 graphics/py-f3d/Makefile                           |  8 ++--
 graphics/py-f3d/distinfo                           |  6 +--
 graphics/py-f3d/files/patch-CMakeLists.txt         | 22 ++++-----
 8 files changed, 98 insertions(+), 67 deletions(-)

diff --git a/graphics/f3d/Makefile b/graphics/f3d/Makefile
index 78ac36dc0b2d..b7f1945f3489 100644
--- a/graphics/f3d/Makefile
+++ b/graphics/f3d/Makefile
@@ -1,20 +1,16 @@
 PORTNAME=	f3d
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.1
-PORTREVISION=	9
+DISTVERSION=	2.0.0
 CATEGORIES=	graphics
 
-PATCH_SITES=	https://github.com/f3d-app/f3d/commit/
-PATCHFILES=	cc108300b44981b530aa3ad72c971c889e6bf3e2.diff:-p1
-
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Fast and minimalist 3D viewer
 WWW=		https://f3d-app.github.io/f3d/
 
 LICENSE=	BSD3CLAUSE
-LICENSE_FILE=	${WRKSRC}/LICENSE
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
+LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg4 \
 		libfontconfig.so:x11-fonts/fontconfig \
 		libfreeimage.so:graphics/freeimage \
 		libfreetype.so:print/freetype2 \
@@ -23,7 +19,7 @@ LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 		libnetcdf.so:science/netcdf \
 		libvtkCommonMisc-${VTK_VER}.so:math/vtk${VTK_VER:R}
 
-USES=		cmake:testing compiler:c++17-lang desktop-file-utils gl tcl tk xorg
+USES=		cmake:testing compiler:c++17-lang desktop-file-utils gl shared-mime-info tcl tk xorg
 USE_GL=		gl glu
 USE_XORG=	ice sm x11 xt
 
@@ -31,31 +27,39 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	f3d-app
 
 CMAKE_OFF=	F3D_STRICT_BUILD # disable -Werror
+CMAKE_OFF+=	F3D_LINUX_APPLICATION_LINK_FILESYSTEM
 
-OPTIONS_GROUP=			MODULES
-OPTIONS_GROUP_MODULES=		ALEMBIC ASSIMP EXODUS EXTERNAL_RENDERING OCCT RAYTRACING
-OPTIONS_DEFAULT=		ALEMBIC ASSIMP EXODUS OCCT
+# dependency descroptions are in https://f3d.app/doc/dev/BUILD.html
+OPTIONS_GROUP=			MODULES PLUGINS
+OPTIONS_GROUP_MODULES=		EXTERNAL_RENDERING RAYTRACING
+OPTIONS_GROUP_PLUGINS=		ALEMBIC ASSIMP DRACO EXODUS OCCT
+OPTIONS_DEFAULT=		ALEMBIC ASSIMP DRACO EXODUS OCCT
+OPTIONS_SUB=			yes
 
 MODULES_DESC=			Build modules:
 
-ALEMBIC_DESC=			Alembic module (ABC files)
-ALEMBIC_CMAKE_BOOL=		F3D_MODULE_ALEMBIC
+ALEMBIC_DESC=			Alembic plugin (for ABC files)
+ALEMBIC_CMAKE_BOOL=		F3D_PLUGIN_BUILD_ALEMBIC
 ALEMBIC_LIB_DEPENDS=		libAlembic.so:graphics/alembic
 
-ASSIMP_DESC=			Assimp module (FBX, OFF, DAE and DXF files)
-ASSIMP_CMAKE_BOOL=		F3D_MODULE_ASSIMP
+ASSIMP_DESC=			Assimp plugin (for FBX, OFF, DAE and DXF files)
+ASSIMP_CMAKE_BOOL=		F3D_PLUGIN_BUILD_ASSIMP
 ASSIMP_LIB_DEPENDS=		libassimp.so:multimedia/assimp
 
-EXODUS_DESC=			ExodusII module
-EXODUS_CMAKE_BOOL=		F3D_MODULE_EXODUS
+DRACO_DESC=			Draco plugin
+DRACO_CMAKE_BOOL=		F3D_PLUGIN_BUILD_DRACO
+DRACO_LIB_DEPENDS=		libdraco.so:archivers/draco
+
+EXODUS_DESC=			ExodusII plugin
+EXODUS_CMAKE_BOOL=		F3D_PLUGIN_BUILD_EXODUS
 
 EXTERNAL_RENDERING_DESC=	External rendering module
 EXTERNAL_RENDERING_CMAKE_BOOL=	F3D_MODULE_EXTERNAL_RENDERING
 EXTERNAL_RENDERING_BROKEN=	Requires VTK::RenderingExternal enabled in VTK
 
-OCCT_DESC=			OpenCASCADE module (STEP and IGES files)
+OCCT_DESC=			OpenCASCADE plugin (for STEP and IGES files)
 OCCT_USES=			localbase:ldflags
-OCCT_CMAKE_BOOL=		F3D_MODULE_OCCT
+OCCT_CMAKE_BOOL=		F3D_PLUGIN_BUILD_OCCT
 OCCT_LIB_DEPENDS=		libTKBRep.so:cad/opencascade \
 				libdraco.so:archivers/draco
 OCCT_CMAKE_ON=			-DOpenCASCADE_DIR=${LOCALBASE}/lib/cmake
@@ -66,6 +70,11 @@ RAYTRACING_BROKEN=		Requires VTK::RenderingRayTracing enabled in VTK
 
 post-install:
 	@${RM} -r ${STAGEDIR}${DOCSDIR}
+	# component-based install
+	cd ${BUILD_WRKSRC} && \
+		${SETENV} ${MAKE_ENV} ${CMAKE_BIN} --install . --component configuration && \
+		${SETENV} ${MAKE_ENV} ${CMAKE_BIN} --install . --component sdk && \
+		${SETENV} ${MAKE_ENV} ${CMAKE_BIN} --install . --component mimetypes
 
 .include <../../math/vtk9/Makefile.version>
 .include <bsd.port.mk>
diff --git a/graphics/f3d/distinfo b/graphics/f3d/distinfo
index 423b4b73c6e6..77de3baab9a4 100644
--- a/graphics/f3d/distinfo
+++ b/graphics/f3d/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1675621771
-SHA256 (f3d-app-f3d-v1.3.1_GH0.tar.gz) = 653dc4044e14d0618c1d947a8ee85d2513e100b3fc24bd6e51830131a13e795d
-SIZE (f3d-app-f3d-v1.3.1_GH0.tar.gz) = 35586414
-SHA256 (cc108300b44981b530aa3ad72c971c889e6bf3e2.diff) = d57f50bcf67f61b6ec5bd156da5c573210ef14fb360c8b82ae7a4cfffa53323a
-SIZE (cc108300b44981b530aa3ad72c971c889e6bf3e2.diff) = 1224
+TIMESTAMP = 1683777603
+SHA256 (f3d-app-f3d-v2.0.0_GH0.tar.gz) = 5b335de78a9f68903d7023d947090d4b36fa15b9e165749906a82153e0f56d05
+SIZE (f3d-app-f3d-v2.0.0_GH0.tar.gz) = 15392626
diff --git a/graphics/f3d/files/patch-application_CMakeLists.txt b/graphics/f3d/files/patch-application_CMakeLists.txt
deleted file mode 100644
index f219486bd740..000000000000
--- a/graphics/f3d/files/patch-application_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- application/CMakeLists.txt.orig	2022-09-07 16:38:14 UTC
-+++ application/CMakeLists.txt
-@@ -29,7 +29,7 @@ endif()
- add_executable(f3d ${F3D_SOURCE_FILES})
- target_link_libraries(f3d PUBLIC libf3d)
- 
--if (UNIX AND NOT APPLE)
-+if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-   target_link_libraries(f3d PRIVATE stdc++fs)
- endif ()
- 
diff --git a/graphics/f3d/files/patch-library_testing_CMakeLists.txt b/graphics/f3d/files/patch-library_testing_CMakeLists.txt
deleted file mode 100644
index 828882a5d08a..000000000000
--- a/graphics/f3d/files/patch-library_testing_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- library/testing/CMakeLists.txt.orig	2022-09-07 16:39:43 UTC
-+++ library/testing/CMakeLists.txt
-@@ -112,7 +112,7 @@ if(Qt5_FOUND)
-   target_link_libraries(libf3dSDKTests Qt5::OpenGL)
- endif()
- 
--if (UNIX AND NOT APPLE)
-+if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-   target_link_libraries(libf3dSDKTests stdc++fs)
- endif ()
- 
diff --git a/graphics/f3d/pkg-plist b/graphics/f3d/pkg-plist
index a6718b1a0e68..1c1ed1944508 100644
--- a/graphics/f3d/pkg-plist
+++ b/graphics/f3d/pkg-plist
@@ -1,4 +1,18 @@
 bin/f3d
+%%ALEMBIC%%%%ETCDIR%%/config.d/10_alembic.json
+%%ASSIMP%%%%ETCDIR%%/config.d/10_assimp.json
+%%DRACO%%%%ETCDIR%%/config.d/10_draco.json
+%%EXODUS%%%%ETCDIR%%/config.d/10_exodus.json
+%%ETCDIR%%/config.d/10_global.json
+%%ETCDIR%%/config.d/10_native.json
+%%ALEMBIC%%%%ETCDIR%%/thumbnail.d/10_alembic.json
+%%ASSIMP%%%%ETCDIR%%/thumbnail.d/10_assimp.json
+%%DRACO%%%%ETCDIR%%/thumbnail.d/10_draco.json
+%%EXODUS%%%%ETCDIR%%/thumbnail.d/10_exodus.json
+%%OCCT%%%%ETCDIR%%/config.d/10_occt.json
+%%ETCDIR%%/thumbnail.d/10_global.json
+%%ETCDIR%%/thumbnail.d/10_native.json
+%%OCCT%%%%ETCDIR%%/thumbnail.d/10_occt.json
 include/f3d/camera.h
 include/f3d/engine.h
 include/f3d/exception.h
@@ -8,24 +22,60 @@ include/f3d/interactor.h
 include/f3d/loader.h
 include/f3d/log.h
 include/f3d/options.h
+include/f3d/plugin.h
+include/f3d/reader.h
 include/f3d/types.h
 include/f3d/window.h
 lib/cmake/f3d/f3dConfig.cmake
 lib/cmake/f3d/f3dConfigVersion.cmake
 lib/cmake/f3d/f3dEmbed.cmake
+lib/cmake/f3d/f3dPlugin.cmake
 lib/cmake/f3d/f3dTargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/f3d/f3dTargets.cmake
+lib/cmake/f3d/plugin.cxx.in
+lib/cmake/f3d/plugin.desktop.in
+lib/cmake/f3d/plugin.thumbnailer.in
+lib/cmake/f3d/readerBoilerPlate.h.in
+%%ALEMBIC%%lib/libVTKExtensionsAlembicReader.a
 lib/libVTKExtensionsApplicative.a
+%%ASSIMP%%lib/libVTKExtensionsAssimpReader.a
 lib/libVTKExtensionsCore.a
+%%DRACO%%lib/libVTKExtensionsDracoReader.a
+%%OCCT%%lib/libVTKExtensionsOCCTReader.a
 lib/libVTKExtensionsReaders.a
 lib/libVTKExtensionsRendering.a
 lib/libf3d.so
+%%ALEMBIC%%share/applications/f3d-plugin-alembic.desktop
+%%ASSIMP%%share/applications/f3d-plugin-assimp.desktop
+%%DRACO%%share/applications/f3d-plugin-draco.desktop
+share/applications/f3d-plugin-native.desktop
+%%OCCT%%share/applications/f3d-plugin-occt.desktop
 share/applications/f3d.desktop
 share/bash-completion/completions/f3d
+share/doc/F3D/LICENSE.md
+share/doc/F3D/THIRD_PARTY_LICENSES.md
+%%ALEMBIC%%%%DATADIR%%/plugins/alembic.json
+%%ASSIMP%%%%DATADIR%%/plugins/assimp.json
+%%DRACO%%%%DATADIR%%/plugins/draco.json
+%%EXODUS%%%%DATADIR%%/plugins/exodus.json
+%%DATADIR%%/plugins/native.json
+%%OCCT%%%%DATADIR%%/plugins/occt.json
 share/fish/vendor_completions.d/f3d.fish
 share/icons/hicolor/32x32/apps/f3d.png
 share/icons/hicolor/48x48/apps/f3d.png
 share/icons/hicolor/64x64/apps/f3d.png
 share/icons/hicolor/scalable/apps/f3d.svg
-share/metainfo/io.github.f3d_app.f3d.metainfo.xml
+share/metainfo/app.f3d.F3D.metainfo.xml
+share/mime/packages/f3d-3d-formats.xml
+share/mime/packages/f3d-3d-image-formats.xml
+%%ALEMBIC%%share/mime/packages/f3d-alembic-formats.xml
+%%ASSIMP%%share/mime/packages/f3d-assimp-formats.xml
+%%DRACO%%share/mime/packages/f3d-draco-formats.xml
+%%OCCT%%share/mime/packages/f3d-occt-formats.xml
+share/mime/packages/f3d-vtk-formats.xml
+%%ALEMBIC%%share/thumbnailers/f3d-plugin-alembic.thumbnailer
+%%ASSIMP%%share/thumbnailers/f3d-plugin-assimp.thumbnailer
+%%DRACO%%share/thumbnailers/f3d-plugin-draco.thumbnailer
+share/thumbnailers/f3d-plugin-native.thumbnailer
+%%OCCT%%share/thumbnailers/f3d-plugin-occt.thumbnailer
 share/zsh/site-functions/_f3d
diff --git a/graphics/py-f3d/Makefile b/graphics/py-f3d/Makefile
index 7d939d5b9c2d..a2428121b77e 100644
--- a/graphics/py-f3d/Makefile
+++ b/graphics/py-f3d/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	f3d
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.1
-PORTREVISION=	2
+DISTVERSION=	2.0.0
 CATEGORIES=	graphics
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -10,7 +9,7 @@ COMMENT=	Fast and minimalist 3D viewer
 WWW=		https://f3d-app.github.io/f3d/
 
 LICENSE=	BSD3CLAUSE
-LICENSE_FILE=	${WRKSRC}/../LICENSE
+LICENSE_FILE=	${WRKSRC}/../LICENSE.md
 
 BUILD_DEPENDS=	pybind11>0:devel/pybind11
 LIB_DEPENDS=	libf3d.so:graphics/f3d
@@ -22,6 +21,9 @@ GH_ACCOUNT=	f3d-app
 
 WRKSRC_SUBDIR=	python
 
+CMAKE_ARGS=	-DFREEBSD_PYTHON_VER=${PYTHON_VER} \
+		-DCMAKE_INSTALL_LIBDIR=lib
+
 CXXFLAGS+=	-I${LOCALBASE}/include/f3d
 
 .include <bsd.port.mk>
diff --git a/graphics/py-f3d/distinfo b/graphics/py-f3d/distinfo
index 07fcead13c5e..2b1b5b81f17c 100644
--- a/graphics/py-f3d/distinfo
+++ b/graphics/py-f3d/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1662604096
-SHA256 (f3d-app-f3d-v1.3.1_GH0.tar.gz) = 653dc4044e14d0618c1d947a8ee85d2513e100b3fc24bd6e51830131a13e795d
-SIZE (f3d-app-f3d-v1.3.1_GH0.tar.gz) = 35586414
+TIMESTAMP = 1683822703
+SHA256 (f3d-app-f3d-v2.0.0_GH0.tar.gz) = 5b335de78a9f68903d7023d947090d4b36fa15b9e165749906a82153e0f56d05
+SIZE (f3d-app-f3d-v2.0.0_GH0.tar.gz) = 15392626
diff --git a/graphics/py-f3d/files/patch-CMakeLists.txt b/graphics/py-f3d/files/patch-CMakeLists.txt
index 434d9bd56e1a..d33b8156f532 100644
--- a/graphics/py-f3d/files/patch-CMakeLists.txt
+++ b/graphics/py-f3d/files/patch-CMakeLists.txt
@@ -1,21 +1,15 @@
---- CMakeLists.txt.orig	2022-09-07 10:17:51 UTC
+--- CMakeLists.txt.orig	2023-04-20 16:01:48 UTC
 +++ CMakeLists.txt
-@@ -1,10 +1,13 @@
-+cmake_minimum_required(VERSION 3.12)
-+find_package(Python COMPONENTS Interpreter Development)
- find_package(pybind11 2.2 REQUIRED)
-+set(CMAKE_INSTALL_LIBDIR lib)
- 
- pybind11_add_module(pyf3d F3DPythonBindings.cxx)
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
  
- target_compile_features(pyf3d PRIVATE cxx_std_14)
+ project(pyf3d)
  
--target_link_libraries(pyf3d PRIVATE libf3d)
-+target_link_libraries(pyf3d PRIVATE f3d)
+-find_package(Python 3.6 COMPONENTS Interpreter Development)
++find_package(Python ${FREEBSD_PYTHON_VER} EXACT COMPONENTS Interpreter Development)
+ find_package(pybind11 2.2 REQUIRED)
  
- set_target_properties(pyf3d PROPERTIES
-   LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
-@@ -23,6 +26,10 @@ endif()
+ pybind11_add_module(pyf3d MODULE F3DPythonBindings.cxx)
+@@ -33,6 +33,10 @@ endif()
  if (APPLE OR UNIX)
    set_target_properties(pyf3d PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
  endif ()