[swift] update to new upstream version 2.0-beta2

Jan Kaluža jkaluza at fedoraproject.org
Tue Oct 9 10:40:00 UTC 2012


commit a519f8dbd5964a836819f15e8357d48569fe288e
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Tue Oct 9 12:39:48 2012 +0200

    update to new upstream version 2.0-beta2
    
    - fix #857900 - swift binary renamed to swift-im

 sources                      |    2 +-
 swift-boost-filesystem.patch |   15 +-------------
 swift.desktop                |    2 +-
 swift.spec                   |   43 ++++++++++++++++++++++++++++++-----------
 4 files changed, 34 insertions(+), 28 deletions(-)
---
diff --git a/sources b/sources
index f19c341..f2420c8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a0254cd82e7910ffe2ca4815bebbd232  swift-2.0beta1.tar.gz
+6c328a66ccfed3e6b91f35dd4f5029b4  swift-2.0beta2.tar.gz
diff --git a/swift-boost-filesystem.patch b/swift-boost-filesystem.patch
index 6d84002..f7c8599 100644
--- a/swift-boost-filesystem.patch
+++ b/swift-boost-filesystem.patch
@@ -7,20 +7,7 @@ index 891978a..59c2d87 100644
  boost_conf_env = conf_env.Clone()
  boost_flags = {}
 -boost_flags["CPPDEFINES"] = [("BOOST_FILESYSTEM_VERSION", "2")]
-+boost_flags["CPPDEFINES"] = [("BOOST_FILESYSTEM_VERSION", "3")]
++#boost_flags["CPPDEFINES"] = [("BOOST_FILESYSTEM_VERSION", "2")]
  if env.get("boost_libdir", None) :
  	boost_flags["LIBPATH"] = [env["boost_libdir"]]
  if env.get("boost_includedir", None) :
-diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.cpp b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
-index 83320b2..e093926 100644
---- a/Swiften/FileTransfer/FileTransferManagerImpl.cpp
-+++ b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
-@@ -103,7 +103,7 @@ boost::optional<JID> FileTransferManagerImpl::highestPriorityJIDSupportingFileTr
- }
- 
- OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(const JID& to, const boost::filesystem::path& filepath, const std::string& description, boost::shared_ptr<ReadBytestream> bytestream) {
--	std::string filename = filepath.filename();
-+	std::string filename = filepath.filename().string();
- 	boost::uintmax_t sizeInBytes = boost::filesystem::file_size(filepath);
- 	boost::posix_time::ptime lastModified = boost::posix_time::from_time_t(boost::filesystem::last_write_time(filepath));
- 	return createOutgoingFileTransfer(to, filename, description, sizeInBytes, lastModified, bytestream);
diff --git a/swift.desktop b/swift.desktop
index 4cdc28e..a923324 100644
--- a/swift.desktop
+++ b/swift.desktop
@@ -8,6 +8,6 @@ Name=Swift
 GenericName=Jabber/XMPP Client
 Comment=Client for the Jabber/XMPP network
 Icon=swift
-Exec=swift
+Exec=swift-im
 Terminal=false
 Categories=Network;InstantMessaging;Qt;
diff --git a/swift.spec b/swift.spec
index 85ca623..80b1cac 100644
--- a/swift.spec
+++ b/swift.spec
@@ -1,9 +1,9 @@
-%define upstream_version swift-2.0beta1
+%define upstream_version swift-2.0beta2
 
 Summary: XMPP client
 Name: swift
 Version: 2.0
-Release: 0.2.beta1%{?dist}
+Release: 0.3.beta2%{?dist}
 Group: Applications/Internet
 License: GPLv3
 Source0: http://swift.im/downloads/releases/%{upstream_version}/%{upstream_version}.tar.gz
@@ -11,7 +11,6 @@ Source1: %{name}.desktop
 Patch0: swift-build.patch
 Patch1: swiften-libdirsuffix.patch
 Patch2: swift-no-cache-jid-prep.patch 
-Patch3: swiften-socks5.patch
 Patch4: swift-timeutc.patch
 Patch5: swift-boost-filesystem.patch
 URL: http://swift.im/
@@ -60,42 +59,55 @@ and performant C++ library for implementing XMPP applications.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
+# Only for Fedora > 17, because Fedora <= 17 has good glibc/boost combination
+# and this bug is not there.
+%if 0%{fedora} > 17
 %patch4 -p1
+%endif
 %patch5 -p1
 
 # Remove 3rd party libraries.
-find 3rdParty/Boost -delete
+find 3rdParty/Boost/src -delete
 find 3rdParty/SCons -delete
-find 3rdParty/Expat -delete
+find 3rdParty/Expat/src -delete
 find 3rdParty/LibIDN -delete
 find 3rdParty/SQLite -delete
 find 3rdParty/Lua -delete
 find 3rdParty/ZLib -delete
-find 3rdParty/CppUnit -delete
+
 find 3rdParty/LCov -delete
 find 3rdParty/OpenSSL -delete
 find 3rdParty/Snarl -delete
 find 3rdParty/LibMiniUPnPc -delete
 find 3rdParty/LibNATPMP -delete
-rm 3rdParty/hippomocks.h
+find 3rdParty/Breakpad/src -delete
+find 3rdParty/SQLiteAsync -delete
 # Swift fails to build with our docbook, but it's used only to generate
 # documentation at compile time, so it's not problem.
 #find 3rdParty/DocBook -delete 
 
+# HippoMocks  is needed just for unit tests and it's only one header
+# so we're not deleting it for now
+#find 3rdParty/HippoMocks -delete
+# CPPUnit is used only for unit tests, enabling it for now
+#find 3rdParty/CppUnit/src -delete
+
 echo 'qt="/usr"' > config.py
 # echo 'linkflags="-lpthread -lX11 -lQtDBus"' >> config.py
 # ccflags have to be a list, not string
-echo 'ccflags="%{optflags} -DBOOST_FILESYSTEM_VERSION=3".split(" ")' >> config.py
+echo 'ccflags="%{optflags}".split(" ")' >> config.py
 
 %build
 # rpmlint warns about buildroot here, but it's needed to put proper paths in the "swiften-config" binary.
 scons V=1 Swift Swiften swiften_dll=1 SWIFTEN_INSTALLDIR=%{buildroot}/usr SWIFTEN_LIBDIR=%{buildroot}/%{_libdir} %{?_smp_mflags}
+#cat config.log
+# ls -l /usr/include/boost
+# exit 1
 
 %install
 scons V=1 swiften_dll=1 SWIFTEN_INSTALLDIR=%{buildroot}/usr SWIFTEN_LIBDIR=%{buildroot}/%{_libdir} %{buildroot}/usr
-install -p -D -m 755 Swift/QtUI/swift \
-    %{buildroot}%{_bindir}/swift
+install -p -D -m 755 Swift/QtUI/swift-im \
+    %{buildroot}%{_bindir}/swift-im
 install -p -m 644 -D Swift/resources/logo/logo-icon-32.xpm \
     %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
 
@@ -104,6 +116,9 @@ desktop-file-install \
 --dir=%{buildroot}%{_datadir}/applications \
 %{SOURCE1}
 
+%check
+LD_LIBRARY_PATH=./Swiften scons V=1 %{?_smp_mflags} test=unit QA
+
 %post -n swiften -p /sbin/ldconfig
 
 %postun -n swiften -p /sbin/ldconfig
@@ -111,7 +126,7 @@ desktop-file-install \
 %files
 %defattr(-, root, root,-)
 %doc COPYING
-%{_bindir}/swift
+%{_bindir}/swift-im
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/pixmaps/%{name}.xpm
 
@@ -126,6 +141,10 @@ desktop-file-install \
 %{_libdir}/libSwiften.so
 
 %changelog
+* Tue Oct 09 2012 Jan Kaluza <jkaluza at redhat.com> - 2.0-0.3.beta2
+- update to new upstream version 2.0-beta2
+- fix #857900 - swift binary renamed to swift-im
+
 * Fri Aug 17 2012 Jan Kaluza <jkaluza at redhat.com> - 2.0-0.2.beta1
 - fix building with new boost filesystem
 


More information about the scm-commits mailing list