openbabel/openbabel-inchi.patch

38 lines
2.1 KiB
Diff

diff -up openbabel-2.3.0/cmake/modules/FindInchi.cmake.r openbabel-2.3.0/cmake/modules/FindInchi.cmake
--- openbabel-2.3.0/cmake/modules/FindInchi.cmake.r 2010-10-13 02:37:01.000000000 +0200
+++ openbabel-2.3.0/cmake/modules/FindInchi.cmake 2010-11-23 01:56:55.081622107 +0100
@@ -13,7 +13,7 @@ if(INCHI_INCLUDE_DIR AND INCHI_LIBRARY)
# in cache already
set(INCHI_FOUND TRUE)
else()
- find_path(INCHI_INCLUDE_DIR NAMES inchi_api.h)
+ find_path(INCHI_INCLUDE_DIR NAMES inchi_api.h PATHS /usr/include/inchi )
find_library(INCHI_LIBRARY NAMES inchi Inchi)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(INCHI DEFAULT_MSG INCHI_LIBRARY
diff -up openbabel-2.3.0/include/CMakeLists.txt.r openbabel-2.3.0/include/CMakeLists.txt
--- openbabel-2.3.0/include/CMakeLists.txt.r 2010-09-25 17:05:05.000000000 +0200
+++ openbabel-2.3.0/include/CMakeLists.txt 2010-11-23 01:56:55.082628237 +0100
@@ -4,7 +4,9 @@ file(GLOB math_headers openbabel/ma
file(GLOB stereo_headers openbabel/stereo/*.h)
file(GLOB depict_headers openbabel/stereo/*.h)
+if(NOT OPENBABEL_USE_SYSTEM_INCHI)
install(FILES inchi_api.h DESTINATION include/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)
install(FILES ${math_headers} DESTINATION ${OB_INCLUDE_DIRS}/openbabel/math)
diff -up openbabel-2.3.0/scripts/ruby/extconf.rb.r openbabel-2.3.0/scripts/ruby/extconf.rb
--- openbabel-2.3.0/scripts/ruby/extconf.rb.r 2010-10-23 03:54:40.000000000 +0200
+++ openbabel-2.3.0/scripts/ruby/extconf.rb 2010-11-23 01:56:55.083627521 +0100
@@ -17,7 +17,7 @@ dir_config('openbabel')
# Find a trivial header in order to add the proper include path
# to the build flags.
here = File.dirname(__FILE__)
-find_header('inchi_api.h', here + '/../../include')
+find_header('inchi_api.h', '/usr/include/inchi', '/usr/include', here + '/../../include')
# Prevent Ruby 1.8.x from trying to compile and link the extension
# using gcc.