git: 555deadfa394 - main - science/{,py-}gemmi: update 0.6.4 → 0.6.5

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 18 Feb 2024 10:08:02 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=555deadfa394ed7671fc2630d230a37fe230c53c

commit 555deadfa394ed7671fc2630d230a37fe230c53c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-02-18 10:05:59 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-02-18 10:07:54 +0000

    science/{,py-}gemmi: update 0.6.4 → 0.6.5
    
    Reported by:    portscout
---
 science/gemmi/Makefile                      |   2 +-
 science/gemmi/distinfo                      |   6 +-
 science/gemmi/pkg-plist                     |   4 +-
 science/py-gemmi/Makefile                   |   6 +-
 science/py-gemmi/distinfo                   |   6 +-
 science/py-gemmi/files/patch-CMakeLists.txt | 135 +++++++++++++++++++++-------
 science/py-gemmi/pkg-plist                  |  24 +++++
 7 files changed, 137 insertions(+), 46 deletions(-)

diff --git a/science/gemmi/Makefile b/science/gemmi/Makefile
index 69f3716cd296..21e999fe3441 100644
--- a/science/gemmi/Makefile
+++ b/science/gemmi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gemmi
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.6.4
+DISTVERSION=	0.6.5
 CATEGORIES=	science # chemistry
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/science/gemmi/distinfo b/science/gemmi/distinfo
index ef65e0e89e1e..79f0c73aea79 100644
--- a/science/gemmi/distinfo
+++ b/science/gemmi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1702577537
-SHA256 (project-gemmi-gemmi-v0.6.4_GH0.tar.gz) = 507eea6ea112e2b142cc3dfa7de20c25e9f34c76ef77ef3caabfaf94d3657cb3
-SIZE (project-gemmi-gemmi-v0.6.4_GH0.tar.gz) = 1778062
+TIMESTAMP = 1708245101
+SHA256 (project-gemmi-gemmi-v0.6.5_GH0.tar.gz) = 9159506a16e0d22bbeeefc4d34137099318307db1b2bebf06fb2ae501571b19c
+SIZE (project-gemmi-gemmi-v0.6.5_GH0.tar.gz) = 1785842
diff --git a/science/gemmi/pkg-plist b/science/gemmi/pkg-plist
index 9341c877ea8e..758fba0338fc 100644
--- a/science/gemmi/pkg-plist
+++ b/science/gemmi/pkg-plist
@@ -38,6 +38,7 @@ include/gemmi/fstream.hpp
 include/gemmi/grid.hpp
 include/gemmi/gz.hpp
 include/gemmi/input.hpp
+include/gemmi/intensit.hpp
 include/gemmi/interop.hpp
 include/gemmi/it92.hpp
 include/gemmi/iterator.hpp
@@ -45,7 +46,6 @@ include/gemmi/json.hpp
 include/gemmi/levmar.hpp
 include/gemmi/linkhunt.hpp
 include/gemmi/math.hpp
-include/gemmi/merge.hpp
 include/gemmi/metadata.hpp
 include/gemmi/mmcif.hpp
 include/gemmi/mmcif_impl.hpp
@@ -78,6 +78,7 @@ include/gemmi/select.hpp
 include/gemmi/seqalign.hpp
 include/gemmi/seqid.hpp
 include/gemmi/seqtools.hpp
+include/gemmi/serialize.hpp
 include/gemmi/sfcalc.hpp
 include/gemmi/small.hpp
 include/gemmi/smcif.hpp
@@ -88,7 +89,6 @@ include/gemmi/stats.hpp
 include/gemmi/symmetry.hpp
 include/gemmi/third_party/fast_float.h
 include/gemmi/third_party/pocketfft_hdronly.h
-include/gemmi/third_party/sajson.h
 include/gemmi/third_party/tao/LICENSE
 include/gemmi/third_party/tao/NOTES
 include/gemmi/third_party/tao/pegtl.hpp
