Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2023 11:41:49 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 224ec2aabb2b - main - =?utf-8?Q?science/py-gemmi:=20Update=200.5.8=20=E2=86=92=200.6.0?=
Message-ID:  <202303081141.328Bfnbm080980@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=224ec2aabb2bfa9e2c5d3ad4c594536ceb70b8f7

commit 224ec2aabb2bfa9e2c5d3ad4c594536ceb70b8f7
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-03-08 10:58:04 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-03-08 11:41:47 +0000

    science/py-gemmi: Update 0.5.8 → 0.6.0
    
    Reported by:    portscout
---
 science/py-gemmi/Makefile                   |  10 +-
 science/py-gemmi/distinfo                   |   6 +-
 science/py-gemmi/files/patch-CMakeLists.txt | 202 +++++++++++++++++++++++-----
 science/py-gemmi/pkg-plist                  |   6 +
 4 files changed, 186 insertions(+), 38 deletions(-)

diff --git a/science/py-gemmi/Makefile b/science/py-gemmi/Makefile
index 3c1a4fb91ca0..167af8a9ef98 100644
--- a/science/py-gemmi/Makefile
+++ b/science/py-gemmi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gemmi
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.5.8
+DISTVERSION=	0.6.0
 CATEGORIES=	science python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -12,17 +12,19 @@ LICENSE=	MPL20
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pybind11>0:devel/py-pybind11@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
 		pybind11>=2.6:devel/pybind11
+LIB_DEPENDS=	libgemmi_cpp.so:science/gemmi
 
-USES=		cmake compiler:c++17-lang python
+USES=		cmake compiler:c++20-lang localbase:ldflags python
 USE_PYTHON=	flavors
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	project-gemmi
 
 CMAKE_ON=	USE_PYTHON
-
-PLIST_FILES=	${PYTHON_SITELIBDIR}/gemmi${PYTHON_EXT_SUFFIX}.so
+CMAKE_ARGS=	-DPython_EXECUTABLE=${PYTHON_CMD}
 
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 TEST_WRKSRC=	${BUILD_WRKSRC}/tests
diff --git a/science/py-gemmi/distinfo b/science/py-gemmi/distinfo
index 4a694c3cbfd2..78fe3395fb96 100644
--- a/science/py-gemmi/distinfo
+++ b/science/py-gemmi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1671964416
-SHA256 (project-gemmi-gemmi-v0.5.8_GH0.tar.gz) = b67c8f79d85c4fd6766ce5b0418c79f4cb54a62d9091de6d0a7c20bb6060070e
-SIZE (project-gemmi-gemmi-v0.5.8_GH0.tar.gz) = 1695293
+TIMESTAMP = 1678255262
+SHA256 (project-gemmi-gemmi-v0.6.0_GH0.tar.gz) = 5f033dded4bf1f3d8fa88636d798aea70bfb2a2f0e209fd517b36d773f83588d
+SIZE (project-gemmi-gemmi-v0.6.0_GH0.tar.gz) = 1737083
diff --git a/science/py-gemmi/files/patch-CMakeLists.txt b/science/py-gemmi/files/patch-CMakeLists.txt
index 74cb0c82e534..aa925ae1bb93 100644
--- a/science/py-gemmi/files/patch-CMakeLists.txt
+++ b/science/py-gemmi/files/patch-CMakeLists.txt
@@ -1,46 +1,186 @@
---- CMakeLists.txt.orig	2022-09-21 17:17:09 UTC
+- workaround for https://github.com/project-gemmi/gemmi/issues/257
+
+--- CMakeLists.txt.orig	2023-03-06 11:12:31 UTC
 +++ CMakeLists.txt
