[arch-commits] Commit in synergy/repos (3 files)
Giovanni Scafora
giovanni at archlinux.org
Fri Oct 16 06:48:57 UTC 2009
Date: Friday, October 16, 2009 @ 02:48:56
Author: giovanni
Revision: 55908
Merged revisions 55896,55900 via svnmerge from
svn+ssh://gerolde.archlinux.org/srv/svn-packages/synergy/trunk
........
r55896 | andrea | 2009-10-15 14:53:29 -0700 (gio, 15 ott 2009) | 2 lines
upgpkg: synergy 1.3.1-4
FS#16670
........
r55900 | andrea | 2009-10-15 15:04:25 -0700 (gio, 15 ott 2009) | 2 lines
upgpkg: synergy 1.3.1-4
FS#16670
........
Added:
synergy/repos/extra-x86_64/synergy-stuttered-delay-fix.patch
(from rev 55900, synergy/trunk/synergy-stuttered-delay-fix.patch)
Modified:
synergy/repos/extra-x86_64/ (properties)
synergy/repos/extra-x86_64/PKGBUILD
-----------------------------------+
PKGBUILD | 29 +++++++++++-------
synergy-stuttered-delay-fix.patch | 58 ++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 11 deletions(-)
Property changes on: synergy/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
- /synergy/trunk:1-30641
+ /synergy/trunk:1-55907
Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2009-10-16 06:43:04 UTC (rev 55907)
+++ extra-x86_64/PKGBUILD 2009-10-16 06:48:56 UTC (rev 55908)
@@ -1,26 +1,33 @@
# $Id$
-# Maintainer: Dale Blount <dale at archlinux.org>
+# Contributor: Dale Blount <dale at archlinux.org>
pkgname=synergy
pkgver=1.3.1
-pkgrel=3
-pkgdesc="share a single mouse and keyboard between multiple pcs"
+pkgrel=4
+pkgdesc="Share a single mouse and keyboard between multiple pcs"
arch=('i686' 'x86_64')
-depends=(gcc-libs libxtst libsm libxinerama)
-makedepends=(libxt) # used by configure to test for libx11...
-backup=(etc/synergy.conf)
+depends=('gcc-libs' 'libxtst' 'libxinerama')
+license=('GPL2')
+makedepends=('libxt') # used by configure to test for libx11...
+backup=('etc/synergy.conf')
url="http://synergy2.sourceforge.net/"
-source=(http://downloads.sourceforge.net/sourceforge/synergy2/$pkgname-$pkgver.tar.gz
- gcc43.patch)
-license=('GPL2')
-md5sums=('a6e09d6b71cb217f23069980060abf27')
+source=(http://downloads.sourceforge.net/${pkgname}2/$pkgname-$pkgver.tar.gz
+ 'gcc43.patch' 'synergy-stuttered-delay-fix.patch')
+md5sums=('a6e09d6b71cb217f23069980060abf27'
+ '255c3f641c5f077e33e284db771220b8'
+ '1969a09008893971bbc4f227b2fd27fb')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
patch -Np1 -i "${srcdir}/gcc43.patch" || return 1
- ./configure --prefix=/usr --sysconfdir=/etc || return 1
+ patch -Np1 -i "${srcdir}/synergy-stuttered-delay-fix.patch" || return 1
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
make || return 1
make DESTDIR="${pkgdir}" install || return 1
+
install -m755 -d "${pkgdir}/etc"
install -m644 examples/synergy.conf "${pkgdir}/etc/" || return 1
}
Copied: synergy/repos/extra-x86_64/synergy-stuttered-delay-fix.patch (from rev 55900, synergy/trunk/synergy-stuttered-delay-fix.patch)
===================================================================
--- extra-x86_64/synergy-stuttered-delay-fix.patch (rev 0)
+++ extra-x86_64/synergy-stuttered-delay-fix.patch 2009-10-16 06:48:56 UTC (rev 55908)
@@ -0,0 +1,58 @@
+--- synergy-1.3.1/lib/platform/CXWindowsEventQueueBuffer.cpp 2005-04-24 12:32:16.000000000 +0930
++++ synergy-1.3.1/lib/platform/CXWindowsEventQueueBuffer.cpp 2008-10-02 11:14:18.112098206 +0930
+@@ -84,6 +73,8 @@
+ pfds[0].events = POLLIN;
+ int timeout = (dtimeout < 0.0) ? -1 :
+ static_cast<int>(1000.0 * dtimeout);
++ int remaining = timeout;
++ int retval = 0;
+ #else
+ struct timeval timeout;
+ struct timeval* timeoutPtr;
+@@ -102,19 +93,31 @@
+ FD_ZERO(&rfds);
+ FD_SET(ConnectionNumber(m_display), &rfds);
+ #endif
++ // It's possible that the X server has queued events locally
++ // in xlib's event buffer and not pushed on to the fd. Hence we
++ // can't simply monitor the fd as we may never be woken up.
++ // ie addEvent calls flush, XFlush may not send via the fd hence
++ // there is an event waiting to be sent but we must exit the poll
++ // before it can.
++ // Instead we poll for a brief period of time (so if events
++ // queued locally in the xlib buffer can be processed)
++ // and continue doing this until timeout is reached.
++ // The human eye can notice 60hz (ansi) which is 16ms, however
++ // we want to give the cpu a chance s owe up this to 25ms
++#define TIMEOUT_DELAY 25
+
+- // wait for message from X server or for timeout. also check
+- // if the thread has been cancelled. poll() should return -1
+- // with EINTR when the thread is cancelled.
++ while( remaining > 0 && QLength(m_display)==0 && retval==0){
+ #if HAVE_POLL
+- poll(pfds, 1, timeout);
++ retval = poll(pfds, 1, TIMEOUT_DELAY); //16ms = 60hz, but we make it > to play nicely with the cpu
+ #else
+- select(ConnectionNumber(m_display) + 1,
++ retval = select(ConnectionNumber(m_display) + 1,
+ SELECT_TYPE_ARG234 &rfds,
+ SELECT_TYPE_ARG234 NULL,
+ SELECT_TYPE_ARG234 NULL,
+- SELECT_TYPE_ARG5 timeoutPtr);
++ SELECT_TYPE_ARG5 TIMEOUT_DELAY);
+ #endif
++ remaining-=TIMEOUT_DELAY;
++ }
+
+ {
+ // we're no longer waiting for events
+@@ -179,7 +184,7 @@
+ CXWindowsEventQueueBuffer::isEmpty() const
+ {
+ CLock lock(&m_mutex);
+- return (XPending(m_display) == 0);
++ return (QLength(m_display) == 0 );
+ }
+
+ CEventQueueTimer*
More information about the arch-commits
mailing list