mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
145
sci-chemistry/openbabel/openbabel-3.1.1.recipe
Normal file
145
sci-chemistry/openbabel/openbabel-3.1.1.recipe
Normal file
@@ -0,0 +1,145 @@
|
||||
SUMMARY="A chemical toolbox designed to speak the many languages of chemical data"
|
||||
DESCRIPTION="Open Babel is a chemical toolbox designed to speak the many languages of chemical \
|
||||
data. It’s an open, collaborative project allowing anyone to search, convert, analyze, or store \
|
||||
data from molecular modeling, chemistry, solid-state materials, biochemistry, or related areas.
|
||||
|
||||
* Ready-to-use programs, and complete programmer’s toolkit
|
||||
* Read, write and convert over 110 chemical file formats
|
||||
* Filter and search molecular files using SMARTS and other methods
|
||||
* Supports molecular modeling, cheminformatics, bioinformatics
|
||||
* Organic chemistry, inorganic chemistry, solid-state materials, nuclear chemistry
|
||||
* Downloaded over 700,000 times and used by over 40 related projects
|
||||
* How to cite Open Babel: The Open Babel and Pybel papers"
|
||||
HOMEPAGE="http://openbabel.org/"
|
||||
COPYRIGHT="2023 The Open Babel Team"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
openbabelVersion=`echo $portVersion | sed 's/\./-/g'`
|
||||
SOURCE_URI="https://github.com/openbabel/openbabel/archive/refs/tags/openbabel-$openbabelVersion.tar.gz"
|
||||
CHECKSUM_SHA256="c97023ac6300d26176c97d4ef39957f06e68848d64f1a04b0b284ccff2744f02"
|
||||
SOURCE_DIR="openbabel-openbabel-$openbabelVersion"
|
||||
PATCHES="openbabel-$portVersion.patchset
|
||||
2297.patch"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
openbabelLibVersion="7.0.0"
|
||||
openbabelLibVersionCompat="$openbabelLibVersion compat >= ${openbabelLibVersion%%.*}"
|
||||
inchiLibVersion="0.4.1"
|
||||
inchiLibVersionCompat="$inchiLibVersion compat >= ${inchiLibVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
openbabel$secondaryArchSuffix = $portVersion
|
||||
lib:libinchi$secondaryArchSuffix = $inchiLibVersionCompat
|
||||
lib:libopenbabel$secondaryArchSuffix = $openbabelLibVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcoordgen$secondaryArchSuffix
|
||||
lib:libmaeparser$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
openbabel${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libinchi$secondaryArchSuffix = $inchiLibVersionCompat
|
||||
devel:libopenbabel$secondaryArchSuffix = $openbabelLibVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
openbabel$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
openbabel${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:obabel$commandSuffix = $portVersion
|
||||
cmd:obconformer$commandSuffix = $portVersion
|
||||
cmd:obdistgen$commandSuffix = $portVersion
|
||||
cmd:obenergy$commandSuffix = $portVersion
|
||||
cmd:obfit$commandSuffix = $portVersion
|
||||
cmd:obfitall$commandSuffix = $portVersion
|
||||
cmd:obgen$commandSuffix = $portVersion
|
||||
cmd:obgrep$commandSuffix = $portVersion
|
||||
cmd:obminimize$commandSuffix = $portVersion
|
||||
cmd:obmm$commandSuffix = $portVersion
|
||||
cmd:obprobe$commandSuffix = $portVersion
|
||||
cmd:obprop$commandSuffix = $portVersion
|
||||
cmd:obrms$commandSuffix = $portVersion
|
||||
cmd:obrotamer$commandSuffix = $portVersion
|
||||
cmd:obrotate$commandSuffix = $portVersion
|
||||
cmd:obspectrophore$commandSuffix = $portVersion
|
||||
cmd:obsym$commandSuffix = $portVersion
|
||||
cmd:obtautomer$commandSuffix = $portVersion
|
||||
cmd:obthermo$commandSuffix = $portVersion
|
||||
cmd:roundtrip$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
openbabel$secondaryArchSuffix == $portVersion base
|
||||
$REQUIRES
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
eigen3$secondaryArchSuffix
|
||||
devel:libboost_iostreams$secondaryArchSuffix >= 1.88.0
|
||||
devel:libboost_program_options$secondaryArchSuffix >= 1.88.0
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libcoordgen$secondaryArchSuffix
|
||||
devel:libmaeparser$secondaryArchSuffix
|
||||
devel:librapidjson$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||
-DCMAKE_SKIP_RPATH=YES \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-Wno-dev
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libinchi \
|
||||
libopenbabel
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
|
||||
packageEntries tools \
|
||||
$commandBinDir \
|
||||
$manDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
export LIBRARY_PATH="$sourceDir/build/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
47
sci-chemistry/openbabel/patches/2297.patch
Normal file
47
sci-chemistry/openbabel/patches/2297.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
From b6887a8a82162278983a8489e365e61a0372b1b8 Mon Sep 17 00:00:00 2001
|
||||
From: Benny Siegert <bsiegert@gmail.com>
|
||||
Date: Wed, 4 Nov 2020 20:31:17 +0100
|
||||
Subject: [PATCH] Do not search for coordgen template files.
|
||||
|
||||
The coordgen upstream does not install the template file. It is
|
||||
also not required at runtime, since its contents are compiled into
|
||||
the coordgen library itself.
|
||||
|
||||
Fixes #2214
|
||||
---
|
||||
cmake/modules/Findcoordgen.cmake | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/Findcoordgen.cmake b/cmake/modules/Findcoordgen.cmake
|
||||
index ded0a4de7d..9bc5c9557f 100644
|
||||
--- a/cmake/modules/Findcoordgen.cmake
|
||||
+++ b/cmake/modules/Findcoordgen.cmake
|
||||
@@ -6,7 +6,6 @@
|
||||
#
|
||||
# coordgen_INCLUDE_DIRS - CoordGen's includes directory
|
||||
# coordgen_LIBRARIES - CoordGen's shared libraries
|
||||
-# coordgen_TEMPLATE_FILE - CoordGen templates file
|
||||
#
|
||||
#
|
||||
|
||||
@@ -28,19 +27,9 @@ find_library(coordgen_LIBRARIES
|
||||
)
|
||||
message(STATUS "coordgen libraries set as '${coordgen_LIBRARIES}'")
|
||||
|
||||
-# Just in case, add parent directory above libraries to templates search hints
|
||||
-get_filename_component(libs_parent_dir ${coordgen_LIBRARIES} PATH)
|
||||
-find_file(coordgen_TEMPLATE_FILE
|
||||
- NAMES templates.mae
|
||||
- HINTS ${coordgen_DIR} ${libs_parent_dir}
|
||||
- PATH_SUFFIXES "share" "share/coordgen"
|
||||
- DOC "templates file for coordgen"
|
||||
-)
|
||||
-message(STATUS "coordgen templates file set as '${coordgen_TEMPLATE_FILE}'")
|
||||
-
|
||||
find_package_handle_standard_args(coordgen FOUND_VAR coordgen_FOUND
|
||||
REQUIRED_VARS coordgen_INCLUDE_DIRS
|
||||
- coordgen_LIBRARIES coordgen_TEMPLATE_FILE)
|
||||
+ coordgen_LIBRARIES)
|
||||
|
||||
|
||||
|
||||
105
sci-chemistry/openbabel/patches/openbabel-3.1.1.patchset
Normal file
105
sci-chemistry/openbabel/patches/openbabel-3.1.1.patchset
Normal file
@@ -0,0 +1,105 @@
|
||||
From 5059937972d25bdbf83a79e96820fd8212035454 Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Wed, 24 Dec 2025 10:21:06 +0100
|
||||
Subject: Fixes for cmake (4), fPIC and deprecated warnings
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c39db4a..d4dcf67 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,9 +10,6 @@ set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
- if(POLICY CMP0042)
|
||||
- cmake_policy(SET CMP0042 OLD)
|
||||
- endif()
|
||||
endif()
|
||||
|
||||
include (CheckCXXCompilerFlag)
|
||||
@@ -111,7 +108,7 @@ if(BUILD_SHARED)
|
||||
set(BUILD_TYPE SHARED)
|
||||
set(PLUGIN_TYPE MODULE)
|
||||
add_definitions(-DUSING_DYNAMIC_LIBS)
|
||||
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
+ set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
|
||||
else()
|
||||
set(BUILD_TYPE STATIC)
|
||||
set(PLUGIN_TYPE STATIC)
|
||||
@@ -137,6 +134,10 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+if(HAIKU)
|
||||
+ add_definitions(-Wno-deprecated-declarations)
|
||||
+endif(HAIKU)
|
||||
+
|
||||
# Should we attempt to use the system inchi library?
|
||||
option(WITH_INCHI "Build inchi support" ON)
|
||||
option(OPENBABEL_USE_SYSTEM_INCHI
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
||||
From d39e1a02ac56e306c4f1a9940368b2c26336e99c Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Wed, 24 Dec 2025 14:21:42 +0100
|
||||
Subject: Fix some installation targets
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d4dcf67..6b84000 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -68,7 +68,7 @@ else() # Windows - bin dir = lib dir to load libraries
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED OB_INCLUDE_DIRS)
|
||||
- set(OB_INCLUDE_DIRS "include/openbabel${BABEL_MAJ_VER}")
|
||||
+ set(OB_INCLUDE_DIRS "${CMAKE_INSTALL_INCLUDEDIR}/openbabel${BABEL_MAJ_VER}")
|
||||
endif()
|
||||
set(OB_EXPORTS_FILE "${openbabel_BINARY_DIR}/OpenBabel3_EXPORTS.cmake")
|
||||
# Ensure a fresh file is made each time CMake is run
|
||||
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
|
||||
index 4982989..02a7c62 100644
|
||||
--- a/data/CMakeLists.txt
|
||||
+++ b/data/CMakeLists.txt
|
||||
@@ -58,7 +58,7 @@ set(to_install
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
- install(FILES ${to_install} DESTINATION share/openbabel/${BABEL_VERSION})
|
||||
+ install(FILES ${to_install} DESTINATION ${CMAKE_INSTALL_DATADIR}/openbabel/${BABEL_VERSION})
|
||||
else(NOT MSVC)
|
||||
install(FILES ${to_install} DESTINATION bin/data)
|
||||
endif(NOT MSVC)
|
||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
||||
index 7a09e84..25c140e 100644
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ include(GNUInstallDirs)
|
||||
|
||||
file(GLOB man_1 *.1)
|
||||
install(FILES ${man_1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
-install(FILES splash.png DESTINATION share/openbabel/${BABEL_VERSION})
|
||||
+install(FILES splash.png DESTINATION ${CMAKE_INSTALL_DATADIR}/openbabel/${BABEL_VERSION})
|
||||
|
||||
OPTION(BUILD_DOCS "Build Open Babel documentation" OFF)
|
||||
IF(BUILD_DOCS)
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index eceb7aa..3201282 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -6,7 +6,7 @@ file(GLOB depict_headers openbabel/depict/*.h)
|
||||
file(GLOB lbfgs_headers LBFGS/*.h)
|
||||
|
||||
if(NOT OPENBABEL_USE_SYSTEM_INCHI)
|
||||
-install(FILES inchi_api.h DESTINATION include/inchi)
|
||||
+install(FILES inchi_api.h DESTINATION ${OB_INCLUDE_DIRS}/inchi)
|
||||
endif(NOT OPENBABEL_USE_SYSTEM_INCHI)
|
||||
install(FILES chemdrawcdx.h DESTINATION ${OB_INCLUDE_DIRS}/openbabel)
|
||||
install(FILES ${openbabel_headers} DESTINATION ${OB_INCLUDE_DIRS}/openbabel)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
Reference in New Issue
Block a user