[pan] Added patch to build with recent glib

Robert Scheck robert at fedoraproject.org
Sun Jan 15 20:22:17 UTC 2012


commit b3a47a4a694a39f6c788ccbb465f327b95ab2f64
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Sun Jan 15 21:22:07 2012 +0100

    Added patch to build with recent glib

 pan-0.133-gcc44.patch |   55 -----------------
 pan-0.135-glib.patch  |  154 +++++++++++++++++++++++++++++++++++++++++++++++++
 pan.spec              |    2 +
 3 files changed, 156 insertions(+), 55 deletions(-)
---
diff --git a/pan-0.135-glib.patch b/pan-0.135-glib.patch
new file mode 100644
index 0000000..b93ca95
--- /dev/null
+++ b/pan-0.135-glib.patch
@@ -0,0 +1,154 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for pan >= 0.135 which removes direct
+include directives of some glib includes. A recent glib, such as 2.31.6 in Fedora 17+, is
+going to complain "Only <glib.h> can be included directly." and building pan will fail.
+
+--- pan-0.135/pan/data/article-cache.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/data/article-cache.h.glib		2012-01-15 20:23:28.000000000 +0100
+@@ -23,7 +23,7 @@
+ #include <map>
+ #include <vector>
+ extern "C" {
+-  #include <glib/gtypes.h> // for guint64
++  #include <glib.h> // for guint64
+ }
+ #include <pan/general/string-view.h>
+ #include <pan/general/quark.h>
+--- pan-0.135/pan/data-impl/data-impl.cc		2011-05-29 15:19:51.000000000 +0200
++++ pan-0.135/pan/data-impl/data-impl.cc.glib		2012-01-15 21:05:44.000000000 +0100
+@@ -24,7 +24,7 @@
+ #include <config.h>
+ extern "C" {
+   #include <glib/gi18n.h>
+-  #include <glib/gfileutils.h> // for g_build_filename
++  #include <glib.h> // for g_build_filename
+ }
+ #include <pan/general/debug.h>
+ #include <pan/general/file-util.h>
+--- pan-0.135/pan/general/file-util.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/file-util.h.glib		2012-01-15 20:26:59.000000000 +0100
+@@ -25,7 +25,7 @@
+ extern "C" {
+   #include <stddef.h>
+   #include <stdio.h>
+-  #include <glib/gtypes.h>
++  #include <glib.h>
+   #include <glib/gstdio.h>
+ }
+ #include <pan/general/string-view.h>
+--- pan-0.135/pan/general/locking.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/locking.h.glib		2012-01-15 20:26:00.000000000 +0100
+@@ -22,7 +22,7 @@
+ #ifndef _Mutex_h_
+ #define _Mutex_h_
+ 
+-#include <glib/gthread.h>
++#include <glib.h>
+ 
+ namespace pan
+ {
+--- pan-0.135/pan/general/macros.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/macros.h.glib			2012-01-15 20:42:05.000000000 +0100
+@@ -62,15 +62,7 @@
+ 
+ extern "C"
+ {
+-  #include <glibconfig.h> // get the version
+-  #include <glib/gutils.h> // get GLIB_CHECK_VERSION
+-
+-  // pick up g_assert()
+-  #if GLIB_CHECK_VERSION(2,16,0)
+-    #include <glib/gtestutils.h>
+-  #else
+-    #include <glib/gmessages.h>
+-  #endif
++  #include <glib.h> // pick up g_assert()
+ }
+ 
+ #endif
+--- pan-0.135/pan/general/time-elapsed.h		2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/time-elapsed.h.glib		2012-01-15 20:23:05.000000000 +0100
+@@ -1,9 +1,7 @@
+ #ifndef __Time_Elapsed_h__
+ #define __Time_Elapsed_h__
+ 
+-#include <glib/gtypes.h> // for GTimeVal
+-#include <glib/gmain.h> // for g_get_current_time
+-#include <glib/gtimer.h> // for GUSEC_PER_SEC
++#include <glib.h> // for GTimeVal, g_get_current_time and GUSEC_PER_SEC
+ 
+ namespace pan
+ {
+--- pan-0.135/pan/general/worker-pool.cc		2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/worker-pool.cc.glib		2012-01-15 20:24:35.000000000 +0100
+@@ -21,7 +21,7 @@
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+ #include <cassert>
+-#include <glib/gmain.h> // for g_idle_add
++#include <glib.h> // for g_idle_add
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include "worker-pool.h"
+--- pan-0.135/pan/general/worker-pool.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/general/worker-pool.h.glib		2012-01-15 20:39:56.000000000 +0100
+@@ -24,8 +24,7 @@
+ #define _Worker_Pool_H_
+ 
+ #include <set>
+-#include <glib/gtypes.h>
+-#include <glib/gthreadpool.h>
++#include <glib.h>
+ 
+ namespace pan
+ {
+--- pan-0.135/pan/gui/render-bytes.cc			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/gui/render-bytes.cc.glib		2012-01-15 20:24:06.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <glib/gutils.h> // g_snprintf
++#include <glib.h> // g_snprintf
+ #include "render-bytes.h"
+ 
+ namespace pan
+--- pan-0.135/pan/gui/render-bytes.h			2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/gui/render-bytes.h.glib		2012-01-15 20:23:35.000000000 +0100
+@@ -1,6 +1,6 @@
+ #ifndef RENDER_BYTES_H
+ #define RENDER_BYTES_H
+-#include <glib/gtypes.h>
++#include <glib.h>
+ namespace pan {
+   extern char* render_bytes (guint64);
+ }
+--- pan-0.135/pan/tasks/socket-impl-gio.h		2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/tasks/socket-impl-gio.h.glib		2012-01-15 21:00:12.000000000 +0100
+@@ -21,8 +21,7 @@
+ #define __SocketGIO_h__
+ 
+ #include <string>
+-#include <glib/giochannel.h>
+-#include <glib/gstring.h>
++#include <glib.h>
+ #include <pan/tasks/socket.h>
+ 
+ namespace pan
+--- pan-0.135/pan/usenet-utils/mime-utils.h		2011-02-15 11:46:29.000000000 +0100
++++ pan-0.135/pan/usenet-utils/mime-utils.h.glib	2012-01-15 20:23:23.000000000 +0100
+@@ -21,7 +21,7 @@
+ #define _UtilMime_h_
+ 
+ #include <vector>
+-#include <glib/gtypes.h>
++#include <glib.h>
+ #include <gmime/gmime-filter.h>
+ #include <gmime/gmime-stream.h>
+ #include <gmime/gmime-message.h>
+--- pan-0.135/pan/usenet-utils/text-massager.cc		2011-05-29 15:19:51.000000000 +0200
++++ pan-0.135/pan/usenet-utils/text-massager.cc.glib	2012-01-15 20:50:02.000000000 +0100
+@@ -25,7 +25,6 @@
+ extern "C" {
+ #include <glib/gi18n.h>
+ }
+-#include <glib/gunicode.h>
+ #include "text-massager.h"
+ #include <pan/general/log.h>
+ using namespace pan;
diff --git a/pan.spec b/pan.spec
index ec6560c..635f12b 100644
--- a/pan.spec
+++ b/pan.spec
@@ -6,6 +6,7 @@ Epoch:		1
 License:	GPLv2
 Group:		Applications/Internet
 Source0:	http://pan.rebelbase.com/download/releases/%{version}/source/%{name}-%{version}.tar.bz2
+Patch0:		pan-0.135-glib.patch
 URL:		http://pan.rebelbase.com/
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	desktop-file-utils
@@ -24,6 +25,7 @@ Net-Keeping Seal of Approval evaluations.
 
 %prep
 %setup -q
+%patch0 -p1 -b .glib
 
 sed -i -e 's|StartupNotify=false|StartupNotify=true|' %{name}.desktop.in
 


More information about the scm-commits mailing list