Files

107 lines
4.2 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup boost 1.0
PortGroup cmake 1.1
PortGroup github 1.0
PortGroup legacysupport 1.1
PortGroup conflicts_build 1.0
github.setup rdkit rdkit 2026_03_3 Release_
github.tarball_from archive
version [join [split ${github.version} _] .]
revision 0
categories science chemistry
license BSD
maintainers {reneeotten @reneeotten} openmaintainer
description RDKit: Open-Source Cheminformatics Software
long_description RDKit is a collection of cheminformatics and \
machine-learning software written in C++ and Python.
homepage https://www.rdkit.org/
checksums rmd160 29b68bf8edc38bbb3c716ef618bf2fde0015c884 \
sha256 21e22e5e6b3a313527256fbde41c757f22d834b19caf2908e3c2dd11061e1fea \
size 83261886
# some of the vendored dependencies in the "External" directory fail to build
# when the "boost" port is installed; likely because they pick up libraries in ${prefix}/lib
# instead of the intended ones in ${prefix}/libexec/boost/${boost.version}
conflicts_build boost
boost.version 1.88
boost.require_numpy yes
# error: '~path' is unavailable: introduced in macOS 10.15
legacysupport.use_mp_libcxx yes
legacysupport.newest_darwin_requires_legacy 19
compiler.c_standard 1999
compiler.cxx_standard 2020
set py_ver 3.14
set py_ver_nodot [string map {. {}} ${py_ver}]
set mypydir ${frameworks_dir}/Python.framework/Versions/${py_ver}
# avoid errors for 'TARGET_OS_*' is not defined in External/ChemDraw
# upstream patched only the case for AppleClang as compiler, older OSes use
# macports-clang-XY still experience the issue
patchfiles-append patch-ChemDraw-CMakeLists.txt
patchfiles-append vector.patch
depends_build-append \
path:bin/pkg-config:pkgconfig
# during the build a git repository is cloned, on older systems this
# fails with an "SSL certificate problem: Invalid certificate chain"
if {${os.platform} eq "darwin" && ${os.major} < 15} {
depends_build-append \
path:bin/git:git
}
depends_lib-append port:catch2 \
port:coordgen \
port:maeparser \
path:share/pkgconfig/eigen3.pc:eigen3 \
path:lib/pkgconfig/cairo.pc:cairo \
port:freetype \
path:lib/pkgconfig/RapidJSON.pc:rapidjson \
port:sqlite3 \
port:python${py_ver_nodot} \
port:py${py_ver_nodot}-numpy \
port:py${py_ver_nodot}-cairo
configure.args-append \
-DRDK_INSTALL_INTREE=OFF \
-DRDK_BUILD_CPP_TESTS=OFF \
-DRDK_INSTALL_STATIC_LIBS=OFF \
-DRDK_BUILD_CAIRO_SUPPORT=ON \
-DCatch2_DIR=${prefix}/include/catch2 \
-DRDK_BUILD_PYTHON_WRAPPERS=ON \
-DPython3_EXECUTABLE=${mypydir}/bin/python${py_ver} \
-DPython3_NumPy_INCLUDE_DIRS="${mypydir}/lib/python${py_ver}/site-packages/numpy/_core/include" \
-DCMAKE_REQUIRE_FIND_PACKAGE_coordgen=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_maeparser=ON \
-DRDK_BUILD_INCHI_SUPPORT=ON \
-DRDK_BUILD_AVALON_SUPPORT=ON \
-DRDK_BUILD_YAEHMOP_SUPPORT=ON \
-DRDK_BUILD_FREESASA_SUPPORT=ON \
-DRDK_BUILD_COMPRESSED_SUPPLIERS=ON \
-DRDK_INSTALL_PYTHON_TESTS=OFF \
-DPYTHON_INSTDIR=${mypydir}/lib/python${py_ver}/site-packages
# https://trac.macports.org/ticket/73463
if {[string match *gcc* ${configure.compiler}] && ${configure.build_arch} in [list arm i386 ppc]} {
configure.ldflags-append \
-latomic
}
post-destroot {
# conflicts with the file isntalled by the "expat" port
file delete ${destroot}${prefix}/lib/libexpat.a
}
github.livecheck.regex {([0-9_]+)}