[MacPorts] #22563: psi-otr -- build failure

MacPorts noreply at macports.org
Wed Aug 11 12:45:22 PDT 2010


#22563: psi-otr -- build failure
--------------------------------+-------------------------------------------
 Reporter:  porter@…            |       Owner:  rowue@…           
     Type:  defect              |      Status:  assigned          
 Priority:  Normal              |   Milestone:                    
Component:  ports               |     Version:  1.8.1             
 Keywords:                      |        Port:  psi               
--------------------------------+-------------------------------------------

Comment(by michaelld@…):

 = Summary =

 OK; thank you for your prompt feedback.  After rereading the errors and
 reading through various headers (see more below), I believe that PSI 0.14
 is not 64-bit compatible on 10.5 or 10.6, and in general is not 10.6
 compatible.  I've reached the limit of my capabilities w/r.t. this ticket.
 My recommendation (to the ticket owner and/or OP) is to submit a ticket
 upstream (or email the maintainer w/ this ticket's info).  Sorry for the
 bad news.

 = Details =

 After rereading the errors and looking through
 "/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h",
 I find:
 {{{
 #if !__LP64__
 enum {
   ...
   smScriptKeys                  = 32,   /*Script KCHR id*/
   ...
 }
 ...
 /*
  ...
  *  GetScriptVariable()   *** DEPRECATED ***
  ...
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in
 CoreServices.framework but deprecated in 10.5
  ...
  */
 extern long
 GetScriptVariable(
   short   script,
   short   selector)
 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5;
 ...
 #endif  /* !__LP64__ */
 }}}

 So there are 2 issues just with this section of code -- PSI 0.14 is not:

 1. 64-bit compatible on OSX 10.5 or 10.6.  I only do 32-bit on 10.5, so I
 didn't notice this issue.

 2. 10.6 compatible at all, since it uses functions and variables that were
 deprecated in 10.5 and should not available in 10.6 at all.

 The problematic lines in
 "psi-0.14/src/libpsi/tools/globalshortcut/globalshortcutmanager_mac.cpp"
 are:
 {{{
 130:            ttable->kchrID = (short)GetScriptVariable(smCurrentScript,
 smScriptKeys);
 168:            theID = (short) GetScriptVariable(smCurrentScript,
 smScriptKeys);
 202:            kchr = (Ptr)GetScriptVariable(smCurrentScript,
 smKCHRCache);
 203:            keyTrans = KeyTranslate(kchr, virtualKeyCode, &state);
 }}}

 For 130 & 168; from the CarbonCore 'script.h' header file, Apple
 recommends:
 {{{
 4. smScriptKeys - To determine an appropriate keyboard input source for a
 particular language, use TISCopyInputSourceForLanguage.
 }}}

 For 202; from the CarbonCore 'script.h' header file, Apple recommends:
 {{{
 3. smKCHRCache - To obtain the key layout data for the keyboard layout
 currently in use, use TISCopyCurrentKeyboardLayoutInputSource to get that
 input source, then pass it to TISGetInputSourceProperty with the
 kTISPropertyUnicodeKeyLayoutData key (this returns 'uchr' Unicode layout
 data only; it will not return any data for keyboard layouts that only have
 'KCHR' data).
 }}}

 For 203: This routine is located in
 "/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h":
 {{{
 #if !__LP64__
 ...
 /*
  *  KeyTranslate()
  ...
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
 [32-bit only]
  ...
  */
 }}}
 so this routine is not 64-bit, and needs to be replaced by one that is
 64-bit.  Apple does not discuss a replacement in this header file.

-- 
Ticket URL: <http://trac.macports.org/ticket/22563#comment:15>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list