summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus D. Hanwell <cryos@gentoo.org>2008-04-21 05:52:32 +0000
committerMarcus D. Hanwell <cryos@gentoo.org>2008-04-21 05:52:32 +0000
commit28aab3364f29a3f21e26de7531a618507d076887 (patch)
treefda67eb0c9194f3f3d8a78f8384a07b4111844f4 /sci-chemistry/openbabel
parentRemoval of net-firewall/conntrack's mask (bug #213084). (diff)
downloadgentoo-2-28aab3364f29a3f21e26de7531a618507d076887.tar.gz
gentoo-2-28aab3364f29a3f21e26de7531a618507d076887.tar.bz2
gentoo-2-28aab3364f29a3f21e26de7531a618507d076887.zip
Bug 216057 - added back in missing API element.
(Portage version: 2.1.5_rc5)
Diffstat (limited to 'sci-chemistry/openbabel')
-rw-r--r--sci-chemistry/openbabel/ChangeLog9
-rw-r--r--sci-chemistry/openbabel/files/openbabel-2.2.0_beta4-obconversion_api_fix.diff110
-rw-r--r--sci-chemistry/openbabel/openbabel-2.2.0_beta4-r1.ebuild30
3 files changed, 148 insertions, 1 deletions
diff --git a/sci-chemistry/openbabel/ChangeLog b/sci-chemistry/openbabel/ChangeLog
index 22ef8a868201..234f03226230 100644
--- a/sci-chemistry/openbabel/ChangeLog
+++ b/sci-chemistry/openbabel/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/openbabel
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/ChangeLog,v 1.14 2008/03/01 17:50:03 cryos Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/ChangeLog,v 1.15 2008/04/21 05:52:31 cryos Exp $
+
+*openbabel-2.2.0_beta4-r1 (21 Apr 2008)
+
+ 21 Apr 2008; Marcus D. Hanwell <cryos@gentoo.org>
+ +files/openbabel-2.2.0_beta4-obconversion_api_fix.diff,
+ +openbabel-2.2.0_beta4-r1.ebuild:
+ Bug 216057 - added back in missing API element.
*openbabel-2.2.0_beta4 (01 Mar 2008)
diff --git a/sci-chemistry/openbabel/files/openbabel-2.2.0_beta4-obconversion_api_fix.diff b/sci-chemistry/openbabel/files/openbabel-2.2.0_beta4-obconversion_api_fix.diff
new file mode 100644
index 000000000000..14aa4a0fa21f
--- /dev/null
+++ b/sci-chemistry/openbabel/files/openbabel-2.2.0_beta4-obconversion_api_fix.diff
@@ -0,0 +1,110 @@
+--- include/openbabel/obconversion.h 2008-02-29 14:06:19.000000000 -0500
++++ include/openbabel/obconversion.h 2008-04-20 20:17:14.000000000 -0400
+@@ -49,6 +49,9 @@
+
+ OBERROR extern OBMessageHandler obErrorLog;
+
++ typedef std::map<const char*,OBFormat*,CharPtrLess > FMapType;
++ typedef FMapType::iterator Formatpos;
++
+ //*************************************************
+ /// @brief Class to convert from one format to another.
+ // Class introduction in obconversion.cpp
+@@ -75,7 +78,7 @@
+ static OBFormat* FormatFromMIME(const char* MIME);
+
+ ///Repeatedly called to recover available Formats
+-// static bool GetNextFormat(Formatpos& itr, const char*& str,OBFormat*& pFormat);
++ static bool GetNextFormat(Formatpos& itr, const char*& str,OBFormat*& pFormat);
+ //@}
+
+ /// @name Information
+@@ -142,7 +145,7 @@
+ { return &OptionsArray[opttyp];};
+
+ ///@brief Set an option of specified type, with optional text
+- void AddOption(const char* opt, Option_type opttyp, const char* txt=NULL);
++ void AddOption(const char* opt, Option_type opttyp=OUTOPTIONS, const char* txt=NULL);
+
+ bool RemoveOption(const char* opt, Option_type optype);
+
+@@ -279,7 +282,7 @@
+
+ protected:
+ bool SetStartAndEnd();
+-// static FMapType& FormatsMap();///<contains ID and pointer to all OBFormat classes
++ static FMapType& FormatsMap();///<contains ID and pointer to all OBFormat classes
+ // static FMapType& FormatsMIMEMap();///<contains MIME and pointer to all OBFormat classes
+ typedef std::map<std::string,int> OPAMapType;
+ static OPAMapType& OptionParamArray(Option_type typ);
+
+--- src/obconversion.cpp 2008-02-29 14:06:05.000000000 -0500
++++ src/obconversion.cpp 2008-04-20 20:18:28.000000000 -0400
+@@ -324,6 +324,42 @@
+ return count;
+ }
+
++ FMapType& OBConversion::FormatsMap()
++ {
++ static FMapType* fm = new FMapType;
++ return *fm;
++ }
++
++ bool OBConversion::GetNextFormat(Formatpos& itr, const char*& str,OBFormat*& pFormat)
++ {
++ pFormat = NULL;
++ if(str==NULL)
++ itr = FormatsMap().begin();
++ else
++ itr++;
++ if(itr == FormatsMap().end())
++ {
++ str=NULL;
++ pFormat=NULL;
++ return false;
++ }
++ static string s;
++ s =itr->first;
++ pFormat = itr->second;
++ if(pFormat)
++ {
++ string description(pFormat->Description());
++ s += " -- ";
++ s += description.substr(0,description.find('\n'));
++ }
++
++ if(pFormat->Flags() & NOTWRITABLE) s+=" [Read-only]";
++ if(pFormat->Flags() & NOTREADABLE) s+=" [Write-only]";
++
++ str = s.c_str();
++ return true;
++ }
++
+ //////////////////////////////////////////////////////
+ /// Sets the formats from their ids, e g CML.
+ /// If inID is NULL, the input format is left unchanged. Similarly for outID
+@@ -486,7 +522,7 @@
+ if(!ret)
+ {
+ //error or termination request: terminate unless
+- // -e option requested and sucessfully can skip past current object
++ // -e option requested and successfully can skip past current object
+ if(!IsOption("e", GENOPTIONS) || pInFormat->SkipObjects(0,this)!=1)
+ break;
+ }
+@@ -1093,7 +1129,14 @@
+
+ //INPUT
+ if(FileList.empty())
+- pIs = NULL;
++ {
++ pIs = NULL;
++ if(HasMultipleOutputFiles)
++ {
++ obErrorLog.ThrowError(__FUNCTION__,"Cannot use multiple output files without an input file", obError);
++ return 0;
++ }
++ }
+ else
+ {
+ if(FileList.size()>1 || OutputFileName.substr(0,2)=="*.")
diff --git a/sci-chemistry/openbabel/openbabel-2.2.0_beta4-r1.ebuild b/sci-chemistry/openbabel/openbabel-2.2.0_beta4-r1.ebuild
new file mode 100644
index 000000000000..49a06562c914
--- /dev/null
+++ b/sci-chemistry/openbabel/openbabel-2.2.0_beta4-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/openbabel-2.2.0_beta4-r1.ebuild,v 1.1 2008/04/21 05:52:31 cryos Exp $
+
+inherit eutils
+
+DESCRIPTION="Open Babel interconverts file formats used in molecular modeling"
+SRC_URI="mirror://sourceforge/openbabel/${PN}-2.2.0b4-20080301-r2299.tar.gz"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+RDEPEND="!sci-chemistry/babel"
+
+S=${WORKDIR}/${PN}-2.2.0b4
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch "${FILESDIR}/${P}-obconversion_api_fix.diff"
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die "make install failed."
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+ cd doc
+ dohtml *.html *.png
+ dodoc *.inc README* *.inc *.mol2
+}