From nobody Mon Oct 18 17:28:13 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DBB5E17F4582; Mon, 18 Oct 2021 17:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY3k55pphz3FR4; Mon, 18 Oct 2021 17:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A72EB24663; Mon, 18 Oct 2021 17:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IHSD3V033096; Mon, 18 Oct 2021 17:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IHSDcT033095; Mon, 18 Oct 2021 17:28:13 GMT (envelope-from git) Date: Mon, 18 Oct 2021 17:28:13 GMT Message-Id: <202110181728.19IHSDcT033095@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: c88b531512eb - main - graphics/partio: update the port to version 1.14.6 and enable tests List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c88b531512eb927570ed8a701dd2a749c719297f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=c88b531512eb927570ed8a701dd2a749c719297f commit c88b531512eb927570ed8a701dd2a749c719297f Author: Alexey Dokuchaev AuthorDate: 2021-10-18 17:25:32 +0000 Commit: Alexey Dokuchaev CommitDate: 2021-10-18 17:25:31 +0000 graphics/partio: update the port to version 1.14.6 and enable tests Three out of twelve test currently fail, two of them because they import port's own Python bits which are not yet installed, and there is no trick like LD_LIBRARY_PATH for C tests to the rescue. Reported by: portscout --- graphics/partio/Makefile | 29 +++++++++++----------- graphics/partio/distinfo | 6 ++--- graphics/partio/files/patch-src_lib_CMakeLists.txt | 17 +++++-------- .../partio/files/patch-src_tests_CMakeLists.txt | 17 +++++++++++++ graphics/partio/files/patch-src_tools_partedit.py | 13 ++++++++++ graphics/partio/pkg-plist | 2 +- 6 files changed, 55 insertions(+), 29 deletions(-) diff --git a/graphics/partio/Makefile b/graphics/partio/Makefile index 0e471dcd52e5..5fdacd155f50 100644 --- a/graphics/partio/Makefile +++ b/graphics/partio/Makefile @@ -1,7 +1,6 @@ PORTNAME= partio -PORTVERSION= 1.14.0 +PORTVERSION= 1.14.6 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= graphics math MAINTAINER= danfe@FreeBSD.org @@ -25,8 +24,8 @@ 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 @@ -37,26 +36,25 @@ 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} @@ -68,4 +66,7 @@ post-install-EXAMPLES-on: 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 @@ -9,7 +9,7 @@ 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