From b25fd71db737488767550617fddff56da5b25c7c Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Mon, 8 Mar 2021 17:29:24 +0000 Subject: [PATCH] science/rdkit: Add PGSQL option to build the PostgreSQL cartridge Also fix build with DOCS=OFF --- science/rdkit/Makefile | 12 ++++++++++-- science/rdkit/files/patch-CMakeLists.txt | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/science/rdkit/Makefile b/science/rdkit/Makefile index a9d05ed83804..a03f27e49834 100644 --- a/science/rdkit/Makefile +++ b/science/rdkit/Makefile @@ -3,6 +3,7 @@ PORTNAME= rdkit DISTVERSIONPREFIX= Release_ DISTVERSION= 2020_09_5 +PORTREVISION= 1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -28,17 +29,24 @@ CMAKE_OFF= RDK_INSTALL_INTREE RDK_USE_FLEXBISON \ RDK_INSTALL_STATIC_LIBS RDK_SWIG_STATIC RDK_PGSQL_STATIC \ RDK_OPTIMIZE_NATIVE \ RDK_BUILD_CPP_TESTS -CMAKE_ARGS= -DFREEBSD_DOCSDIR:PATH=${DOCSDIR} -DCATCH_DIR=${LOCALBASE}/include/catch2 +CMAKE_ARGS= -DCATCH_DIR=${LOCALBASE}/include/catch2 DATADIR= ${PREFIX}/share/RDKit DOCSDIR= ${PREFIX}/share/doc/RDKit PLIST_SUB= SHLIB_VER=${PORTVERSION} -OPTIONS_DEFINE= PYTHON DOCS +OPTIONS_DEFINE= DOCS PGSQL PYTHON OPTIONS_DEFAULT= PYTHON OPTIONS_SUB= yes +DOCS_CMAKE_BOOL= FREEBSD_INSTALL_DOCS +DOCS_CMAKE_ON= -DFREEBSD_DOCSDIR:PATH=${DOCSDIR} + +PGSQL_USES= pgsql +PGSQL_DESC= Build the PostgreSQL cartridge +PGSQL_CMAKE_BOOL= RDK_BUILD_PGSQL + PYTHON_CMAKE_BOOL= RDK_BUILD_PYTHON_WRAPPERS PYTHON_BUILD_DEPENDS= ${PYNUMPY} PYTHON_LIB_DEPENDS= ${PY_BOOST} diff --git a/science/rdkit/files/patch-CMakeLists.txt b/science/rdkit/files/patch-CMakeLists.txt index 463715d81d42..5b5bb0dde652 100644 --- a/science/rdkit/files/patch-CMakeLists.txt +++ b/science/rdkit/files/patch-CMakeLists.txt @@ -1,21 +1,29 @@ ---- CMakeLists.txt.orig 2020-12-12 08:00:55 UTC +--- CMakeLists.txt.orig 2021-03-01 16:43:06 UTC +++ CMakeLists.txt -@@ -68,7 +68,7 @@ if(NOT MSVC) +@@ -68,8 +68,8 @@ if(NOT MSVC) if(RDK_OPTIMIZE_POPCNT) if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") message("RDK_OPTIMIZE_POPCNT is not available on aarch64") - elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ppc64le") -+ elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntb") ++ elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") -@@ -460,7 +460,7 @@ if(NOT RDK_INSTALL_INTREE) + endif() +@@ -459,12 +459,14 @@ if(NOT RDK_INSTALL_INTREE) + COMPONENT data PATTERN ".svn" EXCLUDE ) ++ if (FREEBSD_INSTALL_DOCS) install(DIRECTORY Docs DESTINATION - ${RDKit_ShareDir} + ${FREEBSD_DOCSDIR} COMPONENT docs PATTERN ".svn" EXCLUDE PATTERN "_build" EXCLUDE + ) ++ endif() + install(DIRECTORY Contrib DESTINATION + ${RDKit_ShareDir} + COMPONENT extras