[102696] trunk/dports/x11/wine-devel
ryandesign at macports.org
ryandesign at macports.org
Wed Feb 6 19:28:25 PST 2013
Revision: 102696
https://trac.macports.org/changeset/102696
Author: ryandesign at macports.org
Date: 2013-02-06 19:28:25 -0800 (Wed, 06 Feb 2013)
Log Message:
-----------
wine-devel: allow building with clang 3.1 and up; when building with clang, use clang as the assembler; when building with gcc, use "as" as the assembler (#37905)
Modified Paths:
--------------
trunk/dports/x11/wine-devel/Portfile
Added Paths:
-----------
trunk/dports/x11/wine-devel/files/clang.patch
trunk/dports/x11/wine-devel/files/not-clang.patch
Modified: trunk/dports/x11/wine-devel/Portfile
===================================================================
--- trunk/dports/x11/wine-devel/Portfile 2013-02-07 02:40:33 UTC (rev 102695)
+++ trunk/dports/x11/wine-devel/Portfile 2013-02-07 03:28:25 UTC (rev 102696)
@@ -3,6 +3,7 @@
PortSystem 1.0
PortGroup archcheck 1.0
+PortGroup compiler_blacklist_versions 1.0
name wine-devel
conflicts wine wine-crossover
@@ -141,17 +142,29 @@
# This is not 64-bit friendly yet
supported_archs i386
-# BUILD FIX TODO: llvm-gcc-4.2, clang
-# llvm-gcc does not respect force_align_arg_pointer
-# clang fails due to CFI-foo (winebuild uses /usr/bin/as to assemble clang-generated assembly)
-compiler.whitelist gcc-4.2 apple-gcc-4.2
+# llvm-gcc-4.2 doesn't respect force_align_arg_pointer; wine builds but fails to run
+# http://bugs.winehq.org/show_bug.cgi?id=28030
+compiler.blacklist-append llvm-gcc-4.2 macports-llvm-gcc-4.2
+# clang < 3.1 fails to build wine with "error: invalid operand for instruction lretw"
+# http://bugs.winehq.org/show_bug.cgi?id=32872
+compiler.blacklist-append {clang < 425} macports-clang-2.9 macports-clang-3.0
+
# TODO: This should be done by base
if {${configure.compiler} == "apple-gcc-4.2"} {
depends_build-append port:apple-gcc42
depends_skip_archcheck-append apple-gcc42
}
+if {[string match "*clang*" ${configure.compiler}]} {
+ patchfiles-append clang.patch
+ post-patch {
+ reinplace "s|@CLANG@|${configure.cc}|g" ${worksrcpath}/tools/winebuild/utils.c
+ }
+} else {
+ patchfiles-append not-clang.patch
+}
+
platform darwin {
if {${os.major} <= 9} {
# Fix "Xcode 3.x cannot build 16-bit code correctly. Use --disable-win16 if you don't need 16-bit support."
Added: trunk/dports/x11/wine-devel/files/clang.patch
===================================================================
--- trunk/dports/x11/wine-devel/files/clang.patch (rev 0)
+++ trunk/dports/x11/wine-devel/files/clang.patch 2013-02-07 03:28:25 UTC (rev 102696)
@@ -0,0 +1,21 @@
+--- tools/winebuild/utils.c.orig 2013-02-01 02:10:43.000000000 -0600
++++ tools/winebuild/utils.c 2013-02-04 19:17:05.000000000 -0600
+@@ -354,17 +354,11 @@
+
+ if (!as_command)
+ {
+- as_command = find_tool( "clang", NULL );
++ as_command = "@CLANG@";
+ if (as_command) as_is_clang = 1;
+ }
+
+ if (!as_command)
+- {
+- static const char * const commands[] = { "gas", "as", NULL };
+- as_command = find_tool( "as", commands );
+- }
+-
+- if (!as_command)
+ fatal_error( "cannot find suitable assembler\n" );
+
+ strarray_add_one( args, as_command );
Added: trunk/dports/x11/wine-devel/files/not-clang.patch
===================================================================
--- trunk/dports/x11/wine-devel/files/not-clang.patch (rev 0)
+++ trunk/dports/x11/wine-devel/files/not-clang.patch 2013-02-07 03:28:25 UTC (rev 102696)
@@ -0,0 +1,18 @@
+--- tools/winebuild/utils.c.orig 2013-02-01 02:10:43.000000000 -0600
++++ tools/winebuild/utils.c 2013-02-04 19:16:28.000000000 -0600
+@@ -354,14 +354,7 @@
+
+ if (!as_command)
+ {
+- as_command = find_tool( "clang", NULL );
+- if (as_command) as_is_clang = 1;
+- }
+-
+- if (!as_command)
+- {
+- static const char * const commands[] = { "gas", "as", NULL };
+- as_command = find_tool( "as", commands );
++ as_command = find_tool( "as", NULL );
+ }
+
+ if (!as_command)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130206/7c85ca81/attachment.html>
More information about the macports-changes
mailing list