Re: [OpenBabel-Devel] [PATCH] fix external inchi support and language bindings building

2010-12-31 Thread Noel O'Boyle
Hi Dominik,

Geoff has just applied these patches. For scripts/CMakeLists.txt
(http://openbabel.svn.sf.net/viewvc/openbabel/openbabel/trunk/scripts/CMakeLists.txt?r1=4330r2=4341),
the Ruby (and possibly the Python) portions of these patches break
local installation as you have introduced a variable $DESTDIR which is
not defined in the user's environment. Neither of the two bugs you
list describe a problem with the Ruby or Python bindings - were these
changes included in the patch in error? You should have been able to
do exactly the same by specifying PYTHON_PREFIX and RUBY_PREFIX when
configuring CMake.

- Noel

On 2 December 2010 23:37, Dominik 'Rathann' Mierzejewski
domi...@greysector.net wrote:
 Dear developers,
 here are the patches I mentioned in bugs 3059516 and 3059512 but was unable
 to attach.

 Regards,
 Dominik

 --
 Fedora http://fedoraproject.org/wiki/User:Rathann
 RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu
 Faith manages.
        -- Delenn to Lennier in Babylon 5:Confessions and Lamentations

 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 OpenBabel-Devel mailing list
 OpenBabel-Devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/openbabel-devel



--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


[OpenBabel-Devel] [PATCH] fix external inchi support and language bindings building

2010-12-02 Thread Dominik 'Rathann' Mierzejewski
Dear developers,
here are the patches I mentioned in bugs 3059516 and 3059512 but was unable
to attach.

Regards,
Dominik

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu
Faith manages.
-- Delenn to Lennier in Babylon 5:Confessions and Lamentations
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.0 +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.r2010-09-25 17:05:05.0 
+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.hDESTINATION ${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.0 
+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.
diff -up openbabel-2.3.0/scripts/CMakeLists.txt.r 
openbabel-2.3.0/scripts/CMakeLists.txt
--- openbabel-2.3.0/scripts/CMakeLists.txt.r2010-10-25 19:37:42.0 
+0200
+++ openbabel-2.3.0/scripts/CMakeLists.txt  2010-11-24 22:53:29.250004683 
+0100
@@ -82,6 +82,7 @@ if (DO_PYTHON_BINDINGS)
 COMMAND ${CMAKE_COMMAND} -E copy ob.py 
${openbabel_SOURCE_DIR}/scripts/python/openbabel.py
 COMMAND ${CMAKE_COMMAND} -E remove ob.py
 VERBATIM)
+add_dependencies(_openbabel openbabel)
 
 if (PYTHON_PREFIX)
 install(CODE execute_process(COMMAND ${PYTHON_EXECUTABLE} 
${openbabel_SOURCE_DIR}/scripts/python/setup.py install 
--prefix=${PYTHON_PREFIX} WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts))
@@ -89,7 +90,7 @@ if (DO_PYTHON_BINDINGS)
 if (${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local)
 install(CODE execute_process(COMMAND ${PYTHON_EXECUTABLE} 
${openbabel_SOURCE_DIR}/scripts/python/setup.py install WORKING_DIRECTORY 
${openbabel_BINARY_DIR}/scripts))
 else (${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local)
-install(CODE execute_process(COMMAND ${PYTHON_EXECUTABLE} 
${openbabel_SOURCE_DIR}/scripts/python/setup.py install 
--prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY 
${openbabel_BINARY_DIR}/scripts))
+install(CODE execute_process(COMMAND ${PYTHON_EXECUTABLE} 
${openbabel_SOURCE_DIR}/scripts/python/setup.py install 
--prefix=$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY 
${openbabel_BINARY_DIR}/scripts))
 endif (${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local)
 endif (PYTHON_PREFIX)
 
@@ -228,8 +229,8 @@ if (DO_PERL_BINDINGS)
 DEPENDS ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp
 WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl
 )
-  add_dependencies(bindings_perl pre_bindings_perl)
-  install(CODE execute_process(COMMAND make install WORKING_DIRECTORY 
${openbabel_BINARY_DIR}/scripts/perl))
+  add_dependencies(bindings_perl pre_bindings_perl openbabel)
+  install(CODE execute_process(COMMAND make install_vendor 
WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl))
 
 else (NOT MSVC)
   add_library(bindings_perl MODULE 
${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp)
@@ -282,20 +283,20 @@ if (DO_RUBY_BINDINGS)
 COMMAND ${CMAKE_COMMAND} -E make_directory 
${openbabel_BINARY_DIR}/scripts/ruby
 )