[spectrum] rebuild for new ImageMagick, fix gcc47 issues

Tom Callaway spot at fedoraproject.org
Fri Apr 13 20:59:39 UTC 2012


commit 87cb44cedbbe0ea90e9c36fdbfae96443123db30
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Fri Apr 13 16:59:36 2012 -0400

    rebuild for new ImageMagick, fix gcc47 issues

 spectrum-1.4.8-gcc47.patch |   98 ++++++++++++++++++++++++++++++++++++++++++++
 spectrum.spec              |   15 +++----
 2 files changed, 105 insertions(+), 8 deletions(-)
---
diff --git a/spectrum-1.4.8-gcc47.patch b/spectrum-1.4.8-gcc47.patch
new file mode 100644
index 0000000..648dee5
--- /dev/null
+++ b/spectrum-1.4.8-gcc47.patch
@@ -0,0 +1,98 @@
+diff -up spectrum-1.4.8/src/configinterface.cpp.gcc47 spectrum-1.4.8/src/configinterface.cpp
+--- spectrum-1.4.8/src/configinterface.cpp.gcc47	2012-04-13 16:43:59.961251021 -0400
++++ spectrum-1.4.8/src/configinterface.cpp	2012-04-13 16:44:08.915160444 -0400
+@@ -26,7 +26,7 @@
+ #include "transport.h"
+ #include "abstractconfiginterfacehandler.h"
+ #include "adhoc/adhocadmin.h"
+-
++#include <unistd.h>
+ 
+ // because of ConnectionBase::socket()....
+ static int getUnixSocket() {
+diff -up spectrum-1.4.8/src/spectrum_util.cpp.gcc47 spectrum-1.4.8/src/spectrum_util.cpp
+--- spectrum-1.4.8/src/spectrum_util.cpp.gcc47	2012-04-13 16:46:54.849481931 -0400
++++ spectrum-1.4.8/src/spectrum_util.cpp	2012-04-13 16:47:05.331375895 -0400
+@@ -28,6 +28,7 @@
+ #include "protocols/abstractprotocol.h"
+ #include "transport.h"
+ #include <sys/param.h>
++#include <unistd.h>
+ #ifdef BSD
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+diff -up spectrum-1.4.8/src/utf8/checked.h.gcc47 spectrum-1.4.8/src/utf8/checked.h
+--- spectrum-1.4.8/src/utf8/checked.h.gcc47	2012-04-13 16:43:02.571831568 -0400
++++ spectrum-1.4.8/src/utf8/checked.h	2012-04-13 16:43:32.177532063 -0400
+@@ -65,6 +65,35 @@ namespace utf8
+ 
+     /// The library API - functions intended to be called by the users
+ 
++    template <typename octet_iterator>
++    octet_iterator append(uint32_t cp, octet_iterator result)
++    {
++        if (!internal::is_code_point_valid(cp))
++            throw invalid_code_point(cp);
++
++        if (cp < 0x80)                        // one octet
++            *(result++) = static_cast<uint8_t>(cp);
++        else if (cp < 0x800) {                // two octets
++            *(result++) = static_cast<uint8_t>((cp >> 6)            | 0xc0);
++            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
++        }
++	else if (cp < 0x10000) {              // three octets
++            *(result++) = static_cast<uint8_t>((cp >> 12)           | 0xe0);
++            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)     | 0x80);
++            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
++        }
++	else if (cp <= internal::CODE_POINT_MAX) {	// four octets
++            *(result++) = static_cast<uint8_t>((cp >> 18)           | 0xf0);
++            *(result++) = static_cast<uint8_t>(((cp >> 12)& 0x3f)     | 0x80);
++            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)     | 0x80);
++            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
++        }
++	else
++            throw invalid_code_point(cp);
++
++        return result;
++    }
++
+     template <typename octet_iterator, typename output_iterator>
+     output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement)
+     {
+@@ -104,35 +133,6 @@ namespace utf8
+     }
+ 
+     template <typename octet_iterator>
+-    octet_iterator append(uint32_t cp, octet_iterator result)
+-    {
+-        if (!internal::is_code_point_valid(cp))
+-            throw invalid_code_point(cp);
+-
+-        if (cp < 0x80)                        // one octet
+-            *(result++) = static_cast<uint8_t>(cp);
+-        else if (cp < 0x800) {                // two octets
+-            *(result++) = static_cast<uint8_t>((cp >> 6)            | 0xc0);
+-            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
+-        }
+-        else if (cp < 0x10000) {              // three octets
+-            *(result++) = static_cast<uint8_t>((cp >> 12)           | 0xe0);
+-            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)     | 0x80);
+-            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
+-        }
+-        else if (cp <= internal::CODE_POINT_MAX) {      // four octets
+-            *(result++) = static_cast<uint8_t>((cp >> 18)           | 0xf0);
+-            *(result++) = static_cast<uint8_t>(((cp >> 12)& 0x3f)     | 0x80);
+-            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)     | 0x80);
+-            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);
+-        }
+-        else
+-            throw invalid_code_point(cp);
+-
+-        return result;
+-    }
+-
+-    template <typename octet_iterator>
+     uint32_t next(octet_iterator& it, octet_iterator end)
+     {
+         uint32_t cp = 0;
diff --git a/spectrum.spec b/spectrum.spec
index a2c98be..02015a7 100644
--- a/spectrum.spec
+++ b/spectrum.spec
@@ -7,7 +7,7 @@
 Summary: XMPP transport/gateway
 Name: spectrum
 Version: 1.4.8
-Release: 6%{?dist}
+Release: 7%{?dist}
 Group: System Environment/Daemons
 # spectrumctl is GPLv3+, rest GPLv2+
 License: GPLv2+ and GPLv3+
@@ -21,8 +21,8 @@ Source1: spectrum-tmpfiles.conf
 Patch0: spectrum-old-cmake.patch
 #
 Patch1: spectrum-fix-sysvinit-priority.patch
+Patch2: spectrum-1.4.8-gcc47.patch
 URL: http://spectrum.im/
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: libpurple-devel
 BuildRequires: poco-devel
 BuildRequires: gloox-devel
@@ -61,6 +61,7 @@ switched on in order to get libpurple.
 %endif
 
 %patch1 -p1 -b .sysvinit
+%patch2 -p1 -b .gcc47
 
 rm -vf po/*.po
 
@@ -79,8 +80,6 @@ cat <<EOS >spectrum-logrotate
 EOS
 
 %install
-rm -rf %{buildroot}
-
 make install DESTDIR=%{buildroot}
 (cd spectrumctl && \
     python setup.py install --root %{buildroot} --prefix %{_prefix} \
@@ -107,9 +106,6 @@ install -p -D %{SOURCE1} \
 	%{buildroot}%{_sysconfdir}/tmpfiles.d/spectrum.conf
 %endif
 
-%clean
-rm -rf %{buildroot}
-
 %pre
 getent group %{groupname} >/dev/null || groupadd -r %{groupname}
 getent passwd %{username} >/dev/null || \
@@ -137,7 +133,6 @@ fi
 #./spectrum_tests
 
 %files
-%defattr(-, root, root,-)
 %doc spectrum.cfg.example AUTHORS ChangeLog TODO COPYING
 %{python_sitelib}/spectrum*
 %attr(755, root, root) %{_bindir}/spectrumctl
@@ -155,6 +150,10 @@ fi
 %endif
 
 %changelog
+* Fri Apr 13 2012 Tom Callaway <spot at fedoraproject.org> - 1.4.8-7
+- rebuild for new ImageMagick
+- fix gcc 47 build issues
+
 * Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-6
 - Rebuilt for c++ ABI breakage
 


More information about the scm-commits mailing list