Revision: 144391 https://trac.macports.org/changeset/144391 Author: jeremyhu@macports.org Date: 2016-01-06 23:33:32 -0800 (Wed, 06 Jan 2016) Log Message: ----------- xorg-libXaw: Additional fixes for libXt symbol-fu Modified Paths: -------------- trunk/dports/x11/xorg-libXaw/Portfile Added Paths: ----------- trunk/dports/x11/xorg-libXaw/files/0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch Removed Paths: ------------- trunk/dports/x11/xorg-libXaw/files/0001-darwin-Fixup-vendorShellWidgetClass.patch Modified: trunk/dports/x11/xorg-libXaw/Portfile =================================================================== --- trunk/dports/x11/xorg-libXaw/Portfile 2016-01-07 07:33:19 UTC (rev 144390) +++ trunk/dports/x11/xorg-libXaw/Portfile 2016-01-07 07:33:32 UTC (rev 144391) @@ -4,7 +4,7 @@ name xorg-libXaw version 1.0.13 -revision 1 +revision 2 categories x11 devel license X11 maintainers jeremyhu openmaintainer @@ -32,7 +32,7 @@ patch.pre_args -p1 patchfiles \ - 0001-darwin-Fixup-vendorShellWidgetClass.patch + 0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch configure.args \ --disable-specs \ Deleted: trunk/dports/x11/xorg-libXaw/files/0001-darwin-Fixup-vendorShellWidgetClass.patch =================================================================== --- trunk/dports/x11/xorg-libXaw/files/0001-darwin-Fixup-vendorShellWidgetClass.patch 2016-01-07 07:33:19 UTC (rev 144390) +++ trunk/dports/x11/xorg-libXaw/files/0001-darwin-Fixup-vendorShellWidgetClass.patch 2016-01-07 07:33:32 UTC (rev 144391) @@ -1,56 +0,0 @@ -From 9e1b9c93a7d3b7658c629946c7b7e5d1803bbc53 Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston Sequoia <jeremyhu@apple.com> -Date: Wed, 6 Jan 2016 22:21:01 -0800 -Subject: [PATCH] darwin: Fixup vendorShellWidgetClass - -Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> ---- - src/Vendor.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/src/Vendor.c b/src/Vendor.c -index b8797f5..be8b899 100644 ---- a/src/Vendor.c -+++ b/src/Vendor.c -@@ -111,12 +111,20 @@ static XtResource resources[] = { - * - ***************************************************************************/ - --#if defined(__CYGWIN__) || defined(__MINGW32__) -+#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) - /* to fix the EditRes problem because of wrong linker semantics */ - extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */ - extern VendorShellClassRec _XawVendorShellClassRec; - extern void _XawFixupVendorShell(); - -+#if defined(__APPLE__) -+__attribute__((constructor)) -+static void __VendorShellHack(void) -+{ -+ vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); -+ _XawFixupVendorShell(); -+} -+#else - int __stdcall - DllMain(unsigned long mod_handle, unsigned long flag, void *routine) - { -@@ -131,6 +139,7 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine) - } - return 1; - } -+#endif - - #define vendorShellClassRec _XawVendorShellClassRec - -@@ -339,7 +348,7 @@ XawVendorShellClassPartInit(WidgetClass cclass) - } - } - --#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) -+#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) - /* stupid OSF/1 shared libraries have the wrong semantics */ - /* symbols do not get resolved external to the shared library */ - void _XawFixupVendorShell() --- -2.6.4 - Added: trunk/dports/x11/xorg-libXaw/files/0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch =================================================================== --- trunk/dports/x11/xorg-libXaw/files/0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch (rev 0) +++ trunk/dports/x11/xorg-libXaw/files/0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch 2016-01-07 07:33:32 UTC (rev 144391) @@ -0,0 +1,66 @@ +From 801fda056d60713488457a77dcffffee8a63fd61 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Wed, 6 Jan 2016 22:21:01 -0800 +Subject: [PATCH] darwin: Remove incorrect export of vendorShellClassRec and + vendorShellWidgetClass + +Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +--- + src/Vendor.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/Vendor.c b/src/Vendor.c +index b8797f5..d14b796 100644 +--- a/src/Vendor.c ++++ b/src/Vendor.c +@@ -111,12 +111,20 @@ static XtResource resources[] = { + * + ***************************************************************************/ + +-#if defined(__CYGWIN__) || defined(__MINGW32__) ++#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) + /* to fix the EditRes problem because of wrong linker semantics */ + extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */ + extern VendorShellClassRec _XawVendorShellClassRec; + extern void _XawFixupVendorShell(); + ++#if defined(__APPLE__) ++__attribute__((constructor)) ++static void __VendorShellHack(void) ++{ ++ vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); ++ _XawFixupVendorShell(); ++} ++#else + int __stdcall + DllMain(unsigned long mod_handle, unsigned long flag, void *routine) + { +@@ -131,6 +139,7 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine) + } + return 1; + } ++#endif + + #define vendorShellClassRec _XawVendorShellClassRec + +@@ -195,7 +204,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { + } + }; + +-#ifndef __UNIXOS2__ ++#if !defined(__UNIXOS2__) && !defined(__APPLE__) + externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = + (WidgetClass) (&vendorShellClassRec); + #endif +@@ -339,7 +348,7 @@ XawVendorShellClassPartInit(WidgetClass cclass) + } + } + +-#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) ++#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) + /* stupid OSF/1 shared libraries have the wrong semantics */ + /* symbols do not get resolved external to the shared library */ + void _XawFixupVendorShell() +-- +2.6.4 +
participants (1)
-
jeremyhu@macports.org