Add upstream patches to use js rather than xulrunner, Cleanup spec for latest updates and remove obsolete bits

This commit is contained in:
Peter Robinson 2012-02-27 15:45:56 +00:00
parent 9c67eb0ddf
commit a677a0c37c
5 changed files with 55 additions and 45 deletions

6
.gitignore vendored
View File

@ -1,5 +1 @@
libproxy-0.4.4.tar.gz
/libproxy-0.4.5.tar.gz
/libproxy-0.4.6.tar.gz
/libproxy-0.4.7svn20110412.tar.gz
/libproxy-0.4.7.tar.gz
/libproxy-0.*.tar.gz

View File

@ -0,0 +1,29 @@
--- libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk.orig 2012-02-26 18:58:07.249934499 +0000
+++ libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk 2012-02-26 18:59:30.989922729 +0000
@@ -7,19 +7,15 @@
include_directories("${MOZJS_INCLUDE_DIR}")
endif()
elseif(NOT APPLE)
- set(MOZJS_SEARCH_ORDER "mozilla-js;xulrunner-js;firefox-js;seamonkey-js" CACHE STRING "MozJS search order")
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- foreach(MOZJSLIB ${MOZJS_SEARCH_ORDER})
- pkg_search_module(MOZJS ${MOZJSLIB}>=2.0b12)
- if(MOZJS_FOUND)
- include_directories(${MOZJS_INCLUDE_DIRS})
- link_directories(${MOZJS_LIBRARY_DIRS})
- break()
- else()
- set(MOZJS_FOUND 0)
- endif()
- endforeach()
+ pkg_search_module(MOZJS mozjs185>=1.8.5)
+ if(MOZJS_FOUND)
+ include_directories(${MOZJS_INCLUDE_DIRS})
+ link_directories(${MOZJS_LIBRARY_DIRS})
+ else()
+ set(MOZJS_FOUND 0)
+ endif()
else()
set(MOZJS_FOUND 0)
endif()

View File

@ -0,0 +1,11 @@
--- libproxy-0.4.7/libproxy/url.cpp.orig 2012-02-26 19:04:10.670952501 +0000
+++ libproxy-0.4.7/libproxy/url.cpp 2012-02-26 19:04:54.474963813 +0000
@@ -446,7 +446,7 @@
/* Check for correct mime type and content length */
for (line = recvline(sock) ; line != "\r" && line != "" ; line = recvline(sock)) {
// Check for chunked encoding
- if (line.find("Content-Transfer-Encoding: chunked") == 0)
+ if (line.find("Content-Transfer-Encoding: chunked") == 0 || line.find("Transfer-Encoding: chunked") == 0)
chunked = true;
// Check for content length

View File

@ -1,12 +0,0 @@
diff -up libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk.xul libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk
--- libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk.xul 2011-03-22 23:54:22.000000000 +0100
+++ libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk 2011-04-12 15:28:55.235341002 +0200
@@ -11,7 +11,7 @@ elseif(NOT APPLE)
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
foreach(MOZJSLIB ${MOZJS_SEARCH_ORDER})
- pkg_search_module(MOZJS ${MOZJSLIB}>=2.0b12)
+ pkg_search_module(MOZJS ${MOZJSLIB} >=2.0 )
if(MOZJS_FOUND)
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})

View File

@ -1,40 +1,30 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
#0 to bootstrap libproxy circle dependencies - 1 normal case
%if 1
%if 0%{?fedora} > 14
%global gecko_version 2.0
%global _with_webkitgtk3 1
%global _with_gnome3 1
%else
%global gecko_version 1.9.2
%global _with_webkit 1
%endif
%global _with_mozjs 1
%global _with_gnome 1
%global _with_kde 1
%global _with_networkmanager 1
%endif
%global _with_python 1
#global svn svn20110412
%endif
Name: libproxy
Version: 0.4.7
Release: 3%{?svn}%{?dist}
Release: 4%{?svn}%{?dist}
Summary: A library handling all the details of proxy configuration
Group: System Environment/Libraries
License: LGPLv2+
URL: http://code.google.com/p/libproxy/
Source0: http://libproxy.googlecode.com/files/libproxy-%{version}%{?svn}.tar.gz
Patch0: libproxy-0.4.7-xul2.0.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{?_with_python:BuildRequires: python-devel}
%if 0%{?fedora} > 14
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
BuildRequires: python-devel
BuildRequires: libmodman-devel >= 2.0.1
%endif
BuildRequires: cmake >= 2.6.0
# gnome
@ -43,14 +33,10 @@ BuildRequires: GConf2-devel
BuildRequires: libXmu-devel
}
# mozjs
%{?_with_mozjs:BuildRequires: gecko-devel >= %{gecko_version}}
%{?_with_mozjs:BuildRequires: js-devel}
# NetworkManager
%{?_with_networkmanager:
BuildRequires: NetworkManager-devel
%if 0%{?fedora} < 15
#NM nm-version.h , uneeded with later Fedora
BuildRequires: NetworkManager-glib-devel
%endif
BuildRequires: dbus-devel
}
# webkit (gtk)
@ -187,8 +173,8 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .xul2
%patch0 -p1 -b .js185
%patch1 -p1 -b .url-pac
%build
%{cmake} \
@ -202,7 +188,6 @@ make VERBOSE=1 %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
#In case all modules are disabled
@ -212,9 +197,6 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/modules
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -288,6 +270,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Feb 27 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-4
- Add upstream patches to use js rather than xulrunner
- Cleanup spec for latest updates and remove obsolete bits
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild