Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gcc6.git;a=commitdiff;h=4d4ef30e5db3ac8818efc0eb531d04787d968861

commit 4d4ef30e5db3ac8818efc0eb531d04787d968861
Author: crazy <[email protected]>
Date:   Sat Sep 24 16:52:54 2016 +0200

cups-2.2.0-3-x86_64
* added patch for https://github.com/apple/cups/issues/4870

diff --git a/source/xapps/cups/FrugalBuild b/source/xapps/cups/FrugalBuild
index 28e31b9..1dcfa3a 100644
--- a/source/xapps/cups/FrugalBuild
+++ b/source/xapps/cups/FrugalBuild
@@ -4,7 +4,7 @@

pkgname=cups
pkgver=2.2.0
-pkgrel=2
+pkgrel=3
pkgdesc="The CUPS Printing System"
depends=('avahi>=0.6.31-9' 'libusb1>=1.0.20-5')
rodepends=('libcups')
@@ -16,8 +16,10 @@ _F_github_author="apple"
_F_github_tag=y
_F_github_tag_v=y
Finclude github
+source+=(cups-cpu-hammering.patch)
url="http://www.cups.org/";
-sha1sums=('03d549775e595ca52e1ec8cf1e7d2501392ececb')
+sha1sums=('03d549775e595ca52e1ec8cf1e7d2501392ececb' \
+          'cd42f20cee1c13001a1f2dfabc8f84a2d0a8831a')

provides=('cupsddk')
replaces=("${provides[@]}")
@@ -42,8 +44,10 @@ Fconfopts+=" --with-cups-user=lp \
_F_make_opts="${_F_make_opts} "

build() {
-       Fsed "Icon=cups" "Icon=/usr/share/pixmaps/cups-128.png" 
desktop/cups.desktop.in

+       Fcd
+       Fsed "Icon=cups" "Icon=/usr/share/pixmaps/cups-128.png" 
desktop/cups.desktop.in
+       Fpatchall
Fmake
make BUILDROOT=$Fdestdir install || Fdie

diff --git a/source/xapps/cups/cups-cpu-hammering.patch 
b/source/xapps/cups/cups-cpu-hammering.patch
new file mode 100644
index 0000000..a23d296
--- /dev/null
+++ b/source/xapps/cups/cups-cpu-hammering.patch
@@ -0,0 +1,54 @@
+diff -up cups-2.2.0/CHANGES.txt.cpu-hammering cups-2.2.0/CHANGES.txt
+diff -up cups-2.2.0/cups/http-addrlist.c.cpu-hammering 
cups-2.2.0/cups/http-addrlist.c
+--- cups-2.2.0/cups/http-addrlist.c.cpu-hammering      2016-09-19 
19:56:54.074866957 +0200
++++ cups-2.2.0/cups/http-addrlist.c    2016-09-21 11:45:22.264775409 +0200
+@@ -304,6 +304,8 @@ httpAddrConnect2(
+
+     if (result > 0)
+     {
++      http_addrlist_t *connaddr = NULL;
++
+       for (i = 0; i < nfds; i ++)
+       {
+ #  ifdef HAVE_POLL
+@@ -314,7 +316,7 @@ httpAddrConnect2(
+ #  endif /* HAVE_POLL */
+       {
+         *sock    = fds[i];
+-        addrlist = addrs[i];
++        connaddr = addrs[i];
+
+ #  ifdef DEBUG
+         len   = sizeof(peer);
+@@ -322,11 +324,29 @@ httpAddrConnect2(
+           DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", 
httpAddrString(&peer, temp, sizeof(temp)), httpAddrPort(&peer)));
+ #  endif /* DEBUG */
+       }
+-      else
++# ifdef HAVE_POLL
++      else if (pfds[i].revents & (POLLERR | POLLHUP))
++# else
++      else if (FD_SET(fds[i], &error))
++# endif /* HAVE_POLL */
++        {
++         /*
++          * Error on socket, remove from the "pool"...
++          */
++
+         httpAddrClose(NULL, fds[i]);
++          nfds --;
++          if (i < nfds)
++          {
++            memmove(fds + i, fds + i + 1, (size_t)(nfds - i) * 
(sizeof(fds[0])));
++            memmove(addrs + i, addrs + i + 1, (size_t)(nfds - i) * 
(sizeof(addrs[0])));
++          }
++          i --;
++        }
+       }
+
+-      return (addrlist);
++      if (connaddr)
++        return (connaddr);
+     }
+ #endif /* O_NONBLOCK */
+
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to