From 2a0a8b2bf3db1eded88c3b848aca6094289507db Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Mon, 14 Sep 2009 00:01:18 +0000 Subject: [PATCH] - fixed configure to detect external inchi (both pre-1.0.2 and 1.0.2) - re-enabled inchi tests --- openbabel-check.patch | 20 -------------- openbabel-inchi.patch | 63 +++++++++++++++++++++++++++++++++++++++---- openbabel.spec | 5 ++-- 3 files changed, 60 insertions(+), 28 deletions(-) delete mode 100644 openbabel-check.patch diff --git a/openbabel-check.patch b/openbabel-check.patch deleted file mode 100644 index 2b8aa82..0000000 --- a/openbabel-check.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up openbabel-2.2.3/test/wrapper.sh.chk openbabel-2.2.3/test/wrapper.sh ---- openbabel-2.2.3/test/wrapper.sh.chk 2009-07-29 01:05:03.000000000 +0200 -+++ openbabel-2.2.3/test/wrapper.sh 2009-08-26 15:55:28.000000000 +0200 -@@ -16,11 +16,11 @@ TESTS="${TESTS} logp_psa math" - TESTS="${TESTS} mol phmodel residue rings" - TESTS="${TESTS} smarts smilesmatch strip unitcell" - TESTS="${TESTS} zipstream cml.sh test-set.sh" --if [ "x${srcdir}" != "x" ]; then -- TESTS="${TESTS} ${srcdir}/inchi.pl ${srcdir}/inchi2.pl" --else -- TESTS="${TESTS} inchi.pl inchi2.pl" --fi -+#if [ "x${srcdir}" != "x" ]; then -+# TESTS="${TESTS} ${srcdir}/inchi.pl ${srcdir}/inchi2.pl" -+#else -+# TESTS="${TESTS} inchi.pl inchi2.pl" -+#fi - PROVE=prove - - echo "top srcdir: .${topsrcdir}." diff --git a/openbabel-inchi.patch b/openbabel-inchi.patch index 42b3937..3074201 100644 --- a/openbabel-inchi.patch +++ b/openbabel-inchi.patch @@ -1,12 +1,65 @@ diff -up openbabel-2.2.3/configure.in.inchi openbabel-2.2.3/configure.in --- openbabel-2.2.3/configure.in.inchi 2009-07-29 03:05:04.000000000 +0200 -+++ openbabel-2.2.3/configure.in 2009-08-26 16:26:08.000000000 +0200 -@@ -239,7 +239,7 @@ AC_SUBST(LIBDL) ++++ openbabel-2.2.3/configure.in 2009-09-14 01:14:49.000000000 +0200 +@@ -239,8 +239,11 @@ AC_SUBST(LIBDL) AM_PATH_XML2(2.6.5) AM_CONDITIONAL(BUILD_XML, test x"$XML_LIBS" != "x") --AC_CHECK_LIB(inchi, GetINCHI, LIBINCHI="-linchi", LIBINCHI="") -+AC_CHECK_LIB(stdinchi, GetStdINCHI, LIBINCHI="-lstdinchi", LIBINCHI="") - AM_CONDITIONAL(BUILD_INCHI, test x"$LIBINCHI" = "x" -o "$inchi" = "yes") ++AC_CHECK_LIB(stdinchi, GetStdINCHI, LIBSTDINCHI="-lstdinchi", LIBSTDINCHI="") + AC_CHECK_LIB(inchi, GetINCHI, LIBINCHI="-linchi", LIBINCHI="") +-AM_CONDITIONAL(BUILD_INCHI, test x"$LIBINCHI" = "x" -o "$inchi" = "yes") ++AM_CONDITIONAL(HAVE_INCHI, test x"$LIBINCHI" != "x" -o x"$LIBSTDINCHI" != "x" -o "$inchi" = "yes") ++AM_CONDITIONAL(HAVE_STDINCHI, test x"$LIBSTDINCHI" != "x") ++AM_CONDITIONAL(BUILD_INCHI, test "$inchi" = "yes") AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no]) + AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) +diff -up openbabel-2.2.3/src/formats/Makefile.am.inchi openbabel-2.2.3/src/formats/Makefile.am +--- openbabel-2.2.3/src/formats/Makefile.am.inchi 2009-07-09 15:05:02.000000000 +0200 ++++ openbabel-2.2.3/src/formats/Makefile.am 2009-09-14 01:15:55.000000000 +0200 +@@ -39,11 +39,17 @@ endif + + if !BUILD_SHARED + noinst_LTLIBRARIES = libformats.la ++if HAVE_INCHI + if BUILD_INCHI + libformats_la_LIBADD = inchi102/libinchi.la + else ++if HAVE_STDINCHI ++libformats_la_LIBADD = -lstdinchi ++else + libformats_la_LIBADD = -linchi + endif ++endif ++endif + libformats_la_SOURCES = \ + APIInterface.cpp MCDLformat.cpp \ + CSRformat.cpp PQSformat.cpp alchemyformat.cpp \ +@@ -124,7 +130,7 @@ if HAVE_SHARED_POINTER + formats_LTLIBRARIES += chemdrawcdxformat.la chemkinformat.la \ + rxnformat.la rsmiformat.la + endif +-if BUILD_INCHI ++if HAVE_INCHI + formats_LTLIBRARIES += inchiformat.la + endif + if BUILD_ZLIB +@@ -261,12 +267,18 @@ hinformat_la_SOURCES = hinformat.cpp + hinformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la + + inchiformat_la_SOURCES = inchiformat.cpp getinchi.cpp ++if HAVE_INCHI + if BUILD_INCHI + inchiformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la inchi102/libinchi.la + else + inchiformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la ++if HAVE_STDINCHI ++inchiformat_la_LIBADD = -lstdinchi ++else + inchiformat_la_LIBADD = -linchi + endif ++endif ++endif + + jaguarformat_la_SOURCES = jaguarformat.cpp + jaguarformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la diff --git a/openbabel.spec b/openbabel.spec index d87306c..1926f95 100644 --- a/openbabel.spec +++ b/openbabel.spec @@ -16,7 +16,6 @@ Group: Applications/File URL: http://openbabel.org/ Source: http://downloads.sourceforge.net/sourceforge/openbabel/%{name}-%{version}%{beta_str}.tar.gz Patch1: %{name}-rpm.patch -Patch2: %{name}-check.patch Patch3: %{name}-inchi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: inchi-devel @@ -91,7 +90,6 @@ Ruby wrapper for the Open Babel library. %prep %setup -q -n %{name}-%{version}%{beta_str} %patch1 -p1 -b .r -%patch2 -p1 -b .chk %patch3 -p1 -b .inchi chmod 644 src/formats/mmcifformat.cpp @@ -186,7 +184,8 @@ popd * Wed Aug 26 2009 Dominik Mierzejewski 2.2.3-1 - updated to 2.2.3 - dropped obsolete patch -- fix configure to detect external inchi-1.0.2 +- fixed configure to detect external inchi (both pre-1.0.2 and 1.0.2) +- re-enabled inchi tests * Sat Jul 25 2009 Fedora Release Engineering - 2.2.1-0.2.b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild