[87686] trunk/dports/sysutils/synergy

raimue at macports.org raimue at macports.org
Thu Dec 1 09:14:30 PST 2011


Revision: 87686
          http://trac.macports.org/changeset/87686
Author:   raimue at macports.org
Date:     2011-12-01 09:14:30 -0800 (Thu, 01 Dec 2011)
Log Message:
-----------
sysutils/synergy:
Update to version 1.3.8 for Lion compatibility,
closes #26516

Modified Paths:
--------------
    trunk/dports/sysutils/synergy/Portfile
    trunk/dports/sysutils/synergy/files/patch-CArchFileUnix.cpp.diff

Added Paths:
-----------
    trunk/dports/sysutils/synergy/files/patch-bug57-keypress.diff
    trunk/dports/sysutils/synergy/files/patch-bug57-modifiers.diff

Removed Paths:
-------------
    trunk/dports/sysutils/synergy/files/patch-configure.diff

Property Changed:
----------------
    trunk/dports/sysutils/synergy/


Property changes on: trunk/dports/sysutils/synergy
___________________________________________________________________
Added: svn:mergeinfo
   + /users/raimue/ports/sysutils/synergy:83210-87684

Modified: trunk/dports/sysutils/synergy/Portfile
===================================================================
--- trunk/dports/sysutils/synergy/Portfile	2011-12-01 17:12:54 UTC (rev 87685)
+++ trunk/dports/sysutils/synergy/Portfile	2011-12-01 17:14:30 UTC (rev 87686)
@@ -1,48 +1,57 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup cmake 1.0
 
-name			synergy
-set sf_proj		synergy2
-version			1.3.1
-categories		sysutils
-platforms		darwin
-maintainers		nomaintainer
-description		a client/server for sharing a single mouse and keyboard
-long_description	Synergy lets you easily share a single mouse and keyboard \
-				between multiple computers with different operating systems \
-				without special hardware. It is intended for users with \
-				multiple computers on their desk since each system uses its \
-				own display.
+name            synergy
+version         1.3.8
+categories      sysutils
+platforms       darwin
+maintainers     nomaintainer
+description     A client/server for sharing a single mouse and keyboard
+long_description \
+    Synergy lets you easily share a single mouse and keyboard \
+    between multiple computers with different operating systems \
+    without special hardware. It is intended for users with \
+    multiple computers on their desk since each system uses its \
+    own display.
+homepage        http://synergy-foss.org
+master_sites    googlecode
+distname        ${name}-${version}-Source
 
-homepage		http://synergy-foss.org/
-master_sites	sourceforge
-master_sites.mirror_subdir	${sf_proj}
+checksums       sha1    82e80b22c6746e573d047aa4a1ad7b71c28cf7d3 \
+                rmd160  3b02faec3b5e5dbea1853e6decd92e4cf6eca419
 
-checksums		md5 a6e09d6b71cb217f23069980060abf27
+# Force 32-bit, all kinds of Carbon cruft in here. (#20908)
+supported_archs i386 ppc
 
-configure.args	--sysconfdir=${prefix}/etc/${name}
-patchfiles		patch-CArchFileUnix.cpp.diff patch-configure.diff
+patchfiles	patch-CArchFileUnix.cpp.diff
 
+# See http://synergy-foss.org/pm/issues/57
+patchfiles-append patch-bug57-keypress.diff \
+                  patch-bug57-modifiers.diff
+
 post-patch {
-	reinplace "s|__SYSCONFDIR|${prefix}/etc/${name}|g" ${worksrcpath}/lib/arch/CArchFileUnix.cpp
-}
+    # Set default config path
+    reinplace "s|@@SYSCONFDIR@@|${prefix}/etc/${name}|g" ${worksrcpath}/src/lib/arch/CArchFileUnix.cpp
 
-variant server {
-	startupitem.create	yes
-	startupitem.name	Synergy
-	startupitem.start	"${prefix}/bin/synergys --daemon &"
-	startupitem.stop	"/usr/bin/killall synergys"
+    # Fix build architectures
+    reinplace "s:CMAKE_OSX_ARCHITECTURES \"ppc;i386\":CMAKE_OSX_ARCHITECTURES \"[join [get_canonical_archs] ;]\":" ${worksrcpath}/CMakeLists.txt
 }
 
-post-destroot {
-	xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
-	xinstall -m 644 -c ${worksrcpath}/examples/synergy.conf \
-		${destroot}${prefix}/etc/${name}/synergy.conf.sample
+destroot {
+        xinstall -d ${destroot}${prefix}/bin
+        xinstall -m 755 ${worksrcpath}/bin/synergyc ${destroot}${prefix}/bin
+        xinstall -m 755 ${worksrcpath}/bin/synergys ${destroot}${prefix}/bin
+        xinstall -m 644 ${worksrcpath}/doc/synergyc.man ${destroot}${prefix}/share/man/man1/synergyc.1
+        xinstall -m 644 ${worksrcpath}/doc/synergys.man ${destroot}${prefix}/share/man/man1/synergys.1
+        xinstall -d ${destroot}${prefix}/etc/${name}
+        xinstall -m 644 -W ${worksrcpath}/doc/ \
+            synergy.conf.example \
+            synergy.conf.example-advanced \
+            synergy.conf.example-basic \
+            ${destroot}${prefix}/etc/${name}
 }
 
-livecheck.name	${sf_proj}
-livecheck.regex	<title>Sources (.*) released.*</title>
-
-# Force 32-bit, all kinds of Carbon cruft in here. (#20908)
-supported_archs	i386 ppc
+startupitem.create      yes
+startupitem.executable  ${prefix}/bin/synergys --no-daemon

Modified: trunk/dports/sysutils/synergy/files/patch-CArchFileUnix.cpp.diff
===================================================================
--- trunk/dports/sysutils/synergy/files/patch-CArchFileUnix.cpp.diff	2011-12-01 17:12:54 UTC (rev 87685)
+++ trunk/dports/sysutils/synergy/files/patch-CArchFileUnix.cpp.diff	2011-12-01 17:14:30 UTC (rev 87686)
@@ -1,11 +1,11 @@
---- lib/arch/CArchFileUnix.cpp.orig	Wed Feb  9 13:29:56 2005
-+++ lib/arch/CArchFileUnix.cpp	Wed Feb  9 13:30:27 2005
-@@ -80,7 +80,7 @@
+--- src/lib/arch/CArchFileUnix.cpp.orig	Wed Feb  9 13:29:56 2005
++++ src/lib/arch/CArchFileUnix.cpp	Wed Feb  9 13:30:27 2005
+@@ -83,7 +83,7 @@
  std::string
  CArchFileUnix::getSystemDirectory()
  {
 -	return "/etc";
-+	return "__SYSCONFDIR";
++	return "@@SYSCONFDIR@@";
  }
  
  std::string

Added: trunk/dports/sysutils/synergy/files/patch-bug57-keypress.diff
===================================================================
--- trunk/dports/sysutils/synergy/files/patch-bug57-keypress.diff	                        (rev 0)
+++ trunk/dports/sysutils/synergy/files/patch-bug57-keypress.diff	2011-12-01 17:14:30 UTC (rev 87686)
@@ -0,0 +1,49 @@
+Index: src/lib/platform/COSXScreen.cpp
+===================================================================
+--- src/lib/platform/COSXScreen.cpp	(revision 909)
++++ src/lib/platform/COSXScreen.cpp	(working copy)
+@@ -620,7 +620,7 @@
+ 		// FIXME -- start watching jump zones
+ 		
+ 		// kCGEventTapOptionDefault = 0x00000000 (Missing in 10.4, so specified literally)
+-		m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHIDEventTap, 0, 
++		m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, 
+ 										kCGEventMaskForAllEvents, 
+ 										handleCGInputEvent, 
+ 										this);
+@@ -640,7 +640,7 @@
+                 // there may be a better way to do this, but we register an event handler even if we're
+                 // not on the primary display (acting as a client). This way, if a local event comes in
+                 // (either keyboard or mouse), we can make sure to show the cursor if we've hidden it. 
+-		m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHIDEventTap, 0, 
++		m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, 
+ 										kCGEventMaskForAllEvents, 
+ 										handleCGInputEventSecondary, 
+ 										this);
+Index: src/lib/platform/COSXKeyState.cpp
+===================================================================
+--- src/lib/platform/COSXKeyState.cpp	(revision 909)
++++ src/lib/platform/COSXKeyState.cpp	(working copy)
+@@ -284,22 +284,6 @@
+ #endif
+ 
+ 	if (layoutValid) {
+-
+-		// choose action
+-		UInt16 action;
+-		switch (eventKind) {
+-		case kEventRawKeyDown:
+-			action = kUCKeyActionDown;
+-			break;
+-
+-		case kEventRawKeyRepeat:
+-			action = kUCKeyActionAutoKey;
+-			break;
+-
+-		default:
+-			return 0;
+-		}
+-
+ 		// translate key
+ 		UniCharCount count;
+ 		UniChar chars[2];

Added: trunk/dports/sysutils/synergy/files/patch-bug57-modifiers.diff
===================================================================
--- trunk/dports/sysutils/synergy/files/patch-bug57-modifiers.diff	                        (rev 0)
+++ trunk/dports/sysutils/synergy/files/patch-bug57-modifiers.diff	2011-12-01 17:14:30 UTC (rev 87686)
@@ -0,0 +1,80 @@
+Index: src/lib/platform/COSXScreen.cpp
+===================================================================
+--- src/lib/platform/COSXScreen.cpp	(revision 1077)
++++ src/lib/platform/COSXScreen.cpp	(working copy)
+@@ -1097,14 +1097,14 @@
+ 
+ 	// get the key and active modifiers
+ 	UInt32 virtualKey = CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode);
+-	CGEventFlags macMask = CGEventGetFlags(event);
++	CGEventFlags macMaskCarbon = m_keyState->mapModifiersToCarbon(CGEventGetFlags(event));
+ 	LOG((CLOG_DEBUG1 "event: Key event kind: %d, keycode=%d", eventKind, virtualKey));
+ 
+ 	// Special handling to track state of modifiers
+ 	if (eventKind == kCGEventFlagsChanged) {
+ 		// get old and new modifier state
+ 		KeyModifierMask oldMask = getActiveModifiers();
+-		KeyModifierMask newMask = m_keyState->mapModifiersFromOSX(macMask);
++		KeyModifierMask newMask = m_keyState->mapModifiersFromOsxCarbon(macMaskCarbon);
+ 		m_keyState->handleModifierKeys(getEventTarget(), oldMask, newMask);
+ 
+ 		// if the current set of modifiers exactly matches a modifiers-only
+@@ -1141,9 +1141,7 @@
+ 	// so we check for a key/modifier match in our hot key map.
+ 	if (!m_isOnScreen) {
+ 		HotKeyToIDMap::const_iterator i =
+-			m_hotKeyToIDMap.find(CHotKeyItem(virtualKey, 
+-											 m_keyState->mapModifiersToCarbon(macMask) 
+-											 & 0xff00u));
++			m_hotKeyToIDMap.find(CHotKeyItem(virtualKey, macMaskCarbon & 0xff00u));
+ 		if (i != m_hotKeyToIDMap.end()) {
+ 			UInt32 id = i->second;
+ 	
+Index: src/lib/platform/COSXKeyState.cpp
+===================================================================
+--- src/lib/platform/COSXKeyState.cpp	(revision 1077)
++++ src/lib/platform/COSXKeyState.cpp	(working copy)
+@@ -155,7 +155,7 @@
+ }
+ 
+ KeyModifierMask
+-COSXKeyState::mapModifiersFromOSX(UInt32 mask) const
++COSXKeyState::mapModifiersFromOsxCarbon(UInt32 mask) const
+ {
+ 	LOG((CLOG_DEBUG1 "mask: %04x", mask));
+ 
+@@ -336,7 +336,7 @@
+ KeyModifierMask
+ COSXKeyState::pollActiveModifiers() const
+ {
+-	return mapModifiersFromOSX(GetCurrentKeyModifiers());
++	return mapModifiersFromOsxCarbon(GetCurrentKeyModifiers());
+ }
+ 
+ SInt32
+@@ -620,10 +620,10 @@
+ 			}
+ 
+ 			// now add a key entry for each key/required modifier pair.
+-			item.m_sensitive = mapModifiersFromOSX(sensitive << 8);
++			item.m_sensitive = mapModifiersFromOsxCarbon(sensitive << 8);
+ 			for (std::set<UInt32>::iterator k = required.begin();
+ 											k != required.end(); ++k) {
+-				item.m_required = mapModifiersFromOSX(*k << 8);
++				item.m_required = mapModifiersFromOsxCarbon(*k << 8);
+ 				keyMap.addKeyEntry(item);
+ 			}
+ 		}
+Index: src/lib/platform/COSXKeyState.h
+===================================================================
+--- src/lib/platform/COSXKeyState.h	(revision 1077)
++++ src/lib/platform/COSXKeyState.h	(working copy)
+@@ -62,7 +62,7 @@
+ 	Returns the synergy modifier mask corresponding to the OS X modifier
+ 	mask in \p mask.
+ 	*/
+-	KeyModifierMask		mapModifiersFromOSX(UInt32 mask) const;
++	KeyModifierMask		mapModifiersFromOsxCarbon(UInt32 mask) const;
+ 
+ 	//! Convert CG flags-style modifier mask to old-style Carbon
+ 	/*!

Deleted: trunk/dports/sysutils/synergy/files/patch-configure.diff
===================================================================
--- trunk/dports/sysutils/synergy/files/patch-configure.diff	2011-12-01 17:12:54 UTC (rev 87685)
+++ trunk/dports/sysutils/synergy/files/patch-configure.diff	2011-12-01 17:14:30 UTC (rev 87686)
@@ -1,11 +0,0 @@
---- configure.orig	2005-06-22 13:15:24.000000000 -0700
-+++ configure	2005-06-22 13:39:40.000000000 -0700
-@@ -6870,7 +6870,7 @@
- 	echo "$as_me:6870: checking for C++ compiler warning are errors flags" >&5
- echo $ECHO_N "checking for C++ compiler warning are errors flags... $ECHO_C" >&6
- 	if test "$GXX" = "yes"; then
--		acx_cxx_warnings_are_errors="-Werror"
-+		acx_cxx_warnings_are_errors=""
- 	fi
- 	if test -n "$acx_cxx_warnings_are_errors"; then
- 		CXXFLAGS="$CXXFLAGS $acx_cxx_warnings_are_errors"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111201/80728565/attachment.html>


More information about the macports-changes mailing list