diff --git a/science/gemmi/Makefile b/science/gemmi/Makefile index 69f3716cd296..21e999fe3441 100644 --- a/science/gemmi/Makefile +++ b/science/gemmi/Makefile @@ -1,28 +1,28 @@ PORTNAME= gemmi DISTVERSIONPREFIX= v -DISTVERSION= 0.6.4 +DISTVERSION= 0.6.5 CATEGORIES= science # chemistry MAINTAINER= yuri@FreeBSD.org COMMENT= Macromolecular crystallography library and utilities WWW= https://gemmi.readthedocs.io/en/latest/ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt USES= cmake:testing compiler:c++20-lang # tests don't run, see https://github.com/project-gemmi/gemmi/issues/231 USE_GITHUB= yes GH_ACCOUNT= project-gemmi CMAKE_ON= BUILD_SHARED_LIBS CMAKE_ARGS= -DCMAKE_CXX_VISIBILITY_PRESET=default # for the Python extension science/py-gemmi to see all symbols CMAKE_TESTING_TARGET= check OPTIONS_DEFINE= FORTRAN FORTRAN_USES= fortran FORTRAN_CMAKE_BOOL= USE_FORTRAN FORTRAN_BROKEN= project option doesn't do anything, see https://github.com/project-gemmi/gemmi/issues/232 .include 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 @@ -1,240 +1,240 @@ bin/gemmi include/gemmi/addends.hpp include/gemmi/align.hpp include/gemmi/assembly.hpp include/gemmi/asudata.hpp include/gemmi/asumask.hpp include/gemmi/atof.hpp include/gemmi/atox.hpp include/gemmi/bessel.hpp include/gemmi/binner.hpp include/gemmi/blob.hpp include/gemmi/bond_idx.hpp include/gemmi/c4322.hpp include/gemmi/calculate.hpp include/gemmi/ccp4.hpp include/gemmi/cellred.hpp include/gemmi/chemcomp.hpp include/gemmi/chemcomp_xyz.hpp include/gemmi/cif.hpp include/gemmi/cif2mtz.hpp include/gemmi/cifdoc.hpp include/gemmi/contact.hpp include/gemmi/crd.hpp include/gemmi/ddl.hpp include/gemmi/dencalc.hpp include/gemmi/dirwalk.hpp include/gemmi/ecalc.hpp include/gemmi/eig3.hpp include/gemmi/elem.hpp include/gemmi/enumstr.hpp include/gemmi/fail.hpp include/gemmi/fileutil.hpp include/gemmi/floodfill.hpp include/gemmi/formfact.hpp include/gemmi/fourier.hpp include/gemmi/fprime.hpp 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 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 include/gemmi/mmdb.hpp include/gemmi/mmread.hpp include/gemmi/mmread_gz.hpp include/gemmi/model.hpp include/gemmi/modify.hpp include/gemmi/monlib.hpp include/gemmi/mtz.hpp include/gemmi/mtz2cif.hpp include/gemmi/neighbor.hpp include/gemmi/neutron92.hpp include/gemmi/numb.hpp include/gemmi/pdb.hpp include/gemmi/pdb_id.hpp include/gemmi/pirfasta.hpp include/gemmi/polyheur.hpp include/gemmi/qcp.hpp include/gemmi/read_cif.hpp include/gemmi/read_map.hpp include/gemmi/recgrid.hpp include/gemmi/reciproc.hpp include/gemmi/refln.hpp include/gemmi/remarks.hpp include/gemmi/resinfo.hpp include/gemmi/riding_h.hpp include/gemmi/scaling.hpp 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 include/gemmi/solmask.hpp include/gemmi/span.hpp include/gemmi/sprintf.hpp 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 include/gemmi/third_party/tao/pegtl/analysis/analyze_cycles.hpp include/gemmi/third_party/tao/pegtl/analysis/counted.hpp include/gemmi/third_party/tao/pegtl/analysis/generic.hpp include/gemmi/third_party/tao/pegtl/analysis/grammar_info.hpp include/gemmi/third_party/tao/pegtl/analysis/insert_guard.hpp include/gemmi/third_party/tao/pegtl/analysis/insert_rules.hpp include/gemmi/third_party/tao/pegtl/analysis/rule_info.hpp include/gemmi/third_party/tao/pegtl/analysis/rule_type.hpp include/gemmi/third_party/tao/pegtl/analyze.hpp include/gemmi/third_party/tao/pegtl/apply_mode.hpp include/gemmi/third_party/tao/pegtl/argv_input.hpp include/gemmi/third_party/tao/pegtl/ascii.hpp include/gemmi/third_party/tao/pegtl/buffer_input.hpp include/gemmi/third_party/tao/pegtl/config.hpp include/gemmi/third_party/tao/pegtl/cstream_input.hpp include/gemmi/third_party/tao/pegtl/eol.hpp include/gemmi/third_party/tao/pegtl/eol_pair.hpp include/gemmi/third_party/tao/pegtl/file_input.hpp include/gemmi/third_party/tao/pegtl/input_error.hpp include/gemmi/third_party/tao/pegtl/internal/action.hpp include/gemmi/third_party/tao/pegtl/internal/action_input.hpp include/gemmi/third_party/tao/pegtl/internal/alnum.hpp include/gemmi/third_party/tao/pegtl/internal/alpha.hpp include/gemmi/third_party/tao/pegtl/internal/any.hpp include/gemmi/third_party/tao/pegtl/internal/apply.hpp include/gemmi/third_party/tao/pegtl/internal/apply0.hpp include/gemmi/third_party/tao/pegtl/internal/apply0_single.hpp include/gemmi/third_party/tao/pegtl/internal/apply_single.hpp include/gemmi/third_party/tao/pegtl/internal/at.hpp include/gemmi/third_party/tao/pegtl/internal/bof.hpp include/gemmi/third_party/tao/pegtl/internal/bol.hpp include/gemmi/third_party/tao/pegtl/internal/bump_help.hpp include/gemmi/third_party/tao/pegtl/internal/bump_impl.hpp include/gemmi/third_party/tao/pegtl/internal/bytes.hpp include/gemmi/third_party/tao/pegtl/internal/control.hpp include/gemmi/third_party/tao/pegtl/internal/cr_crlf_eol.hpp include/gemmi/third_party/tao/pegtl/internal/cr_eol.hpp include/gemmi/third_party/tao/pegtl/internal/crlf_eol.hpp include/gemmi/third_party/tao/pegtl/internal/cstream_reader.hpp include/gemmi/third_party/tao/pegtl/internal/cstring_reader.hpp include/gemmi/third_party/tao/pegtl/internal/demangle.hpp include/gemmi/third_party/tao/pegtl/internal/demangle_cxxabi.hpp include/gemmi/third_party/tao/pegtl/internal/demangle_nop.hpp include/gemmi/third_party/tao/pegtl/internal/demangle_sanitise.hpp include/gemmi/third_party/tao/pegtl/internal/disable.hpp include/gemmi/third_party/tao/pegtl/internal/discard.hpp include/gemmi/third_party/tao/pegtl/internal/dusel_mode.hpp include/gemmi/third_party/tao/pegtl/internal/duseltronik.hpp include/gemmi/third_party/tao/pegtl/internal/enable.hpp include/gemmi/third_party/tao/pegtl/internal/endian.hpp include/gemmi/third_party/tao/pegtl/internal/endian_gcc.hpp include/gemmi/third_party/tao/pegtl/internal/endian_win.hpp include/gemmi/third_party/tao/pegtl/internal/eof.hpp include/gemmi/third_party/tao/pegtl/internal/eol.hpp include/gemmi/third_party/tao/pegtl/internal/eolf.hpp include/gemmi/third_party/tao/pegtl/internal/file_mapper.hpp include/gemmi/third_party/tao/pegtl/internal/file_opener.hpp include/gemmi/third_party/tao/pegtl/internal/file_reader.hpp include/gemmi/third_party/tao/pegtl/internal/has_apply.hpp include/gemmi/third_party/tao/pegtl/internal/has_apply0.hpp include/gemmi/third_party/tao/pegtl/internal/identifier.hpp include/gemmi/third_party/tao/pegtl/internal/if_apply.hpp include/gemmi/third_party/tao/pegtl/internal/if_must.hpp include/gemmi/third_party/tao/pegtl/internal/if_must_else.hpp include/gemmi/third_party/tao/pegtl/internal/if_then_else.hpp include/gemmi/third_party/tao/pegtl/internal/input_pair.hpp include/gemmi/third_party/tao/pegtl/internal/integer_sequence.hpp include/gemmi/third_party/tao/pegtl/internal/istream_reader.hpp include/gemmi/third_party/tao/pegtl/internal/istring.hpp include/gemmi/third_party/tao/pegtl/internal/iterator.hpp include/gemmi/third_party/tao/pegtl/internal/lf_crlf_eol.hpp include/gemmi/third_party/tao/pegtl/internal/lf_eol.hpp include/gemmi/third_party/tao/pegtl/internal/list.hpp include/gemmi/third_party/tao/pegtl/internal/list_must.hpp include/gemmi/third_party/tao/pegtl/internal/list_tail.hpp include/gemmi/third_party/tao/pegtl/internal/list_tail_pad.hpp include/gemmi/third_party/tao/pegtl/internal/marker.hpp include/gemmi/third_party/tao/pegtl/internal/minus.hpp include/gemmi/third_party/tao/pegtl/internal/must.hpp include/gemmi/third_party/tao/pegtl/internal/not_at.hpp include/gemmi/third_party/tao/pegtl/internal/one.hpp include/gemmi/third_party/tao/pegtl/internal/opt.hpp include/gemmi/third_party/tao/pegtl/internal/pad.hpp include/gemmi/third_party/tao/pegtl/internal/pad_opt.hpp include/gemmi/third_party/tao/pegtl/internal/peek_char.hpp include/gemmi/third_party/tao/pegtl/internal/peek_utf16.hpp include/gemmi/third_party/tao/pegtl/internal/peek_utf32.hpp include/gemmi/third_party/tao/pegtl/internal/peek_utf8.hpp include/gemmi/third_party/tao/pegtl/internal/pegtl_string.hpp include/gemmi/third_party/tao/pegtl/internal/plus.hpp include/gemmi/third_party/tao/pegtl/internal/raise.hpp include/gemmi/third_party/tao/pegtl/internal/range.hpp include/gemmi/third_party/tao/pegtl/internal/ranges.hpp include/gemmi/third_party/tao/pegtl/internal/rep.hpp include/gemmi/third_party/tao/pegtl/internal/rep_min.hpp include/gemmi/third_party/tao/pegtl/internal/rep_min_max.hpp include/gemmi/third_party/tao/pegtl/internal/rep_opt.hpp include/gemmi/third_party/tao/pegtl/internal/require.hpp include/gemmi/third_party/tao/pegtl/internal/result_on_found.hpp include/gemmi/third_party/tao/pegtl/internal/rule_conjunction.hpp include/gemmi/third_party/tao/pegtl/internal/rules.hpp include/gemmi/third_party/tao/pegtl/internal/seq.hpp include/gemmi/third_party/tao/pegtl/internal/skip_control.hpp include/gemmi/third_party/tao/pegtl/internal/sor.hpp include/gemmi/third_party/tao/pegtl/internal/star.hpp include/gemmi/third_party/tao/pegtl/internal/star_must.hpp include/gemmi/third_party/tao/pegtl/internal/state.hpp include/gemmi/third_party/tao/pegtl/internal/string.hpp include/gemmi/third_party/tao/pegtl/internal/trivial.hpp include/gemmi/third_party/tao/pegtl/internal/try_catch_type.hpp include/gemmi/third_party/tao/pegtl/internal/until.hpp include/gemmi/third_party/tao/pegtl/istream_input.hpp include/gemmi/third_party/tao/pegtl/memory_input.hpp include/gemmi/third_party/tao/pegtl/mmap_input.hpp include/gemmi/third_party/tao/pegtl/normal.hpp include/gemmi/third_party/tao/pegtl/nothing.hpp include/gemmi/third_party/tao/pegtl/parse.hpp include/gemmi/third_party/tao/pegtl/parse_error.hpp include/gemmi/third_party/tao/pegtl/position.hpp include/gemmi/third_party/tao/pegtl/read_input.hpp include/gemmi/third_party/tao/pegtl/rewind_mode.hpp include/gemmi/third_party/tao/pegtl/rules.hpp include/gemmi/third_party/tao/pegtl/string_input.hpp include/gemmi/third_party/tao/pegtl/tracking_mode.hpp include/gemmi/third_party/tao/pegtl/utf16.hpp include/gemmi/third_party/tao/pegtl/utf32.hpp include/gemmi/third_party/tao/pegtl/utf8.hpp include/gemmi/third_party/tao/pegtl/version.hpp include/gemmi/third_party/tinydir.h include/gemmi/to_chemcomp.hpp include/gemmi/to_cif.hpp include/gemmi/to_json.hpp include/gemmi/to_mmcif.hpp include/gemmi/to_pdb.hpp include/gemmi/topo.hpp include/gemmi/twin.hpp include/gemmi/unitcell.hpp include/gemmi/utf.hpp include/gemmi/util.hpp include/gemmi/version.hpp include/gemmi/xds_ascii.hpp lib/cmake/gemmi/gemmi-config-version.cmake lib/cmake/gemmi/gemmi-config.cmake lib/cmake/gemmi/gemmi-targets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/gemmi/gemmi-targets.cmake lib/libgemmi_cpp.so 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,39 +1,39 @@ PORTNAME= gemmi DISTVERSIONPREFIX= v -DISTVERSION= 0.6.4 +DISTVERSION= 0.6.5 CATEGORIES= science python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Macromolecular crystallography library and utilities WWW= https://gemmi.readthedocs.io/en/latest/ 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 TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}biopython>0:biology/py-biopython@${PY_FLAVOR} USES= cmake compiler:c++20-lang localbase:ldflags python USE_PYTHON= flavors 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} 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 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,185 +1,252 @@ ---- 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}) -project(gemmi LANGUAGES C CXX VERSION ${gemmi_version_str}) +project(gemmi_python LANGUAGES C CXX VERSION ${gemmi_version_str}) 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() -add_library(gemmi_headers INTERFACE) -add_library(gemmi::headers ALIAS gemmi_headers) -target_include_directories(gemmi_headers INTERFACE - "$" - "$") -target_compile_features(gemmi_headers INTERFACE cxx_std_11) -set_target_properties(gemmi_headers PROPERTIES EXPORT_NAME headers) +#add_library(gemmi_headers INTERFACE) +#add_library(gemmi::headers ALIAS gemmi_headers) +#target_include_directories(gemmi_headers INTERFACE +# "$" +# "$") +#target_compile_features(gemmi_headers INTERFACE cxx_std_11) +#set_target_properties(gemmi_headers PROPERTIES EXPORT_NAME headers) -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 - src/to_pdb.cpp src/monlib.cpp src/topo.cpp src/xds_ascii.cpp) -add_library(gemmi::gemmi_cpp ALIAS gemmi_cpp) -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 +# src/to_pdb.cpp src/monlib.cpp src/topo.cpp src/xds_ascii.cpp) +#add_library(gemmi::gemmi_cpp ALIAS gemmi_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_include_directories(gemmi_cpp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/third_party") +#target_compile_definitions(gemmi_cpp PRIVATE GEMMI_BUILD) +#target_include_directories(gemmi_cpp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/third_party") -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) +#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) -target_link_libraries(options PUBLIC gemmi_headers) +#target_link_libraries(options PUBLIC gemmi_headers) 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} $) - if (arg_NOLIB) - target_link_libraries(gemmi-${target} PRIVATE gemmi_headers) - else() - target_link_libraries(gemmi-${target} PRIVATE gemmi_cpp) - endif() + #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 $) 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 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) +target_link_libraries(check_conn PRIVATE gemmi) 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") - target_link_libraries(${b}-bm PRIVATE gemmi_cpp) + target_link_libraries(${b}-bm PRIVATE gemmi) 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_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 $) +- 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() -if (INSTALL_DEV_FILES) +#if (INSTALL_DEV_FILES) # 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(TARGETS gemmi_headers gemmi_cpp EXPORT GemmiTargets) - 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}") -elseif (BUILD_SHARED_LIBS AND BUILD_GEMMI_PROGRAM) - install(TARGETS gemmi_cpp) -endif() + #install(DIRECTORY include/gemmi DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + #install(TARGETS gemmi_headers gemmi_cpp EXPORT GemmiTargets) + #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}") +#elseif (BUILD_SHARED_LIBS AND BUILD_GEMMI_PROGRAM) +# install(TARGETS gemmi_cpp) +#endif() if (USE_PYTHON) if (DEFINED PYTHON_INSTALL_DIR) 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