summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Alexander <wired@gentoo.org>2009-10-30 09:24:22 +0000
committerAlex Alexander <wired@gentoo.org>2009-10-30 09:24:22 +0000
commit59dad4639e5f911ba88cc074be22efacbadce0e0 (patch)
tree7cd9b2dc27b76a11e46929994bce44965804a2dc /x11-misc
parentVersion bump (#288578). Adds heimdal support (#185652, #231400). Drops Kerber... (diff)
downloadgentoo-2-59dad4639e5f911ba88cc074be22efacbadce0e0.tar.gz
gentoo-2-59dad4639e5f911ba88cc074be22efacbadce0e0.tar.bz2
gentoo-2-59dad4639e5f911ba88cc074be22efacbadce0e0.zip
added patch that reduces delays - bug 257794
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/synergy/ChangeLog8
-rw-r--r--x11-misc/synergy/files/synergy-1.3.1-stuttered-delay-fix.patch58
-rw-r--r--x11-misc/synergy/synergy-1.3.1-r1.ebuild61
3 files changed, 126 insertions, 1 deletions
diff --git a/x11-misc/synergy/ChangeLog b/x11-misc/synergy/ChangeLog
index e2f1717b1a84..cd216ce01c49 100644
--- a/x11-misc/synergy/ChangeLog
+++ b/x11-misc/synergy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/synergy
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/synergy/ChangeLog,v 1.59 2009/10/23 20:47:16 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/synergy/ChangeLog,v 1.60 2009/10/30 09:24:21 wired Exp $
+
+*synergy-1.3.1-r1 (30 Oct 2009)
+
+ 30 Oct 2009; Alex Alexander <wired@gentoo.org> +synergy-1.3.1-r1.ebuild,
+ +files/synergy-1.3.1-stuttered-delay-fix.patch:
+ added patch that reduces delays - bug 257794
23 Oct 2009; Jeremy Olexa <darkside@gentoo.org> synergy-1.3.1.ebuild:
add --disable-debug because debugging exposes an assertion error in
diff --git a/x11-misc/synergy/files/synergy-1.3.1-stuttered-delay-fix.patch b/x11-misc/synergy/files/synergy-1.3.1-stuttered-delay-fix.patch
new file mode 100644
index 000000000000..30d5abbe129e
--- /dev/null
+++ b/x11-misc/synergy/files/synergy-1.3.1-stuttered-delay-fix.patch
@@ -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*
diff --git a/x11-misc/synergy/synergy-1.3.1-r1.ebuild b/x11-misc/synergy/synergy-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..f0fa654b8db2
--- /dev/null
+++ b/x11-misc/synergy/synergy-1.3.1-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/synergy/synergy-1.3.1-r1.ebuild,v 1.1 2009/10/30 09:24:21 wired Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="Lets you easily share a single mouse and keyboard between multiple computers."
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.gz"
+HOMEPAGE="http://synergy2.sourceforge.net/"
+LICENSE="GPL-2"
+KEYWORDS="~arm ~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+SLOT="0"
+IUSE=""
+
+RDEPEND="x11-libs/libXtst
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXinerama"
+DEPEND="${RDEPEND}
+ x11-proto/xextproto
+ x11-proto/xproto
+ x11-proto/kbproto
+ x11-proto/xineramaproto
+ x11-libs/libXt"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}+gcc-4.3.patch"
+
+ # fix for #257794
+ epatch "${FILESDIR}/${P}-stuttered-delay-fix.patch"
+
+ # Remove -Werror usage.
+ sed -i -e '/ACX_CXX_WARNINGS_ARE_ERRORS/d' \
+ configure.in || die "unable to sed out -Werror usage."
+ eautoreconf
+}
+
+src_compile() {
+ # debug causes an assertion error in switchInDirection()
+ econf --sysconfdir=/etc \
+ --disable-dependency-tracking \
+ --disable-debug
+ emake || die
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README
+ insinto /etc
+ doins "${S}"/examples/synergy.conf
+}
+
+pkg_postinst() {
+ elog
+ elog "${PN} can also be used to connect to computers running Windows."
+ elog "Visit ${HOMEPAGE} to find the Windows client."
+ elog
+}