[fawkes] Add patch and rebuild for new libmicrohttpd

Tim Niemueller timn at fedoraproject.org
Mon Nov 8 16:48:42 UTC 2010


commit e2ed19b32ab0d62083cad01fc455663821eb4820
Author: Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:   Mon Nov 8 11:48:29 2010 -0500

    Add patch and rebuild for new libmicrohttpd

 .gitignore                     |    3 ++
 fawkes-0.4-libmicrohttpd.patch |   71 ++++++++++++++++++++++++++++++++++++++++
 fawkes.spec                    |    7 +++-
 3 files changed, 80 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cc7c47f..49bce20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
 /fawkes-0.4.tar.bz2
 /fawkes-0.4
 .build*
+/*.src.rpm
+/noarch
+/x86_64
diff --git a/fawkes-0.4-libmicrohttpd.patch b/fawkes-0.4-libmicrohttpd.patch
new file mode 100644
index 0000000..9694150
--- /dev/null
+++ b/fawkes-0.4-libmicrohttpd.patch
@@ -0,0 +1,71 @@
+From 970defc9fed04ddf12845680366077bef0732631 Mon Sep 17 00:00:00 2001
+From: Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
+Date: Sun, 7 Nov 2010 20:32:57 -0500
+Subject: [PATCH] libfawkeswebview: libmicrohttpd 0.9.2 compatibility
+
+---
+ src/libs/webview/request_dispatcher.cpp |   18 +++++++++++-------
+ src/libs/webview/request_dispatcher.h   |    3 ---
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/libs/webview/request_dispatcher.cpp b/src/libs/webview/request_dispatcher.cpp
+index 8b3b8fe..a322f10 100644
+--- a/src/libs/webview/request_dispatcher.cpp
++++ b/src/libs/webview/request_dispatcher.cpp
+@@ -94,9 +94,13 @@ WebRequestDispatcher::process_request_cb(void *callback_data,
+  * @param max maximum number of bytes that can be put in buf
+  * @return suitable libmicrohttpd return code
+  */
+-int
+-WebRequestDispatcher::dynamic_reply_data_cb(void *reply,
+-					    uint64_t pos, char *buf, int max)
++#if MHD_VERSION >= 0x00090200
++static ssize_t
++dynamic_reply_data_cb(void *reply, uint64_t pos, char *buf, size_t max)
++#else
++static int
++dynamic_reply_data_cb(void *reply, uint64_t pos, char *buf, int max)
++#endif
+ {
+   DynamicWebReply *dreply = static_cast<DynamicWebReply *>(reply);
+   return dreply->next_chunk(pos, buf, max);
+@@ -106,8 +110,8 @@ WebRequestDispatcher::dynamic_reply_data_cb(void *reply,
+ /** Callback to free dynamic web reply.
+  * @param reply Instance of DynamicWebReply to free.
+  */
+-void
+-WebRequestDispatcher::dynamic_reply_free_cb(void *reply)
++static void
++dynamic_reply_free_cb(void *reply)
+ {
+   DynamicWebReply *dreply = static_cast<DynamicWebReply *>(reply);
+   delete dreply;
+@@ -236,9 +240,9 @@ WebRequestDispatcher::process_request(struct MHD_Connection * connection,
+       } else if (dreply) {
+ 	response = MHD_create_response_from_callback(dreply->size(),
+ 						     dreply->chunk_size(),
+-						     WebRequestDispatcher::dynamic_reply_data_cb,
++						     dynamic_reply_data_cb,
+ 						     dreply,
+-						     WebRequestDispatcher::dynamic_reply_free_cb);
++						     dynamic_reply_free_cb);
+ 	ret = MHD_queue_response (connection, dreply->code(), response);
+ 	MHD_destroy_response (response);
+       } else {
+diff --git a/src/libs/webview/request_dispatcher.h b/src/libs/webview/request_dispatcher.h
+index 79ed82f..bff1264 100644
+--- a/src/libs/webview/request_dispatcher.h
++++ b/src/libs/webview/request_dispatcher.h
+@@ -58,9 +58,6 @@ class WebRequestDispatcher
+ 				size_t *upload_data_size,
+ 				void  **session_data);
+ 
+-  static int  dynamic_reply_data_cb(void *reply, uint64_t pos, char *buf, int max);
+-  static void dynamic_reply_free_cb(void *reply);
+-
+   int queue_static_reply(struct MHD_Connection * connection,
+ 			 StaticWebReply *sreply);
+   int process_request(struct MHD_Connection * connection,
+-- 
+1.7.2.3
+
diff --git a/fawkes.spec b/fawkes.spec
index c29c3d6..0b2f08b 100644
--- a/fawkes.spec
+++ b/fawkes.spec
@@ -1,6 +1,6 @@
 Name:           fawkes
 Version:        0.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Robot Software Framework
 
 Group:          Applications/System
@@ -11,6 +11,7 @@ Patch0:         fawkes-0.4-userconf.patch
 Patch1:         fawkes-0.4-man-pages.patch
 Patch2:         fawkes-0.4-docs.patch
 Patch3:         fawkes-0.4-desktop-files.patch
+Patch4:         fawkes-0.4-libmicrohttpd.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gcc-c++
@@ -305,6 +306,7 @@ common Lua modules.
 %patch1 -p1 -b .man-pages
 %patch2 -p1 -b .docs
 %patch3 -p1 -b .desktop-files
+%patch4 -p1 -b .libmicrohttpd
 
 
 %build
@@ -555,6 +557,9 @@ rm -rf %{buildroot}
 %{_datadir}/doc/%{name}-%{version}
 
 %changelog
+* Mon Nov 08 2010 Tim Niemueller <tim at niemueller.de> - 0.4-6
+- Add patch and rebuild for new libmicrohttpd
+
 * Sat Nov 06 2010 Tim Niemueller <tim at niemueller.de> - 0.4-5
 - Sub-packages should not depend on main package if not necessary
 


More information about the scm-commits mailing list