From 8564bd4125c8675fd0a3acde96933fdaea7c55f8 Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Apr 04 2008 19:29:00 +0000 Subject: - port to openbabel-2.2 --- diff --git a/xdrawchem-ob22.patch b/xdrawchem-ob22.patch new file mode 100644 index 0000000..397b68f --- /dev/null +++ b/xdrawchem-ob22.patch @@ -0,0 +1,49 @@ +diff -up xdrawchem-1.9.9/xdrawchem/application_ob.cpp.ob xdrawchem-1.9.9/xdrawchem/application_ob.cpp +--- xdrawchem-1.9.9/xdrawchem/application_ob.cpp.ob 2005-11-30 04:47:14.000000000 +0100 ++++ xdrawchem-1.9.9/xdrawchem/application_ob.cpp 2008-04-04 21:24:48.000000000 +0200 +@@ -45,23 +45,36 @@ void ApplicationWindow::OBGetFilters() { + readFilters.append(str1); + writeFilters.append(str1); + +- Formatpos pos; ++ int i; + OBFormat* pFormat; +- const char* str=NULL; +- while(OBConversion::GetNextFormat(pos,str,pFormat)) ++ vector pFormats=Conv.GetSupportedInputFormat(); ++ ++ for(i=0; i < pFormats.size(); i++) + { + //std::cout << " " << str << std::endl; +- if((pFormat->Flags() & NOTWRITABLE) && (pFormat->Flags() & NOTREADABLE)) ++ pFormat=Conv.FindFormat(pFormats[i].c_str()); ++ if(pFormat->Flags() & NOTREADABLE) ++ continue; ++ str1 = pFormats[i]; ++ myext = str1.left( str1.find(" -- ") ); ++ str1.append("(*."); ++ str1.append(myext); ++ str1.append(")"); ++ readFilters.append(str1); ++ } ++ ++ pFormats=Conv.GetSupportedOutputFormat(); ++ for(i=0; i < pFormats.size(); i++) ++ { ++ pFormat=Conv.FindFormat(pFormats[i].c_str()); ++ if(pFormat->Flags() & NOTWRITABLE) + continue; +- str1 = str; ++ str1 = pFormats[i]; + myext = str1.left( str1.find(" -- ") ); + str1.append("(*."); + str1.append(myext); + str1.append(")"); +- if ( (pFormat->Flags() & NOTREADABLE) == 0 ) +- readFilters.append(str1); +- if ( (pFormat->Flags() & NOTWRITABLE) == 0 ) +- writeFilters.append(str1); ++ writeFilters.append(str1); + } + + filters.sort(); diff --git a/xdrawchem.spec b/xdrawchem.spec index a8fcf71..d7f7734 100644 --- a/xdrawchem.spec +++ b/xdrawchem.spec @@ -6,6 +6,7 @@ Source: http://dl.sourceforge.net/sourceforge/xdrawchem/%{name}-%{version}.tar. Source1: %{name}.desktop Source2: %{name}.png Patch: %{name}-gcc43.patch +Patch1: %{name}-ob22.patch URL: http://xdrawchem.sourceforge.net/ License: GPLv2+ Group: Applications/Engineering @@ -24,6 +25,7 @@ XDrawChem and other chemistry applications. %prep %setup -q %patch -p1 -b .gcc43 +%patch1 -p1 -b .ob %build %configure @@ -53,8 +55,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pixmaps/xdrawchem.png %changelog -* Tue Mar 25 2008 Rex Dieter - 1.9.9-9 -- qt-devel -> qt3-devel +* Fri Apr 04 2008 Dominik Mierzejewski 1.9.9-9 +- qt-devel -> qt3-devel (thanks to Rex Dieter) +- port to openbabel-2.2 * Tue Feb 19 2008 Fedora Release Engineering - 1.9.9-8 - Autorebuild for GCC 4.3