added pkgconfig patch [release 2.4.1-2mamba;Sat May 16 2020]

This commit is contained in:
Silvan Calarco 2024-01-06 08:09:37 +01:00
parent 198f76c4e3
commit 230fda251f
4 changed files with 200 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# openbabel2
OpenBabel is a project designed to pick up where Babel left off, as a cross-platform program and library designed to interconvert between many file formats used in molecular modeling and computational chemistry.

View File

@ -0,0 +1,36 @@
diff -ru openbabel-2.3.2.patched/include/openbabel/alias.h openbabel-2.3.2/include/openbabel/alias.h
--- openbabel-2.3.2.patched/include/openbabel/alias.h 2016-08-04 12:35:49.111515096 +0200
+++ openbabel-2.3.2/include/openbabel/alias.h 2010-09-07 19:07:53.000000000 +0200
@@ -115,7 +115,7 @@
}
bool FromNameLookup(OBMol& mol, const unsigned int atomindex);
#ifdef HAVE_SHARED_POINTER
- typedef std::vector< std::pair<std::string, shared_ptr<OBSmartsPattern> > > SmartsTable;
+ typedef std::vector< std::pair<std::string, std::tr1::shared_ptr<OBSmartsPattern> > > SmartsTable;
static bool LoadFile(SmartsTable& smtable);
#endif
};
diff -ru openbabel-2.3.2.patched/include/openbabel/shared_ptr.h openbabel-2.3.2/include/openbabel/shared_ptr.h
--- openbabel-2.3.2.patched/include/openbabel/shared_ptr.h 2016-08-04 12:34:32.386554217 +0200
+++ openbabel-2.3.2/include/openbabel/shared_ptr.h 2011-10-12 22:24:02.000000000 +0200
@@ -21,7 +21,7 @@
#define shared_ptr boost::shared_ptr
#else
#include <memory>
- #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
+ #if __GNUC__ >= 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
#include <tr1/memory>
#endif
using std::tr1::shared_ptr;
diff -ru openbabel-2.3.2.patched/src/alias.cpp openbabel-2.3.2/src/alias.cpp
--- openbabel-2.3.2.patched/src/alias.cpp 2016-08-04 12:36:42.821486062 +0200
+++ openbabel-2.3.2/src/alias.cpp 2012-10-05 22:17:36.000000000 +0200
@@ -270,7 +270,7 @@
//OBSmartsPattern objects are not copyable without complications,
//so reference semantics used.
- shared_ptr<OBSmartsPattern> psp(new OBSmartsPattern);
+ std::tr1::shared_ptr<OBSmartsPattern> psp(new OBSmartsPattern);
psp->Init(ssmarts.str());
smtable.push_back(make_pair(vec[0], psp));
}

View File

@ -0,0 +1,10 @@
diff -Nru openbabel-2.4.1.orig/openbabel-2.0.pc.cmake openbabel-2.4.1/openbabel-2.0.pc.cmake
--- openbabel-2.4.1.orig/openbabel-2.0.pc.cmake 2020-05-16 11:56:40.000000000 +0200
+++ openbabel-2.4.1/openbabel-2.0.pc.cmake 2020-05-16 15:26:32.635000000 +0200
@@ -7,5 +7,5 @@
Name: Open Babel library
Description: libopenbabel
Version: @BABEL_VERSION@
-Libs: -L${libdir} -lopenbabel
+Libs: -L${libdir} -lopenbabel-2
Cflags: -I${pkgincludedir}

152
openbabel2.spec Normal file
View File

