[qca2] Fix build with gcc 4.7.0

Sven Lankes slankes at fedoraproject.org
Sat Jan 7 19:21:50 UTC 2012


commit a4c37136bcf83d44a843a0f401631e0617727c99
Author: Sven Lankes <sven at lank.es>
Date:   Sat Jan 7 20:21:46 2012 +0100

    Fix build with gcc 4.7.0

 qca-2.0.3-gcc47.patch |   17 ++++++++++++++++
 qca2.spec             |   51 ++++++++++++++++++++----------------------------
 2 files changed, 38 insertions(+), 30 deletions(-)
---
diff --git a/qca-2.0.3-gcc47.patch b/qca-2.0.3-gcc47.patch
new file mode 100644
index 0000000..5297ecb
--- /dev/null
+++ b/qca-2.0.3-gcc47.patch
@@ -0,0 +1,17 @@
+--- ./src/botantools/botan/botan/secmem.h.orig	2012-01-07 20:09:35.427999593 +0100
++++ ./src/botantools/botan/botan/secmem.h	2012-01-07 20:09:52.540001422 +0100
+@@ -214,11 +214,11 @@
+ 
+       SecureVector(u32bit n = 0) { MemoryRegion<T>::init(true, n); }
+       SecureVector(const T in[], u32bit n)
+-         { MemoryRegion<T>::init(true); set(in, n); }
++         { MemoryRegion<T>::init(true); this->set(in, n); }
+       SecureVector(const MemoryRegion<T>& in)
+-         { MemoryRegion<T>::init(true); set(in); }
++         { MemoryRegion<T>::init(true); this->set(in); }
+       SecureVector(const MemoryRegion<T>& in1, const MemoryRegion<T>& in2)
+-         { MemoryRegion<T>::init(true); set(in1); append(in2); }
++         { MemoryRegion<T>::init(true); this->set(in1); append(in2); }
+    };
+ 
+ /*************************************************
diff --git a/qca2.spec b/qca2.spec
index 61f053e..c8238c8 100644
--- a/qca2.spec
+++ b/qca2.spec
@@ -8,13 +8,10 @@ Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://delta.affinix.com/qca
 Source0:        http://delta.affinix.com/download/qca/2.0/qca-%{version}.tar.bz2
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Allow gcc to compile qca
+Patch0:         qca-2.0.3-gcc47.patch
 
-BuildRequires: pkgconfig(QtCore) 
-
-# owner of /etc/ssl/certs/ca-bundle.crt
-Requires: ca-certificates
-%{?_qt4:Requires: %{_qt4}%{?_isa} >= %{_qt4_version}}
+BuildRequires:  qt4-devel
 
 %description
 Taking a hint from the similarly-named Java Cryptography Architecture,
@@ -29,22 +26,24 @@ application!
 %package        devel
 Summary:        Qt Cryptographic Architecture development files
 Group:          Development/Libraries
-Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       %{name} = %{version}-%{release}
+Requires:       pkgconfig
+
 %description    devel
-This packages contains the development files for QCA.
+This packages contains the development files for QCA
 
 %prep
 %setup -q -n qca-%{version}
+%patch0 -p1
 
 %build
-export PATH=%{_qt4_bindir}:$PATH
+unset QTDIR
 ./configure \
   --prefix=%{_prefix} \
-  --includedir=%{_qt4_headerdir} \
-  --libdir=%{_qt4_libdir} \
+  --includedir=%{_includedir} \
+  --libdir=%{_libdir} \
   --datadir=%{_datadir} \
   --no-separate-debug-info \
-  --certstore-path=%{_sysconfdir}/ssl/certs/ca-bundle.crt \
   --verbose
 
 sed -i -e /strip/d Makefile
@@ -56,11 +55,6 @@ rm -rf $RPM_BUILD_ROOT
 make install INSTALL_ROOT=$RPM_BUILD_ROOT
 
 
-%check
-# FIXME: lots of failures. :( don't enable by default yet  -- rex
-#make test ||:
-
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -68,35 +62,32 @@ rm -rf $RPM_BUILD_ROOT
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING README TODO
-%{_qt4_libdir}/libqca.so.2*
 %{_bindir}/qcatool2
+%{_libdir}/*.so.*
 %{_mandir}/*/*
 
 %files devel
 %defattr(-,root,root,-)
-%{_qt4_headerdir}/QtCrypto/
-%{_qt4_libdir}/libqca.prl
-%{_qt4_libdir}/libqca.so
-%{_qt4_libdir}/pkgconfig/qca2.pc
-%{_qt4_libdir}/qt4/mkspecs/features/crypto.prf
+%{_includedir}/QtCrypto
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/qca2.pc
+%{_libdir}/libqca.prl
+%{_libdir}/qt4/mkspecs/features/crypto.prf
 
 
 %changelog
-* Wed Nov 09 2011 Rex Dieter <rdieter at fedoraproject.org> 2.0.3-3
-- pkgconfig-style deps
-- tighten subpkg dep
-- tighten %files
-- use %%_qt4 macros
-- Requires: ca-certificates, --certstore-path=/etc/ssl/certs/ca-bundle.crt
+* Sat Jan 07 2012 Sven Lankes <sven at lank.es> - 2.0.3-3
+- Fix build with gcc 4.7.0
 
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.3-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * Mon Nov 29 2010 Sven Lankes <sven at lank.es> - 2.0.3-1
-- new upstrem release
+- new upstream release
 
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild


More information about the scm-commits mailing list