Ticket #26516: synergy-1.3.7.diff
File synergy-1.3.7.diff, 9.1 KB (added by drkp (Dan Ports), 13 years ago) |
---|
-
files/patch-bug57-keypress.diff
1 Index: src/lib/platform/COSXScreen.cpp 2 =================================================================== 3 --- src/lib/platform/COSXScreen.cpp (revision 909) 4 +++ src/lib/platform/COSXScreen.cpp (working copy) 5 @@ -620,7 +620,7 @@ 6 // FIXME -- start watching jump zones 7 8 // kCGEventTapOptionDefault = 0x00000000 (Missing in 10.4, so specified literally) 9 - m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHIDEventTap, 0, 10 + m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, 11 kCGEventMaskForAllEvents, 12 handleCGInputEvent, 13 this); 14 @@ -640,7 +640,7 @@ 15 // there may be a better way to do this, but we register an event handler even if we're 16 // not on the primary display (acting as a client). This way, if a local event comes in 17 // (either keyboard or mouse), we can make sure to show the cursor if we've hidden it. 18 - m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHIDEventTap, 0, 19 + m_eventTapPort=CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, 20 kCGEventMaskForAllEvents, 21 handleCGInputEventSecondary, 22 this); 23 Index: src/lib/platform/COSXKeyState.cpp 24 =================================================================== 25 --- src/lib/platform/COSXKeyState.cpp (revision 909) 26 +++ src/lib/platform/COSXKeyState.cpp (working copy) 27 @@ -284,22 +284,6 @@ 28 #endif 29 30 if (layoutValid) { 31 - 32 - // choose action 33 - UInt16 action; 34 - switch (eventKind) { 35 - case kEventRawKeyDown: 36 - action = kUCKeyActionDown; 37 - break; 38 - 39 - case kEventRawKeyRepeat: 40 - action = kUCKeyActionAutoKey; 41 - break; 42 - 43 - default: 44 - return 0; 45 - } 46 - 47 // translate key 48 UniCharCount count; 49 UniChar chars[2]; -
files/patch-configure.diff
1 --- configure.orig 2005-06-22 13:15:24.000000000 -07002 +++ configure 2005-06-22 13:39:40.000000000 -07003 @@ -6870,7 +6870,7 @@4 echo "$as_me:6870: checking for C++ compiler warning are errors flags" >&55 echo $ECHO_N "checking for C++ compiler warning are errors flags... $ECHO_C" >&66 if test "$GXX" = "yes"; then7 - acx_cxx_warnings_are_errors="-Werror"8 + acx_cxx_warnings_are_errors=""9 fi10 if test -n "$acx_cxx_warnings_are_errors"; then11 CXXFLAGS="$CXXFLAGS $acx_cxx_warnings_are_errors" -
files/patch-CArchFileUnix.cpp.diff
1 --- lib/arch/CArchFileUnix.cpp.orig Wed Feb 9 13:29:56 20052 +++ lib/arch/CArchFileUnix.cpp Wed Feb 9 13:30:27 20051 --- src/lib/arch/CArchFileUnix.cpp.orig Wed Feb 9 13:29:56 2005 2 +++ src/lib/arch/CArchFileUnix.cpp Wed Feb 9 13:30:27 2005 3 3 @@ -80,7 +80,7 @@ 4 4 std::string 5 5 CArchFileUnix::getSystemDirectory() -
files/patch-bug57-modifiers.diff
1 Index: src/lib/platform/COSXScreen.cpp 2 =================================================================== 3 --- src/lib/platform/COSXScreen.cpp (revision 1077) 4 +++ src/lib/platform/COSXScreen.cpp (working copy) 5 @@ -1097,14 +1097,14 @@ 6 7 // get the key and active modifiers 8 UInt32 virtualKey = CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode); 9 - CGEventFlags macMask = CGEventGetFlags(event); 10 + CGEventFlags macMaskCarbon = m_keyState->mapModifiersToCarbon(CGEventGetFlags(event)); 11 LOG((CLOG_DEBUG1 "event: Key event kind: %d, keycode=%d", eventKind, virtualKey)); 12 13 // Special handling to track state of modifiers 14 if (eventKind == kCGEventFlagsChanged) { 15 // get old and new modifier state 16 KeyModifierMask oldMask = getActiveModifiers(); 17 - KeyModifierMask newMask = m_keyState->mapModifiersFromOSX(macMask); 18 + KeyModifierMask newMask = m_keyState->mapModifiersFromOsxCarbon(macMaskCarbon); 19 m_keyState->handleModifierKeys(getEventTarget(), oldMask, newMask); 20 21 // if the current set of modifiers exactly matches a modifiers-only 22 @@ -1141,9 +1141,7 @@ 23 // so we check for a key/modifier match in our hot key map. 24 if (!m_isOnScreen) { 25 HotKeyToIDMap::const_iterator i = 26 - m_hotKeyToIDMap.find(CHotKeyItem(virtualKey, 27 - m_keyState->mapModifiersToCarbon(macMask) 28 - & 0xff00u)); 29 + m_hotKeyToIDMap.find(CHotKeyItem(virtualKey, macMaskCarbon & 0xff00u)); 30 if (i != m_hotKeyToIDMap.end()) { 31 UInt32 id = i->second; 32 33 Index: src/lib/platform/COSXKeyState.cpp 34 =================================================================== 35 --- src/lib/platform/COSXKeyState.cpp (revision 1077) 36 +++ src/lib/platform/COSXKeyState.cpp (working copy) 37 @@ -155,7 +155,7 @@ 38 } 39 40 KeyModifierMask 41 -COSXKeyState::mapModifiersFromOSX(UInt32 mask) const 42 +COSXKeyState::mapModifiersFromOsxCarbon(UInt32 mask) const 43 { 44 LOG((CLOG_DEBUG1 "mask: %04x", mask)); 45 46 @@ -336,7 +336,7 @@ 47 KeyModifierMask 48 COSXKeyState::pollActiveModifiers() const 49 { 50 - return mapModifiersFromOSX(GetCurrentKeyModifiers()); 51 + return mapModifiersFromOsxCarbon(GetCurrentKeyModifiers()); 52 } 53 54 SInt32 55 @@ -620,10 +620,10 @@ 56 } 57 58 // now add a key entry for each key/required modifier pair. 59 - item.m_sensitive = mapModifiersFromOSX(sensitive << 8); 60 + item.m_sensitive = mapModifiersFromOsxCarbon(sensitive << 8); 61 for (std::set<UInt32>::iterator k = required.begin(); 62 k != required.end(); ++k) { 63 - item.m_required = mapModifiersFromOSX(*k << 8); 64 + item.m_required = mapModifiersFromOsxCarbon(*k << 8); 65 keyMap.addKeyEntry(item); 66 } 67 } 68 Index: src/lib/platform/COSXKeyState.h 69 =================================================================== 70 --- src/lib/platform/COSXKeyState.h (revision 1077) 71 +++ src/lib/platform/COSXKeyState.h (working copy) 72 @@ -62,7 +62,7 @@ 73 Returns the synergy modifier mask corresponding to the OS X modifier 74 mask in \p mask. 75 */ 76 - KeyModifierMask mapModifiersFromOSX(UInt32 mask) const; 77 + KeyModifierMask mapModifiersFromOsxCarbon(UInt32 mask) const; 78 79 //! Convert CG flags-style modifier mask to old-style Carbon 80 /*! -
Portfile
1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 1 2 # $Id$ 2 3 3 4 PortSystem 1.0 5 PortGroup cmake 1.0 4 6 5 7 name synergy 6 set sf_proj synergy2 7 version 1.3.1 8 version 1.3.7 8 9 categories sysutils 9 10 platforms darwin 10 11 maintainers gmail.com:ascarter … … 16 17 own display. 17 18 18 19 homepage http://synergy-foss.org/ 19 master_sites sourceforge 20 master_sites.mirror_subdir ${sf_proj} 20 master_sites googlecode 21 21 22 checksums md5 a6e09d6b71cb217f23069980060abf27 22 distname synergy-${version}-Source 23 23 24 c onfigure.args --sysconfdir=${prefix}/etc/${name}25 patchfiles patch-CArchFileUnix.cpp.diff patch-configure.diff 24 checksums rmd160 5f28bd102293437481a8c5808d5cbfc8722ee1ae \ 25 sha256 9ca584261a4155041dc788614f1942614d20388996a4adaed923aab24e2e2d30 26 26 27 patchfiles patch-CArchFileUnix.cpp.diff 28 29 # See http://synergy-foss.org/pm/issues/57 30 patchfiles-append patch-bug57-keypress.diff \ 31 patch-bug57-modifiers.diff 32 27 33 post-patch { 28 reinplace "s|__SYSCONFDIR|${prefix}/etc/${name}|g" ${worksrcpath}/lib/arch/CArchFileUnix.cpp 34 reinplace "s|__SYSCONFDIR|${prefix}/etc/${name}|g" ${worksrcpath}/src/lib/arch/CArchFileUnix.cpp 35 reinplace "s|ppc;i386|${configure.build_arch}|g" ${worksrcpath}/CMakeLists.txt 29 36 } 30 37 31 variant server { 32 startupitem.create yes 33 startupitem.name Synergy 34 startupitem.start "${prefix}/bin/synergys --daemon &" 35 startupitem.stop "/usr/bin/killall synergys" 36 } 38 startupitem.create yes 39 startupitem.name Synergy 40 startupitem.start "${prefix}/bin/synergys --daemon &" 41 startupitem.stop "/usr/bin/killall synergys" 37 42 38 post-destroot { 43 destroot { 44 xinstall -m 755 -W ${worksrcpath}/bin synergys synergyc ${destroot}${prefix}/bin 39 45 xinstall -m 755 -d ${destroot}${prefix}/etc/${name} 40 xinstall -m 644 -c ${worksrcpath}/examples/synergy.conf \ 41 ${destroot}${prefix}/etc/${name}/synergy.conf.sample 46 xinstall -m 644 -c ${worksrcpath}/doc/synergy.conf.example \ 47 ${destroot}${prefix}/etc/${name}/ 48 49 xinstall -m 644 ${worksrcpath}/doc/synergyc.man ${destroot}${prefix}/share/man/man1/synergyc.1 50 xinstall -m 644 ${worksrcpath}/doc/synergys.man ${destroot}${prefix}/share/man/man1/synergys.1 42 51 } 43 52 44 livecheck.name ${sf_proj}45 livecheck.regex <title>Sources (.*) released.*</title>46 47 53 # Force 32-bit, all kinds of Carbon cruft in here. (#20908) 48 54 supported_archs i386 ppc