git: 7cb9bbeced6c - main - graphics/{,py-}openshadinglanguage: sort out Makefile, pet portclippy, add graphics/partio as dependency

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 09 Jun 2024 16:21:15 UTC
The branch main has been updated by vvd:

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

commit 7cb9bbeced6ca9890d332f55ac5827cc932b8248
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-06-09 16:03:55 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-06-09 16:21:06 +0000

    graphics/{,py-}openshadinglanguage: sort out Makefile, pet portclippy, add graphics/partio as dependency
    
    Grab silently graphics/partio (small library for reading, writing, and
    manipulating a variety of standard particle formats GEO, BGEO, PTC, PDB, PDA)
    if installed.
    It's possible to create build option PARTIO and prevent search partio with
    PARTIO_CMAKE_OFF=-DCMAKE_DISABLE_FIND_PACKAGE_partio:BOOL=ON, but partio is
    small and is on by default by ustream - so add it as mandatory dependency.
    
    Also rename renamed by upstream ENABLERTTI to ENABLE_RTTI and pet portclippy.
    
    PR:             279457
    Approved by:    Shane <FreeBSD@ShaneWare.Biz> (maintaner)
---
 graphics/openshadinglanguage/Makefile    | 29 +++++++++++++++--------------
 graphics/py-openshadinglanguage/Makefile |  2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/graphics/openshadinglanguage/Makefile b/graphics/openshadinglanguage/Makefile
index b57c0e6cf3f4..ec9b0ddf6a9b 100644
--- a/graphics/openshadinglanguage/Makefile
+++ b/graphics/openshadinglanguage/Makefile
@@ -5,7 +5,7 @@ DISTVERSION=	1.12.14.0
 # py-openimageio's PORTREVISION.
 # Also, just to be on the safe side, when resetting,
 # best keep PORTREVISION?=	0.
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	graphics devel
 
 MAINTAINER=	FreeBSD@Shaneware.biz
@@ -15,12 +15,13 @@ WWW=		https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-BROKEN_riscv64=		fails to build: /usr/include/c++/v1/__threading_support:135:3: Unsupported architecture
+BROKEN_riscv64=	fails to build: /usr/include/c++/v1/__threading_support:135:3: Unsupported architecture
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 		libImath.so:math/Imath \
 		libOpenEXR.so:graphics/openexr \
 		libOpenImageIO.so:graphics/openimageio \
+		libpartio.so:graphics/partio \
 		libpugixml.so:textproc/pugixml
 
 USES=		bison cmake compiler:c++14-lang llvm:max=15,lib localbase ncurses
@@ -29,21 +30,21 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	AcademySoftwareFoundation
 GH_PROJECT=	OpenShadingLanguage
 
-CMAKE_ON=	ENABLERTTI OSL_BUILD_TESTS USE_LLVM_BITCODE USE_LIBCPLUSPLUS
-CMAKE_ARGS+=	-DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}" \
-		-DCMAKE_INSTALL_DOCDIR:STRING=${DOCSDIR} -DCMAKE_CXX_STANDARD=14
+CMAKE_ARGS+=	-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_DOCDIR:STRING=${DOCSDIR} \
+		-DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}"
+CMAKE_ON=	ENABLE_RTTI OSL_BUILD_TESTS USE_LIBCPLUSPLUS USE_LLVM_BITCODE
+
+# DISTVERSION has an extra digit which isn't in the lib name
+# for LIBVERS we want the first three digits
+PLIST_SUB=	SHL2=${PORTVERSION:R:R} SHL3=${PORTVERSION:R}
 
 OPTIONS_DEFINE=		OSLTOY
 OPTIONS_SUB=		yes
 
 OSLTOY_DESC=		Interactive shader edit and visualize tool
-OSLTOY_CMAKE_BOOL=	USE_QT
 OSLTOY_USES=		qt:6 gl
 OSLTOY_USE=		GL=gl,opengl QT=base
-
-# DISTVERSION has an extra digit which isn't in the lib name
-# for LIBVERS we want the first three digits
-PLIST_SUB=	SHL3=${PORTVERSION:R} SHL2=${PORTVERSION:R:R}
+OSLTOY_CMAKE_BOOL=	USE_QT
 
 .include <bsd.port.options.mk>
 
@@ -58,20 +59,20 @@ post-patch:
 BUILD_DEPENDS+=	${PREFIX}/share/cmake/pybind11/pybind11Config.cmake:devel/pybind11
 LIB_DEPENDS+=	liboslquery.so:graphics/openshadinglanguage
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}openimageio>0:graphics/py-openimageio@${PY_FLAVOR}
-PLIST=		${PKGDIR}/pkg-plist-pybind
 USES+=		python
 USE_PYTHON=	flavors
-CMAKE_ON+=	USE_PYTHON
 CMAKE_ARGS+=	-DPYTHON_VERSION=${PYTHON_VER}
+CMAKE_ON+=	USE_PYTHON
+PLIST=		${PKGDIR}/pkg-plist-pybind
 
 do-install:
 	${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
 	${INSTALL_LIB} ${BUILD_WRKSRC}/lib/python/site-packages/oslquery.so ${STAGEDIR}${PYTHON_SITELIBDIR}
 .else # SLAVE_PORT != yes
 USES+=		python:build
-BINARY_ALIAS+=	python=${PYTHON_CMD}
-CMAKE_OFF+=	USE_PYTHON
 USE_LDCONFIG=	yes
+CMAKE_OFF+=	USE_PYTHON
+BINARY_ALIAS+=	python=${PYTHON_CMD}
 .endif # SLAVE_PORT
 
 .include <bsd.port.mk>
diff --git a/graphics/py-openshadinglanguage/Makefile b/graphics/py-openshadinglanguage/Makefile
index 1fa4e38214f8..a1707b8c59e3 100644
--- a/graphics/py-openshadinglanguage/Makefile
+++ b/graphics/py-openshadinglanguage/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	graphics multimedia python
 # Note this port shares its PORTREVISION with graphics/openshadinglanguage!
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}