From bc35396fdebd2aab01ead4ffd170d1c2fd09f3ca Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 28 Feb 2012 23:10:07 +0000 Subject: [PATCH] fix FTBFS on F-17+ gcc 4.7 --- libproxy-0.4.7-js185.patch | 2 +- libproxy-0.4.7-unistd.patch | 40 +++++++++++++++++++++++++++++++++++++ libproxy-0.4.7-webkit.patch | 11 ++++++++++ libproxy.spec | 7 ++++++- 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 libproxy-0.4.7-unistd.patch create mode 100644 libproxy-0.4.7-webkit.patch diff --git a/libproxy-0.4.7-js185.patch b/libproxy-0.4.7-js185.patch index 4eb5bf3..b13dba1 100644 --- a/libproxy-0.4.7-js185.patch +++ b/libproxy-0.4.7-js185.patch @@ -17,7 +17,7 @@ - set(MOZJS_FOUND 0) - endif() - endforeach() -+ pkg_search_module(MOZJS mozjs185>=1.8.5) ++ pkg_search_module(MOZJS mozjs185) + if(MOZJS_FOUND) + include_directories(${MOZJS_INCLUDE_DIRS}) + link_directories(${MOZJS_LIBRARY_DIRS}) diff --git a/libproxy-0.4.7-unistd.patch b/libproxy-0.4.7-unistd.patch new file mode 100644 index 0000000..803f819 --- /dev/null +++ b/libproxy-0.4.7-unistd.patch @@ -0,0 +1,40 @@ +--- libproxy-0.4.7/libproxy/url.cpp.orig 2012-02-28 21:05:15.572948027 +0000 ++++ libproxy-0.4.7/libproxy/url.cpp 2012-02-28 21:05:45.635937474 +0000 +@@ -27,6 +27,7 @@ + #define close _close + #endif + #include // For ::open() ++#include // For ::read() and ::close() + #include // For memcpy() + #include // For int/string conversion (using stringstream) + #include // For sscanf() +--- libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp.orig 2012-02-28 21:06:01.552943358 +0000 ++++ libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp 2012-02-28 21:11:21.429953982 +0000 +@@ -18,6 +18,7 @@ + ******************************************************************************/ + + #include ++#include + #include + #include + #include +--- libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp.orig 2012-02-28 21:06:11.637943033 +0000 ++++ libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp 2012-02-28 21:11:46.560961409 +0000 +@@ -17,6 +17,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ******************************************************************************/ + ++#include // for ::gethostname() + #include // ? + + #include "../extension_pacrunner.hpp" +--- libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp.orig 2012-02-28 21:06:29.615943614 +0000 ++++ libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp 2012-02-28 21:12:35.530965553 +0000 +@@ -17,6 +17,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ******************************************************************************/ + ++#include // for ::gethostname() + #include "../extension_pacrunner.hpp" + using namespace libproxy; + diff --git a/libproxy-0.4.7-webkit.patch b/libproxy-0.4.7-webkit.patch new file mode 100644 index 0000000..63c9cef --- /dev/null +++ b/libproxy-0.4.7-webkit.patch @@ -0,0 +1,11 @@ +--- libproxy-0.4.7/libproxy/cmake/modules/pacrunner_webkit.cmk.orig 2012-02-28 09:15:55.160816707 +0000 ++++ libproxy-0.4.7/libproxy/cmake/modules/pacrunner_webkit.cmk 2012-02-28 09:16:25.314819274 +0000 +@@ -13,7 +13,7 @@ + endif() + else() + if(WITH_WEBKIT3) +- px_check_modules(WEBKIT webkitgtk-3.0) ++ px_check_modules(WEBKIT webkitgtk-3.0 javascriptcoregtk-3.0) + else() + px_check_modules(WEBKIT webkit-1.0) + endif() diff --git a/libproxy.spec b/libproxy.spec index 7779fa5..1ebb56f 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -22,6 +22,8 @@ URL: http://code.google.com/p/libproxy/ Source0: http://libproxy.googlecode.com/files/libproxy-%{version}%{?svn}.tar.gz Patch0: libproxy-0.4.7-js185.patch Patch1: libproxy-0.4.7-url-pac.patch +Patch2: libproxy-0.4.7-webkit.patch +Patch3: libproxy-0.4.7-unistd.patch BuildRequires: python-devel BuildRequires: libmodman-devel >= 2.0.1 @@ -175,14 +177,16 @@ developing applications that use %{name}. %setup -q %patch0 -p1 -b .js185 %patch1 -p1 -b .url-pac +%patch2 -p1 -b .webkit +%patch3 -p1 -b .unistd %build %{cmake} \ - -DLIBEXEC_INSTALL_DIR=%{_libexecdir} \ -DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \ -DWITH_PERL=OFF \ %{!?_with_gnome3:-DWITH_GNOME3=OFF}\ %{?_with_webkitgtk3:-DWITH_WEBKIT3=ON}\ + %{?_with_mozjs:-DWITH_MOZJS=ON}\ . make VERBOSE=1 %{?_smp_mflags} @@ -272,6 +276,7 @@ make test %changelog * Mon Feb 27 2012 Peter Robinson - 0.4.7-4 - Add upstream patches to use js rather than xulrunner +- Add patch to fix FTBFS on gcc 4.7 - Cleanup spec for latest updates and remove obsolete bits * Fri Jan 13 2012 Fedora Release Engineering - 0.4.7-3