[MacPorts] #61076: wxWidgets-3.2 @3.1.4: error: use of undeclared identifier 'LSCopyDefaultApplicationURLForContentType'

MacPorts noreply at macports.org
Mon Apr 12 01:29:48 UTC 2021


#61076: wxWidgets-3.2 @3.1.4: error: use of undeclared identifier
'LSCopyDefaultApplicationURLForContentType'
-------------------------+-------------------------------------------------
  Reporter:              |      Owner:  mojca
  programmingkidx        |
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:  tiger leopard snowleopard lion
      Port:              |  mountainlion mavericks
  wxWidgets-3.2          |
-------------------------+-------------------------------------------------

Comment (by Wowfunhappy):

 ^ Gave it go. As expected, getting past the specific error is quite easy:

 {{{
 --- mimetype-orig.cpp   2020-07-22 13:20:06.000000000 -0400
 +++ mimetype.cpp        2021-04-11 20:57:38.000000000 -0400
 @@ -431,9 +431,10 @@
      wxCFStringRef ext = UTTypeCopyPreferredTagWithClass( cfuti,
 kUTTagClassFilenameExtension );

      // Look up the preferred application
 -    wxCFRef<CFURLRef> appUrl = LSCopyDefaultApplicationURLForContentType(
 cfuti, kLSRolesAll, NULL);
 +    CFURLRef appUrl;
 +    OSStatus status = LSGetApplicationForInfo( kLSUnknownType,
 kLSUnknownCreator, ext, kLSRolesAll, NULL, &appUrl );

 -    if( !appUrl )
 +    if( status != noErr )
          return;

      // Create a bundle object for that application
 }}}

 Unfortunately, that led me to another error ` app = [ws openURLs:params
 withApplicationAtURL:url`, which in turn led me to:
 https://github.com/wxWidgets/wxWidgets/commit/199a3f51ef2e6f4e99d0fdea410463ccda49fce2
 #diff-5801460ae7d02351c95cb4077983a12fa3dc825c3ff70371f42102147a0654ec.
 Looks like you'd need to undo all of those changes too.

 My git-foo is weak and I'm not particularly eager to go through these by
 hand, but someone with better merging skills may want to give it a try.
 Or, programmingkidx, ''you'' might want to give it a go if you're still
 interested. This work is a tad tedious, but it's not at all difficult, and
 if there are ultimately more problems after this set, I'd be happy to help
 track down those commits as well. 👍

-- 
Ticket URL: <https://trac.macports.org/ticket/61076#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list