From cf2cbc0fbd1939ef7ab333a01da40bdc888350bea8bda020d70bd5f19be62ab3 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 18 Mar 2010 22:49:10 +0000 Subject: [PATCH] Accepting request 35236 from GNOME:Factory checked in (request 35236) OBS-URL: https://build.opensuse.org/request/show/35236 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libproxy?expand=0&rev=42 --- libproxy-0.4.0.tar.bz2 | 4 +-- libproxy-gcc45.patch | 68 ++++++++++++++++++++++++++++++++++++++ libproxy-libexecpath.patch | 13 ++++++++ libproxy-pkgconfig.patch | 13 ++++++++ libproxy-plugins.changes | 8 ----- libproxy-plugins.spec | 30 ++++++++++------- libproxy-pysitelib.patch | 13 ++++++++ libproxy.changes | 8 ----- libproxy.spec | 30 ++++++++++------- 9 files changed, 145 insertions(+), 42 deletions(-) create mode 100644 libproxy-gcc45.patch create mode 100644 libproxy-libexecpath.patch create mode 100644 libproxy-pkgconfig.patch create mode 100644 libproxy-pysitelib.patch diff --git a/libproxy-0.4.0.tar.bz2 b/libproxy-0.4.0.tar.bz2 index b181b32..4ef5056 100644 --- a/libproxy-0.4.0.tar.bz2 +++ b/libproxy-0.4.0.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7219863f17b5f203d934b8a95191ea344dca475f32b5c2fb13c619f9af22469c -size 403779 +oid sha256:6d45dea80cdba266e874284c4f6bcd919d99d18ace62da2fd53c4e9ab04621d4 +size 58637 diff --git a/libproxy-gcc45.patch b/libproxy-gcc45.patch new file mode 100644 index 0000000..9972b01 --- /dev/null +++ b/libproxy-gcc45.patch @@ -0,0 +1,68 @@ +Index: libproxy/url.cpp +=================================================================== +--- libproxy/url.cpp.orig ++++ libproxy/url.cpp +@@ -95,11 +95,11 @@ url::url(const string url) throw(parse_e + // Break apart our url into 4 sections: scheme, auth (user/pass), host and path + // We'll do further parsing of auth and host a bit later + // NOTE: reset the unused variable after each scan or we get bleed-through +- if (sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]/%s", schm, auth, host, path) != 4 && !((*path = NULL)) && // URL with auth, host and path +- sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]", schm, auth, host) != 3 && !((*auth = NULL)) && // URL with auth, host +- sscanf(url.c_str(), "%[^:]://%[^/]/%s", schm, host, path) != 3 && !((*path = NULL)) && // URL with host, path +- sscanf(url.c_str(), "%[^:]://%[^/]", schm, host) != 2 && !((*host = NULL)) && // URL with host +- !(sscanf(url.c_str(), "%[^:]://%s", schm, path) == 2 && string("file") == schm) && !((*path = NULL)) && // URL with path (ex: file:///foo) ++ if (sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]/%s", schm, auth, host, path) != 4 && !((*path = '\0')) && // URL with auth, host and path ++ sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]", schm, auth, host) != 3 && !((*auth = '\0')) && // URL with auth, host ++ sscanf(url.c_str(), "%[^:]://%[^/]/%s", schm, host, path) != 3 && !((*path = '\0')) && // URL with host, path ++ sscanf(url.c_str(), "%[^:]://%[^/]", schm, host) != 2 && !((*host = '\0')) && // URL with host ++ !(sscanf(url.c_str(), "%[^:]://%s", schm, path) == 2 && string("file") == schm) && !((*path = '\0')) && // URL with path (ex: file:///foo) + !(sscanf(url.c_str(), "%[^:]://", schm) == 1 && (string("direct") == schm || string("wpad") == schm))) // URL with scheme-only (ex: wpad://, direct://) + { + delete schm; +@@ -112,8 +112,8 @@ url::url(const string url) throw(parse_e + // Set scheme and path + this->scheme = schm; + this->path = *path ? string("/") + path : ""; +- *schm = NULL; +- *path = NULL; ++ *schm = '\0'; ++ *path = '\0'; + + // Parse auth further + if (*auth) { +@@ -122,7 +122,7 @@ url::url(const string url) throw(parse_e + this->pass = this->user.substr(this->user.find(":")+1); + this->user = this->user.substr(0, this->user.find(":")); + } +- *auth = NULL; ++ *auth = '\0'; + } + + // Parse host further. Basically, we're looking for a port. +@@ -142,7 +142,7 @@ url::url(const string url) throw(parse_e + } + + this->host = host; +- *host = NULL; ++ *host = '\0'; + } + + // Cleanup +@@ -235,7 +235,7 @@ sockaddr const* const* url::get_ips(bool + // Check DNS for IPs + struct addrinfo* info; + struct addrinfo flags; +- memset(&flags, NULL, sizeof(addrinfo)); ++ memset(&flags, '\0', sizeof(addrinfo)); + flags.ai_family = AF_UNSPEC; + flags.ai_socktype = 0; + flags.ai_protocol = 0; +@@ -254,7 +254,7 @@ sockaddr const* const* url::get_ips(bool + + // Create our array since we actually have a result + this->ips = new sockaddr*[++i]; +- memset(this->ips, NULL, sizeof(sockaddr*)*i); ++ memset(this->ips, '\0', sizeof(sockaddr*)*i); + + // Copy the sockaddr's into this->ips + for (i = 0, info = first ; info ; info = info->ai_next) { diff --git a/libproxy-libexecpath.patch b/libproxy-libexecpath.patch new file mode 100644 index 0000000..94cfba6 --- /dev/null +++ b/libproxy-libexecpath.patch @@ -0,0 +1,13 @@ +Index: libproxy-0.4.0/CMakeLists.txt +=================================================================== +--- libproxy-0.4.0.orig/CMakeLists.txt ++++ libproxy-0.4.0/CMakeLists.txt +@@ -38,7 +38,7 @@ if(${WIN32}) + else() + set(rlibdir lib${LIB_SUFFIX}/) + set(rmoduledir ${rlibdir}/${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_VERSION}/modules/) +- set(rlibexecdir libexec/) ++ set(rlibexecdir lib/${CMAKE_PROJECT_NAME}) + set(rbindir bin/) + set(rincludedir include/) + endif() diff --git a/libproxy-pkgconfig.patch b/libproxy-pkgconfig.patch new file mode 100644 index 0000000..814b695 --- /dev/null +++ b/libproxy-pkgconfig.patch @@ -0,0 +1,13 @@ +Index: libproxy-0.4.0/libproxy/CMakeLists.txt +=================================================================== +--- libproxy-0.4.0.orig/libproxy/CMakeLists.txt ++++ libproxy-0.4.0/libproxy/CMakeLists.txt +@@ -137,7 +137,7 @@ message("") + + ### Misc files + # PkgConfig file +-if(NOT ${WIN32}) ++if(NOT WIN32) + configure_file(libproxy-1.0.pc.in libproxy-1.0.pc @ONLY) + install(FILES libproxy-1.0.pc DESTINATION ${libdir}/pkgconfig) + endif() diff --git a/libproxy-plugins.changes b/libproxy-plugins.changes index f66716a..5ac1e3a 100644 --- a/libproxy-plugins.changes +++ b/libproxy-plugins.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 15 07:01:20 UTC 2010 - dimstar@opensuse.org - -- Update to svn snapshot 621 in order to fix some serious crashes - in config_gnome. This is close to what will be the 0.4.1 release. -- Drop all patches as they came from upstream and are included - in this snapshot already. - ------------------------------------------------------------------- Wed Mar 10 10:41:45 UTC 2010 - dimstar@opensuse.org diff --git a/libproxy-plugins.spec b/libproxy-plugins.spec index afaeba9..4c528e5 100644 --- a/libproxy-plugins.spec +++ b/libproxy-plugins.spec @@ -37,6 +37,14 @@ Version: 0.4.0 Release: 3 Source: http://libproxy.googlecode.com/files/%{_name}-%{version}.tar.bz2 Source99: baselibs.conf +# PATCH-FIX-UPSTREAM libproxy-pysitelib.patch dimstar@opensuse.org -- The bindings are arch-independent to be installed +Patch0: libproxy-pysitelib.patch +# PATCH-FIX-UPSTREAM libproxy-libexecpatch.patch dimstar@opensuse.org -- Use proper libexecdir +Patch1: libproxy-libexecpath.patch +# PATCH-FIX-UPSTREAM libproxy-pkgconfig.patch dimstar@opensuse.org -- Install pkgconfig files, taken from upstream svn. +Patch2: libproxy-pkgconfig.patch +# PATCH-FIX-UPSTREAM libproxy-gcc45.patch dimstar@opensuse.org -- Fix build with gcc 4.5, taken from upstream svn. +Patch3: libproxy-gcc45.patch License: LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -259,21 +267,21 @@ about network configuration changes. %prep %setup -q -n %{_name}-%{version} -mkdir build +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p0 %build -cd build -cmake \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -Dlibdir=%{_libdir} \ - -Dlibexecdir=%{_libexecdir}/libproxy \ - -Ddatadir=%{_datadir} \ - -Dmoduledir=%{_libdir}/libproxy/%{version}/modules \ -.. +cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +%ifarch x86_64 +-DLIB_SUFFIX=64 \ +%endif +. +# THAT DOT BELONGS TO THE CMAKE CALL %{__make} %{?jobs:-j%jobs} %install -cd build %makeinstall %if %build_core_not_modules # Build the basic directory structure for the modules so we can @@ -289,7 +297,6 @@ rm %{buildroot}%{_libdir}/libproxy.so* rm %{buildroot}%{_libdir}/libmodman.so* rm %{buildroot}%{python_sitelib}/*.py rm %{buildroot}%{_libdir}/pkgconfig/libproxy-1.0.pc -rm %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake %endif %if %build_core_not_modules @@ -326,7 +333,6 @@ rm %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/libproxy-1.0.pc -%{_datadir}/cmake/Modules/Findlibproxy.cmake %files -n python-libproxy %defattr(-, root, root) diff --git a/libproxy-pysitelib.patch b/libproxy-pysitelib.patch new file mode 100644 index 0000000..b541a0d --- /dev/null +++ b/libproxy-pysitelib.patch @@ -0,0 +1,13 @@ +Index: libproxy-0.4.0/bindings/CMakeLists.txt +=================================================================== +--- libproxy-0.4.0.orig/bindings/CMakeLists.txt ++++ libproxy-0.4.0/bindings/CMakeLists.txt +@@ -3,7 +3,7 @@ find_package(PythonInterp) + if(PYTHONINTERP_FOUND) + execute_process(COMMAND + ${PYTHON_EXECUTABLE} +- -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(plat_specific=1)" ++ -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(plat_specific=0)" + OUTPUT_VARIABLE pysitepkgdir + OUTPUT_STRIP_TRAILING_WHITESPACE) + install(FILES libproxy.py DESTINATION ${pysitepkgdir}) diff --git a/libproxy.changes b/libproxy.changes index f66716a..5ac1e3a 100644 --- a/libproxy.changes +++ b/libproxy.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 15 07:01:20 UTC 2010 - dimstar@opensuse.org - -- Update to svn snapshot 621 in order to fix some serious crashes - in config_gnome. This is close to what will be the 0.4.1 release. -- Drop all patches as they came from upstream and are included - in this snapshot already. - ------------------------------------------------------------------- Wed Mar 10 10:41:45 UTC 2010 - dimstar@opensuse.org diff --git a/libproxy.spec b/libproxy.spec index bea28f6..871336e 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -37,6 +37,14 @@ Version: 0.4.0 Release: 3 Source: http://libproxy.googlecode.com/files/%{_name}-%{version}.tar.bz2 Source99: baselibs.conf +# PATCH-FIX-UPSTREAM libproxy-pysitelib.patch dimstar@opensuse.org -- The bindings are arch-independent to be installed +Patch0: libproxy-pysitelib.patch +# PATCH-FIX-UPSTREAM libproxy-libexecpatch.patch dimstar@opensuse.org -- Use proper libexecdir +Patch1: libproxy-libexecpath.patch +# PATCH-FIX-UPSTREAM libproxy-pkgconfig.patch dimstar@opensuse.org -- Install pkgconfig files, taken from upstream svn. +Patch2: libproxy-pkgconfig.patch +# PATCH-FIX-UPSTREAM libproxy-gcc45.patch dimstar@opensuse.org -- Fix build with gcc 4.5, taken from upstream svn. +Patch3: libproxy-gcc45.patch License: LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -259,21 +267,21 @@ about network configuration changes. %prep %setup -q -n %{_name}-%{version} -mkdir build +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p0 %build -cd build -cmake \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -Dlibdir=%{_libdir} \ - -Dlibexecdir=%{_libexecdir}/libproxy \ - -Ddatadir=%{_datadir} \ - -Dmoduledir=%{_libdir}/libproxy/%{version}/modules \ -.. +cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +%ifarch x86_64 +-DLIB_SUFFIX=64 \ +%endif +. +# THAT DOT BELONGS TO THE CMAKE CALL %{__make} %{?jobs:-j%jobs} %install -cd build %makeinstall %if %build_core_not_modules # Build the basic directory structure for the modules so we can @@ -289,7 +297,6 @@ rm %{buildroot}%{_libdir}/libproxy.so* rm %{buildroot}%{_libdir}/libmodman.so* rm %{buildroot}%{python_sitelib}/*.py rm %{buildroot}%{_libdir}/pkgconfig/libproxy-1.0.pc -rm %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake %endif %if %build_core_not_modules @@ -326,7 +333,6 @@ rm %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/libproxy-1.0.pc -%{_datadir}/cmake/Modules/Findlibproxy.cmake %files -n python-libproxy %defattr(-, root, root)