Ticket #52385: hexchat-fix-sysinfo-plugin-on-10.9-and-lower.patch

File hexchat-fix-sysinfo-plugin-on-10.9-and-lower.patch, 1.5 KB (added by Ionic (Mihai Moldovan), 8 years ago)
  • irc/hexchat/Portfile

    diff --git a/irc/hexchat/Portfile b/irc/hexchat/Portfile
    index 14e4bb8..c6575d4 100644
    a b depends_build-append \ 
    5757# directory.)
    5858configure.cppflags-replace  -I${prefix}/include -isystem${prefix}/include
    5959
     60patchfiles          patch-use-Gestalt-on-10.9-and-lower.diff
     61
    6062configure.args      --disable-dependency-tracking \
    6163                    --enable-minimal-flags \
    6264                    --disable-python \
  • new file irc/hexchat/files/patch-use-Gestalt-on-10.9-and-lower.diff

    diff --git a/irc/hexchat/files/patch-use-Gestalt-on-10.9-and-lower.diff b/irc/hexchat/files/patch-use-Gestalt-on-10.9-and-lower.diff
    new file mode 100644
    index 0000000..3e80c66
    - +  
     1--- plugins/sysinfo/osx/backend.m.old
     2+++ plugins/sysinfo/osx/backend.m
     3@@ -78,10 +78,22 @@ get_os (void)
     4 static char *
     5 get_os_fallback (void)
     6 {
     7+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_9
     8+       SInt32 ver_major = 0,
     9+              ver_minor = 0,
     10+              ver_patch = 0;
     11+
     12+       Gestalt (gestaltSystemVersionMajor, &ver_major);
     13+       Gestalt (gestaltSystemVersionMinor, &ver_minor);
     14+       Gestalt (gestaltSystemVersionBugFix, &ver_patch);
     15+
     16+       return g_strdup_printf ("OS X %d.%d.%d", ver_major, ver_minor, ver_patch);
     17+#else
     18        NSProcessInfo *info = [NSProcessInfo processInfo];
     19        NSOperatingSystemVersion version = [info operatingSystemVersion];
     20 
     21        return g_strdup_printf ("OS X %ld.%ld.%ld", version.majorVersion, version.minorVersion, version.patchVersion);
     22+#endif
     23 }
     24 char *
     25 sysinfo_backend_get_os(void)