diff --git a/science/py-gemmi/Makefile b/science/py-gemmi/Makefile
index 8016c411bbb4..0a157ec2f5ed 100644
--- a/science/py-gemmi/Makefile
+++ b/science/py-gemmi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gemmi
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.6.4
+DISTVERSION=	0.6.5
 CATEGORIES=	science python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -25,7 +25,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	project-gemmi
 
 CMAKE_ON=	USE_PYTHON
-CMAKE_OFF=	BUILD_GEMMI_PROGRAM
+CMAKE_OFF=	BUILD_GEMMI_PROGRAM STANDALONE_PYTHON_MODULE
 CMAKE_ARGS=	-DPython_EXECUTABLE=${PYTHON_CMD}
 
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
@@ -33,7 +33,7 @@ TEST_WRKSRC=	${BUILD_WRKSRC}/tests
 
 PLIST_SUB=	VER=${PORTVERSION}
 
-do-test: # 1 test fails, see https://github.com/project-gemmi/gemmi/issues/291
+do-test:
 	@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest discover -v tests/
 
 .include <bsd.port.mk>
diff --git a/science/py-gemmi/distinfo b/science/py-gemmi/distinfo
index d58701d3138c..7d7f29781493 100644
--- a/science/py-gemmi/distinfo
+++ b/science/py-gemmi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1702578897
-SHA256 (project-gemmi-gemmi-v0.6.4_GH0.tar.gz) = 507eea6ea112e2b142cc3dfa7de20c25e9f34c76ef77ef3caabfaf94d3657cb3
-SIZE (project-gemmi-gemmi-v0.6.4_GH0.tar.gz) = 1778062
+TIMESTAMP = 1708246407
+SHA256 (project-gemmi-gemmi-v0.6.5_GH0.tar.gz) = 9159506a16e0d22bbeeefc4d34137099318307db1b2bebf06fb2ae501571b19c
+SIZE (project-gemmi-gemmi-v0.6.5_GH0.tar.gz) = 1785842
diff --git a/science/py-gemmi/files/patch-CMakeLists.txt b/science/py-gemmi/files/patch-CMakeLists.txt
index 187f8b297ce4..15c6e8d7f824 100644
--- a/science/py-gemmi/files/patch-CMakeLists.txt
+++ b/science/py-gemmi/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2023-12-13 10:39:37 UTC
+--- CMakeLists.txt.orig	2024-02-17 11:35:57 UTC
 +++ CMakeLists.txt
