[112044] trunk/dports/x11/wine

ryandesign at macports.org ryandesign at macports.org
Thu Oct 10 09:02:12 PDT 2013


Revision: 112044
          https://trac.macports.org/changeset/112044
Author:   ryandesign at macports.org
Date:     2013-10-10 09:02:12 -0700 (Thu, 10 Oct 2013)
Log Message:
-----------
wine: backport a fix from 1.7.1 to fix the build on Mavericks (#40724)

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

Added Paths:
-----------
    trunk/dports/x11/wine/files/patch-dlls-winemac.drv-gdi.c.diff

Modified: trunk/dports/x11/wine/Portfile
===================================================================
--- trunk/dports/x11/wine/Portfile	2013-10-10 15:44:34 UTC (rev 112043)
+++ trunk/dports/x11/wine/Portfile	2013-10-10 16:02:12 UTC (rev 112044)
@@ -97,6 +97,7 @@
 
 patchfiles                  BOOL.patch \
                             mach_machine.patch \
+                            patch-dlls-winemac.drv-gdi.c.diff \
                             tiger-shell.patch
 
 configure.ldflags-append    -framework CoreServices \

Added: trunk/dports/x11/wine/files/patch-dlls-winemac.drv-gdi.c.diff
===================================================================
--- trunk/dports/x11/wine/files/patch-dlls-winemac.drv-gdi.c.diff	                        (rev 0)
+++ trunk/dports/x11/wine/files/patch-dlls-winemac.drv-gdi.c.diff	2013-10-10 16:02:12 UTC (rev 112044)
@@ -0,0 +1,54 @@
+Fix build on Mavericks
+http://bugs.winehq.org/show_bug.cgi?id=34162
+--- dlls/winemac.drv/gdi.c.orig
++++ dlls/winemac.drv/gdi.c
+@@ -49,7 +49,6 @@ static int vert_res;            /* height in pixels of screen */
+ static int desktop_horz_res;    /* width in pixels of virtual desktop */
+ static int desktop_vert_res;    /* height in pixels of virtual desktop */
+ static int bits_per_pixel;      /* pixel depth of screen */
+-static int palette_size;        /* number of color entries in palette */
+ static int device_data_valid;   /* do the above variables have up-to-date values? */
+ 
+ static CRITICAL_SECTION device_data_section;
+@@ -141,7 +140,6 @@ static void device_init(void)
+     CGDirectDisplayID mainDisplay = CGMainDisplayID();
+     CGSize size_mm = CGDisplayScreenSize(mainDisplay);
+     CGDisplayModeRef mode = CGDisplayCopyDisplayMode(mainDisplay);
+-    CGDirectPaletteRef palette;
+ 
+     /* Initialize device caps */
+     log_pixels_x = log_pixels_y = get_dpi();
+@@ -187,15 +185,6 @@ static void device_init(void)
+     desktop_horz_res = desktop_rect.size.width;
+     desktop_vert_res = desktop_rect.size.height;
+ 
+-    palette = CGPaletteCreateWithDisplay(mainDisplay);
+-    if (palette)
+-    {
+-        palette_size = CGPaletteGetNumberOfSamples(palette);
+-        CGPaletteRelease(palette);
+-    }
+-    else
+-        palette_size = 0;
+-
+     device_data_valid = TRUE;
+ }
+ 
+@@ -368,7 +357,7 @@ static INT macdrv_GetDeviceCaps(PHYSDEV dev, INT cap)
+     case RASTERCAPS:
+         ret = (RC_BITBLT | RC_BANDING | RC_SCALING | RC_BITMAP64 | RC_DI_BITMAP |
+                RC_DIBTODEV | RC_BIGFONT | RC_STRETCHBLT | RC_STRETCHDIB | RC_DEVBITS |
+-               (palette_size ? RC_PALETTE : 0));
++               (bits_per_pixel <= 8 ? RC_PALETTE : 0));
+         break;
+     case SHADEBLENDCAPS:
+         ret = (SB_GRAD_RECT | SB_GRAD_TRI | SB_CONST_ALPHA | SB_PIXEL_ALPHA);
+@@ -393,7 +382,7 @@ static INT macdrv_GetDeviceCaps(PHYSDEV dev, INT cap)
+         ret = 0;
+         break;
+     case SIZEPALETTE:
+-        ret = palette_size;
++        ret = bits_per_pixel <= 8 ? 1 << bits_per_pixel : 0;
+         break;
+     case NUMRESERVED:
+     case PHYSICALWIDTH:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131010/42a506cb/attachment.html>


More information about the macports-changes mailing list