graphics/py-f3d: New port: Fast and minimalist 3D viewer

This commit is contained in:
Yuri Victorovich 2022-10-18 00:39:35 -07:00
parent 01bf2c9e3c
commit 1ca7c87009
6 changed files with 64 additions and 0 deletions

View file

@ -846,6 +846,7 @@
SUBDIR += py-django-easy-thumbnails
SUBDIR += py-djvulibre
SUBDIR += py-exifread
SUBDIR += py-f3d
SUBDIR += py-face_recognition
SUBDIR += py-face_recognition_models
SUBDIR += py-fiona

26
graphics/py-f3d/Makefile Normal file
View file

@ -0,0 +1,26 @@
PORTNAME= f3d
DISTVERSIONPREFIX= v
DISTVERSION= 1.3.1
CATEGORIES= graphics
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Fast and minimalist 3D viewer
WWW= https://f3d-app.github.io/f3d/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/../LICENSE
BUILD_DEPENDS= pybind11>0:devel/pybind11
LIB_DEPENDS= libf3d.so:graphics/f3d
USES= cmake:testing compiler:c++17-lang localbase:ldflags python
USE_GITHUB= yes
GH_ACCOUNT= f3d-app
WRKSRC_SUBDIR= python
CXXFLAGS+= -I${LOCALBASE}/include/f3d
.include <bsd.port.mk>

3
graphics/py-f3d/distinfo Normal file
View file

@ -0,0 +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

View file

@ -0,0 +1,28 @@
--- CMakeLists.txt.orig 2022-09-07 10:17:51 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)
target_compile_features(pyf3d PRIVATE cxx_std_14)
-target_link_libraries(pyf3d PRIVATE libf3d)
+target_link_libraries(pyf3d PRIVATE f3d)
set_target_properties(pyf3d PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
@@ -23,6 +26,10 @@ endif()
if (APPLE OR UNIX)
set_target_properties(pyf3d PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif ()
+
+set(PYTHON_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
+install(TARGETS pyf3d
+ LIBRARY DESTINATION ${PYTHON_INSTALL_PATH} COMPONENT pythonmodule)
# testing
if(BUILD_TESTING)

View file

@ -0,0 +1,5 @@
F3D is a VTK-based 3D viewer following the KISS principle, so it is minimalist,
efficient, has no GUI, has simple interaction mechanisms and is fully
controllable using arguments in the command line.
It supports a range of file formats, rendering and texturing options.

View file

@ -0,0 +1 @@
%%PYTHON_SITELIBDIR%%/f3d%%PYTHON_EXT_SUFFIX%%.so