-@@ -6,7 +6,7 @@ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/gemm
+@@ -6,7 +6,7 @@ string(REGEX REPLACE ".+\"([0-9]+\.[0-9]+\.[0-9]+)(-de
  string(REGEX REPLACE ".+\"([0-9]+\.[0-9]+\.[0-9]+)(-dev)?\"" "\\1"
         gemmi_version_str ${gemmi_version_line})
  
@@ -9,7 +9,16 @@
  message(STATUS "Gemmi version ${PROJECT_VERSION}")
  
  include(GNUInstallDirs)  # for CMAKE_INSTALL_LIBDIR, etc
-@@ -176,37 +176,39 @@ endif()
+@@ -18,6 +18,8 @@ endif()
+   #set(CMAKE_INSTALL_BINDIR "${SKBUILD_SCRIPTS_DIR}")
+ endif()
+ 
++find_package(gemmi REQUIRED)
++
+ option(BUILD_SHARED_LIBS "Build shared library" ON)
+ option(BUILD_GEMMI_PROGRAM "Build gemmi command-line program" ON)
+ option(INSTALL_DEV_FILES "Install C++ headers, cmake configs, static lib" ON)
+@@ -192,67 +194,67 @@ endif()
  #  target_link_libraries(fgemmi PRIVATE cgemmi)
  #endif()
  
@@ -30,7 +39,7 @@
  
 -add_library(gemmi_cpp
 -            src/align.cpp src/assembly.cpp src/calculate.cpp src/crd.cpp
--            src/ddl.cpp src/eig3.cpp
+-            src/ddl.cpp src/eig3.cpp src/gz.cpp src/intensit.cpp src/json.cpp
 -            src/mmcif.cpp src/mmread_gz.cpp src/mtz.cpp src/mtz2cif.cpp
 -            src/polyheur.cpp src/read_cif.cpp src/resinfo.cpp
 -            src/riding_h.cpp src/sprintf.cpp src/to_mmcif.cpp
@@ -39,7 +48,7 @@
 -set_property(TARGET gemmi_cpp PROPERTY POSITION_INDEPENDENT_CODE ON)
 +#add_library(gemmi_cpp
 +#            src/align.cpp src/assembly.cpp src/calculate.cpp src/crd.cpp
-+#            src/ddl.cpp src/eig3.cpp
++#            src/ddl.cpp src/eig3.cpp src/gz.cpp src/intensit.cpp src/json.cpp
 +#            src/mmcif.cpp src/mmread_gz.cpp src/mtz.cpp src/mtz2cif.cpp
 +#            src/polyheur.cpp src/read_cif.cpp src/resinfo.cpp
 +#            src/riding_h.cpp src/sprintf.cpp src/to_mmcif.cpp
@@ -56,15 +65,71 @@
 -  target_compile_definitions(gemmi_cpp PUBLIC GEMMI_SHARED)
 -endif()
 -target_link_libraries(gemmi_cpp PUBLIC gemmi_headers)
--support_gz(gemmi_cpp)
 +#if (BUILD_SHARED_LIBS)
 +#  target_compile_definitions(gemmi_cpp PUBLIC GEMMI_SHARED)
 +#endif()
 +#target_link_libraries(gemmi_cpp PUBLIC gemmi_headers)
-+#support_gz(gemmi_cpp)
  
-+find_package(gemmi REQUIRED)
-+
+-if (FETCH_ZLIB_NG)
+-  target_compile_definitions(gemmi_cpp PRIVATE USE_ZLIB_NG=1)
+-  target_link_libraries(gemmi_cpp PRIVATE zlib)
+-elseif (ZLIB_NG_FOUND)
+-  target_compile_definitions(gemmi_cpp PRIVATE USE_ZLIB_NG=1)
+-  target_link_libraries(gemmi_cpp PRIVATE ZLIB_NG::ZLIB_NG)
+-elseif (ZLIB_FOUND)
+-  target_link_libraries(gemmi_cpp PRIVATE ZLIB::ZLIB)
+-else()
+-  target_sources(gemmi_cpp PRIVATE
+-      "third_party/zlib/adler32.c"
+-      "third_party/zlib/crc32.c"
+-      "third_party/zlib/gzlib.c"
+-      "third_party/zlib/gzread.c"
+-      "third_party/zlib/inflate.c"
+-      "third_party/zlib/inftrees.c"
+-      "third_party/zlib/inffast.c"
+-      "third_party/zlib/zutil.c")
+-  check_include_file(unistd.h has_unistd_h)
+-  target_compile_definitions(gemmi_cpp PRIVATE NO_GZCOMPRESS=1 DYNAMIC_CRC_TABLE=1)
+-  if (has_unistd_h)
+-    target_compile_definitions(gemmi_cpp PRIVATE Z_HAVE_UNISTD_H=1)
+-  endif()
+-  target_include_directories(gemmi_cpp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib")
+-  if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+-    # /wd4267 - conversion from 'size_t' to 'unsigned int', possible loss of data
+-    target_compile_options(gemmi_cpp PRIVATE /wd4267)
+-  endif()
+-endif()
++#if (FETCH_ZLIB_NG)
++#  target_compile_definitions(gemmi_cpp PRIVATE USE_ZLIB_NG=1)
++#  target_link_libraries(gemmi_cpp PRIVATE zlib)
++#elseif (ZLIB_NG_FOUND)
++#  target_compile_definitions(gemmi_cpp PRIVATE USE_ZLIB_NG=1)
++#  target_link_libraries(gemmi_cpp PRIVATE ZLIB_NG::ZLIB_NG)
++#elseif (ZLIB_FOUND)
++#  target_link_libraries(gemmi_cpp PRIVATE ZLIB::ZLIB)
++#else()
++#  target_sources(gemmi_cpp PRIVATE
++#      "third_party/zlib/adler32.c"
++#      "third_party/zlib/crc32.c"
++#      "third_party/zlib/gzlib.c"
++#      "third_party/zlib/gzread.c"
++#      "third_party/zlib/inflate.c"
++#      "third_party/zlib/inftrees.c"
++#      "third_party/zlib/inffast.c"
++#      "third_party/zlib/zutil.c")
++#  check_include_file(unistd.h has_unistd_h)
++#  target_compile_definitions(gemmi PRIVATE NO_GZCOMPRESS=1 DYNAMIC_CRC_TABLE=1)
++#  if (has_unistd_h)
++#    target_compile_definitions(gemmi PRIVATE Z_HAVE_UNISTD_H=1)
++#  endif()
++#  target_include_directories(gemmi PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib")
++#  if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
++#    # /wd4267 - conversion from 'size_t' to 'unsigned int', possible loss of data
++#    target_compile_options(gemmi PRIVATE /wd4267)
++#  endif()
++#endif()
+ 
+ 
  ### programs from prog/ ###
  
  add_library(options OBJECT prog/options.cpp)
@@ -73,8 +138,8 @@
  target_include_directories(options PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
  if (GEMMI_VERSION_INFO)
    target_compile_definitions(options PRIVATE GEMMI_VERSION_INFO=${GEMMI_VERSION_INFO})
-@@ -218,11 +220,11 @@ function(add_single_prog target)
-   cmake_parse_arguments(arg "NOLIB;GZ" "ADD_SRC" "" ${ARGN})
+@@ -264,11 +266,11 @@ function(add_single_prog target)
+   cmake_parse_arguments(arg "NOLIB" "ADD_SRC" "" ${ARGN})
    add_executable(gemmi-${target} EXCLUDE_FROM_ALL prog/${target}.cpp ${arg_ADD_SRC}
                   $<TARGET_OBJECTS:options>)
 -  if (arg_NOLIB)
@@ -85,44 +150,43 @@
 +  #if (arg_NOLIB)
 +  #  target_link_libraries(gemmi-${target} PRIVATE gemmi_headers)
 +  #else()
-+  #  target_link_libraries(gemmi-${target} PRIVATE gemmi_cpp)
++  #  target_link_libraries(gemmi-${target} PRIVATE gemmi)
 +  #endif()
    target_include_directories(gemmi-${target} PRIVATE
                               "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
-   if (arg_GZ)
-@@ -279,7 +281,7 @@ add_executable(gemmi_prog
+ endfunction()
+@@ -322,7 +324,7 @@ add_executable(gemmi::prog ALIAS gemmi_prog)
                 prog/xds2mtz.cpp
                 $<TARGET_OBJECTS:options>)
  add_executable(gemmi::prog ALIAS gemmi_prog)
 -target_link_libraries(gemmi_prog PRIVATE gemmi_cpp)
-+target_link_libraries(gemmi_prog PRIVATE gemmi)
- support_gz(gemmi_prog)
++target_link_libraries(gemmi_prog PRIVATE gemmi::gemmi_cpp)
  target_include_directories(gemmi_prog PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
  target_compile_definitions(gemmi_prog PRIVATE GEMMI_ALL_IN_ONE=1)
-@@ -324,10 +326,10 @@ target_link_libraries(doc_example PRIVATE gemmi_header
+ set_target_properties(gemmi_prog PROPERTIES OUTPUT_NAME gemmi EXPORT_NAME prog)
+@@ -374,9 +376,9 @@ add_executable(doc_maybegz EXCLUDE_FROM_ALL docs/code/
  add_executable(doc_example2 EXCLUDE_FROM_ALL docs/code/cif_cc.cpp)
  target_link_libraries(doc_example2 PRIVATE gemmi_headers)
  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)
  
  # always compile these tests with assertions enabled
-@@ -336,7 +338,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU|Intel")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU|Intel")
+@@ -384,14 +386,14 @@ add_executable(test_disulf EXCLUDE_FROM_ALL tests/disu
  endif()
  
  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
-@@ -348,7 +350,7 @@ endif()
- support_gz(auth_label)
+ add_executable(auth_label EXCLUDE_FROM_ALL examples/auth_label.cpp)
+-target_link_libraries(auth_label PRIVATE gemmi_cpp)
++target_link_libraries(auth_label PRIVATE gemmi)
  
  add_executable(check_conn EXCLUDE_FROM_ALL examples/check_conn.cpp)
 -target_link_libraries(check_conn PRIVATE gemmi_cpp)
@@ -130,7 +194,7 @@
  
  enable_testing()
  
-@@ -385,7 +387,7 @@ if (benchmark_FOUND)
+@@ -428,7 +430,7 @@ if (benchmark_FOUND)
    foreach(b stoi elem mod niggli pdb resinfo round sym writecif)
      add_executable(${b}-bm EXCLUDE_FROM_ALL benchmarks/${b}.cpp)
      if (b MATCHES "resinfo|pdb|writecif")
@@ -139,19 +203,22 @@
      endif()
      target_link_libraries(${b}-bm PRIVATE gemmi_headers benchmark::benchmark)
      set_property(TARGET ${b}-bm PROPERTY RUNTIME_OUTPUT_DIRECTORY
-@@ -421,9 +423,8 @@ if (USE_PYTHON)
-           python/mtz.cpp python/read.cpp python/recgrid.cpp
-           python/scaling.cpp python/search.cpp
+@@ -466,11 +468,11 @@ if (USE_PYTHON)
            python/sf.cpp python/sym.cpp python/topo.cpp
--          python/unitcell.cpp python/write.cpp
--          $<TARGET_OBJECTS:gemmi_cpp>)
--  target_link_libraries(gemmi_py PRIVATE gemmi_headers)
-+          python/unitcell.cpp python/write.cpp)
-+  target_link_libraries(gemmi_py PRIVATE gemmi::gemmi_cpp)
+           python/unitcell.cpp python/write.cpp)
+   if (STANDALONE_PYTHON_MODULE)
+-    target_sources(gemmi_py PRIVATE $<TARGET_OBJECTS:gemmi_cpp>)
+-    get_target_property(_gemmi_cpp_libs gemmi_cpp LINK_LIBRARIES)
++    target_sources(gemmi_py PRIVATE gemmi::gemmi_cpp)
++    get_target_property(_gemmi_cpp_libs gemmi::gemmi_cpp LINK_LIBRARIES)
+     set_property(TARGET gemmi_py APPEND PROPERTY LINK_LIBRARIES ${_gemmi_cpp_libs})
+   else()
+-    target_link_libraries(gemmi_py PRIVATE gemmi_cpp)
++    target_link_libraries(gemmi_py PRIVATE gemmi::gemmi_cpp)
+   endif()
    set_property(TARGET gemmi_py PROPERTY OUTPUT_NAME gemmi)
    if(CMAKE_CXX_FLAGS MATCHES "-Wshadow")
-     target_compile_options(gemmi_py PRIVATE "-Wno-shadow")
-@@ -450,19 +451,19 @@ if (BUILD_GEMMI_PROGRAM)
+@@ -518,19 +520,19 @@ endif()
    install(TARGETS gemmi_prog EXPORT GemmiTargets)
  endif()
  
diff --git a/science/py-gemmi/pkg-plist b/science/py-gemmi/pkg-plist
index 59aab86c27c8..9a35f7adf261 100644
--- a/science/py-gemmi/pkg-plist
+++ b/science/py-gemmi/pkg-plist
@@ -1 +1,25 @@
 %%PYTHON_SITELIBDIR%%/gemmi%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/gemmi/examples/aafreq.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/ccd_gi.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/ccd_subgraph.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/cif_i_sigi.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/col_order.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/from_json.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/hello.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/long_geom.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/map2mtz.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/maskcheck.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/maskdiff.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/matthews.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/merge_mtz_mmcif.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/monomers.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/mtrix_iso.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/mtz_i_sigi.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/multiproc.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/patterson_slice.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/rama_gather.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/rama_plot.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/refln-stats.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/simple_search.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/sub_ccd.py
+%%PYTHON_SITELIBDIR%%/gemmi/examples/weight.py