diff --git a/graphics/partio/Makefile b/graphics/partio/Makefile index 0e471dcd52e5..5fdacd155f50 100644 --- a/graphics/partio/Makefile +++ b/graphics/partio/Makefile @@ -1,71 +1,72 @@ PORTNAME= partio -PORTVERSION= 1.14.0 +PORTVERSION= 1.14.6 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= graphics math MAINTAINER= danfe@FreeBSD.org COMMENT= C++ library for particle I/O and manipulation LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= swig:devel/swig USES= cmake compiler:c++11-lang gl python:run shebangfix xorg SHEBANG_FILES= src/tools/partedit.py src/tools/partinspect.py \ src/tools/partjson.py USE_GL= gl glu glut USE_LDCONFIG= yes USE_XORG= xi xmu USE_GITHUB= yes GH_ACCOUNT= wdas PORTDOCS= * PORTEXAMPLES= * -OPTIONS_DEFINE= DOCS DOXYGEN EXAMPLES PYQT -PYQT_DESC= Install PyQt-based auxiliary tools +OPTIONS_DEFINE= DOCS DOXYGEN EXAMPLES PYQT TEST +PYQT_DESC= Install PyQt-based auxiliary tools # DOCS must be selected for PORTDOCS to work DOXYGEN_IMPLIES= DOCS DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen DOXYGEN_ALL_TARGET= all doc DOCS_BUILD_DEPENDS= doxygen:devel/doxygen PYQT_USES= pyqt:5 PYQT_USE= PYQT=core,gui,widgets -PYQT_PLIST_FILES= bin/partinspect +PYQT_PLIST_FILES= bin/partedit bin/partinspect + +TEST_LIB_DEPENDS= libgtest.so:devel/googletest +TEST_CMAKE_ON= -DPARTIO_GTEST_ENABLED:BOOL=ON +TEST_VARS= SHEBANG_FILES+="src/tests/testpartio.py \ + src/tests/testpartjson.py" post-patch: @${REINPLACE_CMD} -e \ - '/^project/s,${PORTNAME},& VERSION ${PORTVERSION},' \ - ${WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's,OpenGL::OpenGL,$${OPENGL_LIBRARIES},' \ - ${WRKSRC}/src/tools/CMakeLists.txt + '/^project/s,${PORTNAME},& VERSION ${PORTVERSION}, ; \ + s,/usr,${LOCALBASE},' ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e 's,^from Qt,from PyQt5,' \ + ${WRKSRC}/src/tools/partedit.py \ ${WRKSRC}/src/tools/partinspect.py - @${REINPLACE_CMD} -e '/^install/d' ${WRKSRC}/src/tests/CMakeLists.txt post-patch-DOCS-off: @${REINPLACE_CMD} -e '/add_subdirectory(src\/doc)/d' \ ${WRKSRC}/CMakeLists.txt -# Remove those files that don't yet work -post-install: - ${RM} ${STAGEDIR}${PREFIX}/bin/partedit - post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/src/doc && ${INSTALL_DATA} tutorial.txt partio.tex ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/src/data && ${INSTALL_DATA} * ${STAGEDIR}${EXAMPLESDIR} post-install-PYQT-off: cd ${STAGEDIR}${PREFIX} && ${RM} ${PYQT_PLIST_FILES} +do-test-TEST-on: + @cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS} + .include diff --git a/graphics/partio/distinfo b/graphics/partio/distinfo index 81552a025f3c..697b7c5bbb0f 100644 --- a/graphics/partio/distinfo +++ b/graphics/partio/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1606871958 -SHA256 (wdas-partio-v1.14.0_GH0.tar.gz) = f98874b781e92ab9b5d0575cabc437d27274cd91cb581f80960918efa491f902 -SIZE (wdas-partio-v1.14.0_GH0.tar.gz) = 335265 +TIMESTAMP = 1623084225 +SHA256 (wdas-partio-v1.14.6_GH0.tar.gz) = 53a5754d6b2fc3e184953d985c233118ef0ab87169f34e3aec4a7e6d20cd9bd4 +SIZE (wdas-partio-v1.14.6_GH0.tar.gz) = 336527 diff --git a/graphics/partio/files/patch-src_lib_CMakeLists.txt b/graphics/partio/files/patch-src_lib_CMakeLists.txt index e9e5eb95fbac..c4741ac00313 100644 --- a/graphics/partio/files/patch-src_lib_CMakeLists.txt +++ b/graphics/partio/files/patch-src_lib_CMakeLists.txt @@ -1,15 +1,10 @@ ---- src/lib/CMakeLists.txt.orig 2020-12-02 01:19:18 UTC +--- src/lib/CMakeLists.txt.orig 2021-06-07 16:43:45 UTC +++ src/lib/CMakeLists.txt -@@ -40,7 +40,11 @@ else() - set(PARTIO_LIBRARY_TYPE STATIC) - endif() - add_library(partio ${PARTIO_LIBRARY_TYPE} ${io_cpp} ${core_cpp}) --set_target_properties(partio PROPERTIES OUTPUT_NAME partio POSITION_INDEPENDENT_CODE ON) -+set_target_properties(partio PROPERTIES -+ OUTPUT_NAME partio +@@ -44,6 +44,7 @@ add_library(partio ${PARTIO_LIBRARY_TYPE} ${io_cpp} ${ + set_target_properties(partio PROPERTIES + OUTPUT_NAME partio + POSITION_INDEPENDENT_CODE ON + VERSION ${CMAKE_PROJECT_VERSION} -+ SOVERSION 1 -+ POSITION_INDEPENDENT_CODE ON) + SOVERSION ${PARTIO_VERSION_MAJOR}) target_include_directories(partio - PUBLIC diff --git a/graphics/partio/files/patch-src_tests_CMakeLists.txt b/graphics/partio/files/patch-src_tests_CMakeLists.txt new file mode 100644 index 000000000000..8d2bba3f4399 --- /dev/null +++ b/graphics/partio/files/patch-src_tests_CMakeLists.txt @@ -0,0 +1,17 @@ +--- src/tests/CMakeLists.txt.orig 2021-06-07 16:43:45 UTC ++++ src/tests/CMakeLists.txt +@@ -45,12 +45,12 @@ else() + ${item} ${PARTIO_LIBRARIES} ${GTEST_LIB} Threads::Threads) + target_compile_definitions(${item} PRIVATE -DPARTIO_DATA_DIR="${PROJECT_SOURCE_DIR}/src/data") + target_link_directories(${item} PRIVATE ${GTEST_LINK_PATH}) +- install(TARGETS ${item} DESTINATION ${CMAKE_INSTALL_PARTIO_TESTDIR}) + add_test(NAME ${item} COMMAND ${item}) ++ set_tests_properties(${item} PROPERTIES ENVIRONMENT ++ "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/lib") + endforeach(item) + + foreach(item testpartjson testpartio) + add_test(NAME ${item} COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/${item}.py) +- install(PROGRAMS ${item}.py DESTINATION ${CMAKE_INSTALL_PARTIO_TESTDIR} RENAME ${item}) + endforeach(item) + endif() diff --git a/graphics/partio/files/patch-src_tools_partedit.py b/graphics/partio/files/patch-src_tools_partedit.py new file mode 100644 index 000000000000..2e94e5fe088f --- /dev/null +++ b/graphics/partio/files/patch-src_tools_partedit.py @@ -0,0 +1,13 @@ +--- src/tools/partedit.py.orig 2021-10-18 09:08:43 UTC ++++ src/tools/partedit.py +@@ -72,9 +72,7 @@ def getAttrs(numAttributesFunc, attributeInfoFunc, sor + numAttr = numAttributesFunc() + + nameToIndex = {attributeInfoFunc(anum).name:anum for anum in range(numAttr)} +- names = nameToIndex.keys() +- if sort: +- names.sort() ++ names = sorted(nameToIndex) if sort else nameToIndex.keys() + + id_offset = 0 + for name in names: diff --git a/graphics/partio/pkg-plist b/graphics/partio/pkg-plist index ccae3990c53a..093600bc8d05 100644 --- a/graphics/partio/pkg-plist +++ b/graphics/partio/pkg-plist @@ -1,18 +1,18 @@ bin/partattr bin/partconvert bin/partinfo bin/partjson bin/partview include/Partio.h include/PartioAttribute.h include/PartioIterator.h include/PartioVec3.h lib/libpartio.so lib/libpartio.so.1 -lib/libpartio.so.1.14.0 +lib/libpartio.so.1.14.6 %%PYTHON_SITELIBDIR%%/_partio.so %%PYTHON_SITELIBDIR%%/partedit.py %%PYTHON_SITELIBDIR%%/partinspect.py %%PYTHON_SITELIBDIR%%/partio.py %%PYTHON_SITELIBDIR%%/partjson.py share/swig/partio.i