@ -0,0 +1,152 @@
%define apiver 2.0
%define minver %(echo %version | cut -d. -f 2-)
%define gitver %(echo %version | tr . -)
Name: openbabel2
Version: 2.4.1
Release: 2mamba
Summary: Chemistry file translation program
Group: Applications/Educational
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://downloads.sourceforge.net/sourceforge/openbabel/
Source: https://github.com/openbabel/openbabel.git/openbabel-%{gitver}/openbabel-%{version}.tar.bz2
#http://downloads.sourceforge.net/openbabel/openbabel-%{version}.tar.gz
Patch0: openbabel-2.3.2-gcc-6.1.0.patch
Patch1: openbabel-2.4.1-pkgconfig.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libcairo-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
BuildRequires: libtirpc-devel
BuildRequires: libwxBase-unicode-devel
BuildRequires: libwxGTK-unicode-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires: lib%{name} = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
OpenBabel is a project designed to pick up where Babel left off, as a cross-platform program and library designed to interconvert between many file formats used in molecular modeling and computational chemistry.
%package -n lib%{name}
Summary: Shared libraries for %{name}
Group: System/Libraries
%description -n lib%{name}
OpenBabel is a project designed to pick up where Babel left off, as a cross-platform program and library designed to interconvert between many file formats used in molecular modeling and computational chemistry.
This package contains the shared libraries provided by %{name}.
%package -n lib%{name}-devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: lib%{name} = %{version}-%{release}
%description -n lib%{name}-devel
OpenBabel is a project designed to pick up where Babel left off, as a cross-platform program and library designed to interconvert between many file formats used in molecular modeling and computational chemistry.
This package contains static libraries and header files needed for development.
%debug_package
%prep
%setup -q -n openbabel-%{version}
#-D -T
#%patch0 -p1
%patch1 -p1
%build
%cmake \
-DCMAKE_SHARED_LINKER_FLAGS="-ltirpc" \
-DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config-unicode \
-DWITH_INCHI=OFF
%make
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
mv %{buildroot}%{_libdir}/libopenbabel.so %{buildroot}%{_libdir}/libopenbabel-2.so
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
#%{_bindir}/OBGUI
%{_bindir}/babel
%{_bindir}/ob*
%{_bindir}/roundtrip
%{_datadir}/openbabel/*
%{_mandir}/man1/babel.1*
%{_mandir}/man1/ob*.1*
%{_mandir}/man1/roundtrip.1*
%doc AUTHORS COPYING
# ChangeLog NEWS README THANKS
%files -n lib%{name}
%defattr(-,root,root)
#%{_libdir}/libinchi.so.*
%{_libdir}/libopenbabel.so.*
%dir %{_libdir}/openbabel
%{_libdir}/openbabel/*/*.so
#%{_libdir}/libinchi.so
%files -n lib%{name}-devel
%defattr(-,root,root)
%{_includedir}/inchi/inchi_api.h
%dir %{_includedir}/openbabel-%{apiver}
%dir %{_includedir}/openbabel-%{apiver}/openbabel
%{_includedir}/openbabel-%{apiver}/openbabel/*.h
%dir %{_includedir}/openbabel-%{apiver}/openbabel/json
%{_includedir}/openbabel-%{apiver}/openbabel/json/*.h
%dir %{_includedir}/openbabel-%{apiver}/openbabel/math
%{_includedir}/openbabel-%{apiver}/openbabel/math/*.h
%dir %{_includedir}/openbabel-%{apiver}/openbabel/stereo
%{_includedir}/openbabel-%{apiver}/openbabel/stereo/*.h
%{_includedir}/openbabel-%{apiver}/openbabel/*.h
%dir %{_libdir}/cmake/openbabel2
%{_libdir}/libopenbabel-2.so
%{_libdir}/cmake/openbabel2/OpenBabel2*.cmake
%{_libdir}/pkgconfig/*.pc
%changelog
* Sat May 16 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-2mamba
- added pkgconfig patch
* Sat May 16 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-1mamba
- update to 2.4.1
* Thu Aug 04 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.2.20160804git-1mamba
- update to 2.3.2.20160804git
* Thu Aug 04 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.2-2mamba
- rebuilt with gcc 6.1.0
* Fri Dec 28 2012 Automatic Build System <autodist@mambasoft.it> 2.3.2-1mamba
- automatic version update by autodist
* Fri Mar 04 2011 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba
- automatic update by autodist
* Tue Aug 04 2009 Automatic Build System <autodist@mambasoft.it> 2.2.3-1mamba
- automatic update by autodist
* Fri Jul 17 2009 Automatic Build System <autodist@mambasoft.it> 2.2.2-1mamba
- automatic update by autodist
* Sun Mar 22 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.1-1mamba
- automatic update by autodist
* Mon Oct 13 2008 gil <puntogil@libero.it> 2.2.0-1mamba
- update to 2.2.0
* Tue Aug 30 2005 Massimo Pintore <massimo.pintore@qilinux.it> 1.100.2-1qilnx
- package created by autospec