[85014] trunk/dports/x11/wine-devel

ryandesign at macports.org ryandesign at macports.org
Fri Oct 7 07:44:47 PDT 2011


Revision: 85014
          http://trac.macports.org/changeset/85014
Author:   ryandesign at macports.org
Date:     2011-10-07 07:44:44 -0700 (Fri, 07 Oct 2011)
Log Message:
-----------
wine-devel: fix "can't use -s with -bundle" and "unrecognized: %parse_param" build errors on Tiger; see #31500

Modified Paths:
--------------
    trunk/dports/x11/wine-devel/Portfile

Added Paths:
-----------
    trunk/dports/x11/wine-devel/files/patch-tools-winegcc-winegcc.c.diff

Modified: trunk/dports/x11/wine-devel/Portfile
===================================================================
--- trunk/dports/x11/wine-devel/Portfile	2011-10-07 13:56:51 UTC (rev 85013)
+++ trunk/dports/x11/wine-devel/Portfile	2011-10-07 14:44:44 UTC (rev 85014)
@@ -89,9 +89,12 @@
                             lib/libXrender.dylib \
                             lib/libGL.dylib
 
-depends_build               port:flex \
+depends_build               port:bison \
+                            port:flex \
                             port:pkgconfig
 
+patchfiles                  patch-tools-winegcc-winegcc.c.diff
+
 configure.ldflags-append    -framework CoreServices \
                             -lz
 

Added: trunk/dports/x11/wine-devel/files/patch-tools-winegcc-winegcc.c.diff
===================================================================
--- trunk/dports/x11/wine-devel/files/patch-tools-winegcc-winegcc.c.diff	                        (rev 0)
+++ trunk/dports/x11/wine-devel/files/patch-tools-winegcc-winegcc.c.diff	2011-10-07 14:44:44 UTC (rev 85014)
@@ -0,0 +1,59 @@
+From cd623377cd0f481793ae73a949871c20dd912403 Mon Sep 17 00:00:00 2001
+From: Charles Davis <cdavis at mymail.mines.edu>
+Date: Fri, 30 Sep 2011 22:56:26 -0600
+Subject: [PATCH] winegcc: On Mac OS, turn -s into -Wl,-x.
+Reply-To: wine-devel <wine-devel at winehq.org>
+
+With the old "classic" ld, if the output file type is MH_BUNDLE, ld will
+refuse to link if -s is specified. At least one user complained on
+wine-users because of this.
+
+In the new ld (ld64), this option is obsolete anyway; it is simply
+ignored. In fact, in Xcode 4.2, ld will now warn if it is given -s.
+
+The error message the user reported suggested using -x instead. The -Wl
+is obviously needed to get the flag past gcc.
+---
+ tools/winegcc/winegcc.c |   12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
+index 3a7e93a..adb1873 100644
+--- tools/winegcc/winegcc.c
++++ tools/winegcc/winegcc.c
+@@ -199,6 +199,7 @@ struct options
+     int force_pointer_size;
+     int large_address_aware;
+     int unwind_tables;
++    int strip;
+     const char* wine_objdir;
+     const char* output_name;
+     const char* image_base;
+@@ -1009,6 +1010,8 @@ static void build(struct options* opts)
+             strarray_add(link_args, "-image_base");
+             strarray_add(link_args, opts->image_base);
+         }
++        if (opts->strip)
++            strarray_add(link_args, "-Wl,-x");
+         break;
+     case PLATFORM_SOLARIS:
+         {
+@@ -1417,6 +1420,15 @@ int main(int argc, char **argv)
+ 			opts.shared = 1;
+                         raw_compiler_arg = raw_linker_arg = 0;
+ 		    }
++                    else if (strcmp("-s", argv[i]) == 0 && opts.target_platform == PLATFORM_APPLE)
++                    {
++                        /* On Mac, change -s into -Wl,-x. ld's -s switch
++                         * is deprecated, and it doesn't work on Tiger with
++                         * MH_BUNDLEs anyway
++                         */
++                        opts.strip = 1;
++                        raw_linker_arg = 0;
++                    }
+                     break;
+                 case 'v':
+                     if (argv[i][2] == 0) verbose++;
+-- 
+1.7.6.1
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111007/32516bb6/attachment.html>


More information about the macports-changes mailing list