-@@ -274,6 +274,7 @@ add_executable(gemmi-wcn EXCLUDE_FROM_ALL $<TARGET_OBJ
-                src/wcn.cpp $<TARGET_OBJECTS:input>)
- support_gz(gemmi-wcn)
- 
-+if (FALSE)
- add_executable(program
-                src/align.cpp src/blobs.cpp
-                src/cif2mtz.cpp src/cif2json.cpp src/contact.cpp
-@@ -290,15 +291,16 @@ add_executable(program
-                $<TARGET_OBJECTS:options>)
- support_gz(program)
- target_compile_definitions(program PRIVATE GEMMI_ALL_IN_ONE=1)
--set_target_properties(program PROPERTIES OUTPUT_NAME gemmi)
-+#set_target_properties(program PROPERTIES OUTPUT_NAME gemmi)
+@@ -182,21 +182,23 @@ if (GEMMI_VERSION_INFO)
+   target_compile_definitions(options PRIVATE GEMMI_VERSION_INFO=${GEMMI_VERSION_INFO})
+ endif()
+ 
+-add_library(gemmi_cpp
+-            src/crd.cpp src/mmcif.cpp src/mtz.cpp src/mtz2cif.cpp
+-            src/polyheur.cpp
+-            src/read_cif.cpp src/mmread_gz.cpp src/resinfo.cpp
+-            src/riding_h.cpp src/sprintf.cpp src/to_mmcif.cpp
+-            src/to_pdb.cpp src/monlib.cpp src/topo.cpp src/xds_ascii.cpp)
+-set_property(TARGET gemmi_cpp PROPERTY POSITION_INDEPENDENT_CODE ON)
++#add_library(gemmi_cpp
++#            src/crd.cpp src/mmcif.cpp src/mtz.cpp src/mtz2cif.cpp
++#            src/polyheur.cpp
++#            src/read_cif.cpp src/mmread_gz.cpp src/resinfo.cpp
++#            src/riding_h.cpp src/sprintf.cpp src/to_mmcif.cpp
++#            src/to_pdb.cpp src/monlib.cpp src/topo.cpp src/xds_ascii.cpp)
++#set_property(TARGET gemmi_cpp PROPERTY POSITION_INDEPENDENT_CODE ON)
+ #set_property(TARGET gemmi_cpp PROPERTY CXX_VISIBILITY_PRESET hidden)
+-target_compile_definitions(gemmi_cpp PRIVATE GEMMI_BUILD)
++#target_compile_definitions(gemmi_cpp PRIVATE GEMMI_BUILD)
+ if (BUILD_SHARED_LIBS)
+-  target_compile_definitions(gemmi_cpp PUBLIC GEMMI_SHARED)
++  #target_compile_definitions(gemmi_cpp PUBLIC GEMMI_SHARED)
+ endif()
+-support_gz(gemmi_cpp)
++#support_gz(gemmi_cpp)
+ 
++find_package(gemmi REQUIRED)
+ 
++
+ # Gemmi subcommands compiled as individual binaries.
+ # Not built by default and used mostly for testing.
+ function(add_single_prog target)
+@@ -204,7 +206,7 @@ function(add_single_prog target)
+   add_executable(gemmi-${target} EXCLUDE_FROM_ALL prog/${target}.cpp ${arg_ADD_SRC}
+                  $<TARGET_OBJECTS:options>)
+   if (NOT arg_NOLIB)
+-    target_link_libraries(gemmi-${target} PRIVATE gemmi_cpp)
++    #target_link_libraries(gemmi-${target} PRIVATE gemmi_cpp)
+   endif()
+   if (arg_GZ)
+     support_gz(gemmi-${target})
+@@ -243,29 +245,29 @@ add_single_prog(wcn)
+ add_single_prog(xds2mtz GZ)
+ 
+ # gemmi program with a number of subcommands
+-add_executable(gemmi_prog
+-               prog/align.cpp prog/blobs.cpp
+-               prog/cif2mtz.cpp prog/cif2json.cpp prog/contact.cpp
+-               prog/contents.cpp prog/convert.cpp prog/fprime.cpp
+-               prog/grep.cpp prog/h.cpp prog/json2cif.cpp
+-               prog/main.cpp prog/map.cpp prog/map2sf.cpp
+-               prog/mapcoef.cpp prog/mask.cpp
+-               prog/merge.cpp prog/mondiff.cpp prog/mtz.cpp prog/mtz2cif.cpp
+-               prog/prep.cpp prog/reindex.cpp prog/residues.cpp prog/rmsz.cpp
+-               prog/sf2map.cpp prog/sfcalc.cpp prog/sg.cpp prog/tags.cpp
+-               prog/validate.cpp prog/validate_mon.cpp prog/wcn.cpp
+-               prog/xds2mtz.cpp
+-               $<TARGET_OBJECTS:options>)
+-target_link_libraries(gemmi_prog PRIVATE gemmi_cpp)
+-support_gz(gemmi_prog)
+-target_compile_definitions(gemmi_prog PRIVATE GEMMI_ALL_IN_ONE=1)
+-set_property(TARGET gemmi_prog PROPERTY OUTPUT_NAME gemmi)
++#add_executable(gemmi_prog
++#               prog/align.cpp prog/blobs.cpp
++#               prog/cif2mtz.cpp prog/cif2json.cpp prog/contact.cpp
++#               prog/contents.cpp prog/convert.cpp prog/fprime.cpp
++#               prog/grep.cpp prog/h.cpp prog/json2cif.cpp
++#               prog/main.cpp prog/map.cpp prog/map2sf.cpp
++#               prog/mapcoef.cpp prog/mask.cpp
++#               prog/merge.cpp prog/mondiff.cpp prog/mtz.cpp prog/mtz2cif.cpp
++#               prog/prep.cpp prog/reindex.cpp prog/residues.cpp prog/rmsz.cpp
++#               prog/sf2map.cpp prog/sfcalc.cpp prog/sg.cpp prog/tags.cpp
++#               prog/validate.cpp prog/validate_mon.cpp prog/wcn.cpp
++#               prog/xds2mtz.cpp
++#               $<TARGET_OBJECTS:options>)
++#target_link_libraries(gemmi_prog PRIVATE gemmi_cpp)
++#support_gz(gemmi_prog)
++#target_compile_definitions(gemmi_prog PRIVATE GEMMI_ALL_IN_ONE=1)
++#set_property(TARGET gemmi_prog PROPERTY OUTPUT_NAME gemmi)
  if (WIN32 AND USE_WMAIN)
    # _UNICODE=1 is now set globally
--  #target_compile_definitions(program PRIVATE _UNICODE=1)
-+  target_compile_definitions(program PRIVATE _UNICODE=1)
+   #target_compile_definitions(gemmi_prog PRIVATE _UNICODE=1)
    if(MINGW)
      # target_link_options were added in cmake 3.13
-     set_target_properties(program PROPERTIES LINK_FLAGS "-municode")
+-    set_property(TARGET gemmi_prog PROPERTY LINK_FLAGS "-municode")
++    #set_property(TARGET gemmi_prog PROPERTY LINK_FLAGS "-municode")
    endif()
  endif()
-+endif()
  
- ### tests and examples ###
+@@ -284,10 +286,10 @@ add_executable(doc_example EXCLUDE_FROM_ALL
+                docs/code/cell.cpp src/resinfo.cpp)
+ add_executable(doc_example2 EXCLUDE_FROM_ALL docs/code/cif_cc.cpp)
+ add_executable(doc_maybegz EXCLUDE_FROM_ALL docs/code/maybegz.cpp docs/code/mutate.cpp)
+-target_link_libraries(doc_maybegz PRIVATE gemmi_cpp)
++target_link_libraries(doc_maybegz PRIVATE gemmi)
+ support_gz(doc_maybegz)
+ add_executable(doc_newmtz EXCLUDE_FROM_ALL docs/code/newmtz.cpp)
+-target_link_libraries(doc_newmtz PRIVATE gemmi_cpp)
++target_link_libraries(doc_newmtz PRIVATE gemmi)
+ support_gz(doc_newmtz)
  
-@@ -416,12 +418,12 @@ else()
-   message(STATUS "Skipping Python module. Add -D USE_PYTHON=1 to build it.")
+ # always compile these tests with assertions enabled
+@@ -296,7 +298,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU|Intel")
  endif()
  
--install(TARGETS program DESTINATION bin)
--install(DIRECTORY include/gemmi DESTINATION include)
-+#install(TARGETS program DESTINATION bin)
-+#install(DIRECTORY include/gemmi DESTINATION include)
- if (USE_PYTHON AND DEFINED PYTHON_INSTALL_DIR)
-   install(TARGETS py DESTINATION ${PYTHON_INSTALL_DIR})
--  install(DIRECTORY examples/ DESTINATION ${PYTHON_INSTALL_DIR}/gemmi-examples
+ add_executable(test_disulf EXCLUDE_FROM_ALL tests/disulf.cpp)
+-target_link_libraries(test_disulf PRIVATE gemmi_cpp)
++target_link_libraries(test_disulf PRIVATE gemmi)
+ support_gz(test_disulf)
+ 
+ # auth_label requires <experimental/filesystem> and -lstdc++fs
+@@ -307,7 +309,7 @@ endif()
+ support_gz(auth_label)
+ 
+ add_executable(check_conn EXCLUDE_FROM_ALL examples/check_conn.cpp)
+-target_link_libraries(check_conn PRIVATE gemmi_cpp)
++target_link_libraries(check_conn PRIVATE gemmi)
+ 
+ enable_testing()
+ 
+@@ -344,7 +346,7 @@ if (benchmark_FOUND)
+   foreach(b stoi elem mod niggli pdb resinfo round sym)
+     add_executable(${b}-bm EXCLUDE_FROM_ALL benchmarks/${b}.cpp)
+     if (b MATCHES "resinfo|pdb")
+-      target_link_libraries(${b}-bm PRIVATE gemmi_cpp)
++      target_link_libraries(${b}-bm PRIVATE gemmi)
+     endif()
+     target_link_libraries(${b}-bm PRIVATE benchmark::benchmark)
+     set_property(TARGET ${b}-bm PROPERTY RUNTIME_OUTPUT_DIRECTORY
+@@ -372,8 +374,8 @@ if (USE_PYTHON)
+           python/mtz.cpp python/read.cpp python/recgrid.cpp
+           python/scaling.cpp python/search.cpp
+           python/sf.cpp python/sym.cpp python/topo.cpp python/refine.cpp
+-          python/unitcell.cpp python/write.cpp
+-          $<TARGET_OBJECTS:gemmi_cpp>)
++          python/unitcell.cpp python/write.cpp)
++  target_link_libraries(gemmi_py PRIVATE gemmi::gemmi_cpp)
+   set_property(TARGET gemmi_py PROPERTY OUTPUT_NAME gemmi)
+   if(CMAKE_CXX_FLAGS MATCHES "-Wshadow")
+     target_compile_options(gemmi_py PRIVATE "-Wno-shadow")
+@@ -396,18 +398,18 @@ write_basic_package_version_file(gemmi-config-version.
+                                  COMPATIBILITY AnyNewerVersion)
+ 
+ # In CMake 3.23 we'll be able to use FILE_SET to install the headers
+-install(DIRECTORY include/gemmi DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++#install(DIRECTORY include/gemmi DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ 
+-install(TARGETS gemmi_prog gemmi_cpp
+-        EXPORT GemmiTargets
+-        INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++#install(TARGETS gemmi_prog gemmi_cpp
++#        EXPORT GemmiTargets
++#        INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ 
+-install(EXPORT GemmiTargets FILE gemmi-targets.cmake NAMESPACE gemmi::
+-        DESTINATION "${GEMMI_INSTALL_CMAKEDIR}")
+-install(FILES
+-        "${CMAKE_CURRENT_BINARY_DIR}/gemmi-config.cmake"
+-        "${CMAKE_CURRENT_BINARY_DIR}/gemmi-config-version.cmake"
+-        DESTINATION "${GEMMI_INSTALL_CMAKEDIR}")
++#install(EXPORT GemmiTargets FILE gemmi-targets.cmake NAMESPACE gemmi::
++#        DESTINATION "${GEMMI_INSTALL_CMAKEDIR}")
++#install(FILES
++#        "${CMAKE_CURRENT_BINARY_DIR}/gemmi-config.cmake"
++#        "${CMAKE_CURRENT_BINARY_DIR}/gemmi-config-version.cmake"
++#        DESTINATION "${GEMMI_INSTALL_CMAKEDIR}")
+ 
+ if (USE_PYTHON)
+   if (DEFINED PYTHON_INSTALL_DIR)
+@@ -421,8 +423,8 @@ if (USE_PYTHON)
+   # and don't respect CMAKE_INSTALL_PREFIX.
+   # https://discourse.cmake.org/t/findpython3-how-to-specify-local-installation-directory-for-python-module/3580/5
+   install(TARGETS gemmi_py DESTINATION "${Python_SITEARCH}")
+-  install(DIRECTORY examples/ DESTINATION "${Python_SITELIB}/gemmi-examples"
 -          FILES_MATCHING PATTERN "*.py")
-+  #install(DIRECTORY examples/ DESTINATION ${PYTHON_INSTALL_DIR}/gemmi-examples
++  #install(DIRECTORY examples/ DESTINATION "${Python_SITELIB}/gemmi-examples"
 +  #        FILES_MATCHING PATTERN "*.py")
    if (INSTALL_EGG_INFO)
      install(CODE
-      "execute_process(COMMAND \"${PYTHON_EXECUTABLE}\" setup.py install_egg_info --install-dir \"\$ENV{DESTDIR}${PYTHON_INSTALL_DIR}\"
+      "execute_process(COMMAND \"${Python_EXECUTABLE}\" setup.py install_egg_info --install-dir \"\$ENV{DESTDIR}${Python_SITELIB}\"
diff --git a/science/py-gemmi/pkg-plist b/science/py-gemmi/pkg-plist
new file mode 100644
index 000000000000..2ee4a839a8fb
--- /dev/null
+++ b/science/py-gemmi/pkg-plist
@@ -0,0 +1,6 @@
+%%PYTHON_SITELIBDIR%%/gemmi-0.6.0-py%%PYTHON_VER%%.egg-info/PKG-INFO
+%%PYTHON_SITELIBDIR%%/gemmi-0.6.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt
+%%PYTHON_SITELIBDIR%%/gemmi-0.6.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt
+%%PYTHON_SITELIBDIR%%/gemmi-0.6.0-py%%PYTHON_VER%%.egg-info/not-zip-safe
+%%PYTHON_SITELIBDIR%%/gemmi-0.6.0-py%%PYTHON_VER%%.egg-info/top_level.txt
+%%PYTHON_SITELIBDIR%%/gemmi%%PYTHON_EXT_SUFFIX%%.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303081141.328Bfnbm080980>