diff options
author | miwi <miwi@FreeBSD.org> | 2007-11-05 18:04:34 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-11-05 18:04:34 +0800 |
commit | ac7e66010a6f06a91e9bf1cf4811a500a54f7b42 (patch) | |
tree | 936ace1351ba2bd23a47302740ee1705e4d72bec | |
parent | 427ea7655d1e86fa7ece9135676d05961e2250ec (diff) | |
download | freebsd-ports-gnome-ac7e66010a6f06a91e9bf1cf4811a500a54f7b42.tar.gz freebsd-ports-gnome-ac7e66010a6f06a91e9bf1cf4811a500a54f7b42.tar.zst freebsd-ports-gnome-ac7e66010a6f06a91e9bf1cf4811a500a54f7b42.zip |
- Unbreak
- Fix build with gcc 4.2
PR: 117765
Submitted by: Pietro Cerutti <gahr@gahr.ch>
Approved by: portmgr (pav)
-rw-r--r-- | devel/directfb/Makefile | 4 | ||||
-rw-r--r-- | devel/directfb/files/patch-interfaces-IDirectFBImageProvider-idirectfbimageprovider_jpeg.c | 20 | ||||
-rw-r--r-- | devel/directfb/files/patch-src-core-input.c | 11 | ||||
-rw-r--r-- | devel/directfb/files/patch-src-display-idirectfbsurface.c | 15 | ||||
-rw-r--r-- | devel/directfb/files/patch-src-gfx-generic-generic.c | 12 | ||||
-rw-r--r-- | devel/directfb/files/patch-src-misc-gfx_util.c | 71 | ||||
-rw-r--r-- | devel/directfb/files/patch-src-misc-memcpy.c | 46 |
7 files changed, 175 insertions, 4 deletions
diff --git a/devel/directfb/Makefile b/devel/directfb/Makefile index 4a0d21d3d231..bb058f9de57d 100644 --- a/devel/directfb/Makefile +++ b/devel/directfb/Makefile @@ -46,10 +46,6 @@ MAN5= directfbrc.5 .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 700042 -BROKEN= Does not compile with GCC 4.2 -.endif - .if ${ARCH} == "alpha" BROKEN= Does not compile on alpha .endif diff --git a/devel/directfb/files/patch-interfaces-IDirectFBImageProvider-idirectfbimageprovider_jpeg.c b/devel/directfb/files/patch-interfaces-IDirectFBImageProvider-idirectfbimageprovider_jpeg.c new file mode 100644 index 000000000000..7c1022a1afea --- /dev/null +++ b/devel/directfb/files/patch-interfaces-IDirectFBImageProvider-idirectfbimageprovider_jpeg.c @@ -0,0 +1,20 @@ +--- interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c.orig 2007-11-02 12:40:44.000000000 +0100 ++++ interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c 2007-11-02 12:42:20.000000000 +0100 +@@ -464,7 +464,7 @@ + BUG("unsupported format not filtered before"); + return DFB_BUG; + } +- (__u8*)row_ptr += pitch; ++ row_ptr = (__u8*)row_ptr + pitch; + } + } + else { /* image must be scaled */ +@@ -474,7 +474,7 @@ + while (cinfo.output_scanline < cinfo.output_height) { + jpeg_read_scanlines(&cinfo, buffer, 1); + copy_line32( (__u32*)row_ptr, *buffer, cinfo.output_width); +- (__u32*)row_ptr += cinfo.output_width; ++ row_ptr = (__u32*)row_ptr + cinfo.output_width; + } + dfb_scale_linear_32( dst, image_data, cinfo.output_width, + cinfo.output_height, rect.w, rect.h, diff --git a/devel/directfb/files/patch-src-core-input.c b/devel/directfb/files/patch-src-core-input.c new file mode 100644 index 000000000000..7a80ce7a7057 --- /dev/null +++ b/devel/directfb/files/patch-src-core-input.c @@ -0,0 +1,11 @@ +--- src/core/input.c.orig 2002-12-29 01:17:06.000000000 +0100 ++++ src/core/input.c 2007-11-02 12:17:48.000000000 +0100 +@@ -1312,7 +1312,7 @@ + + write( fd, buf24, surface->width * 3 ); + +- ((__u8*)data) += pitch; ++ data = (__u8*)data + pitch; + } + + dfb_surface_unlock( surface, (surface->caps & DSCAPS_FLIPPING) ); diff --git a/devel/directfb/files/patch-src-display-idirectfbsurface.c b/devel/directfb/files/patch-src-display-idirectfbsurface.c new file mode 100644 index 000000000000..79355e46710f --- /dev/null +++ b/devel/directfb/files/patch-src-display-idirectfbsurface.c @@ -0,0 +1,15 @@ +--- src/display/idirectfbsurface.c.orig 2007-11-02 12:19:20.000000000 +0100 ++++ src/display/idirectfbsurface.c 2007-11-02 12:27:33.000000000 +0100 +@@ -298,9 +298,9 @@ + if (ret) + return ret; + +- (__u8*)(*ptr) += data->area.current.y * (*pitch) + +- data->area.current.x * +- DFB_BYTES_PER_PIXEL(data->surface->format); ++ *ptr = (__u8 *)(*ptr) + (data->area.current.y * (*pitch) + ++ data->area.current.x * ++ DFB_BYTES_PER_PIXEL(data->surface->format)); + + data->locked = front + 1; + diff --git a/devel/directfb/files/patch-src-gfx-generic-generic.c b/devel/directfb/files/patch-src-gfx-generic-generic.c new file mode 100644 index 000000000000..b5fc2cb322fd --- /dev/null +++ b/devel/directfb/files/patch-src-gfx-generic-generic.c @@ -0,0 +1,12 @@ +--- src/gfx/generic/generic.c.orig 2007-11-02 12:36:17.000000000 +0100 ++++ src/gfx/generic/generic.c 2007-11-02 12:40:03.000000000 +0100 +@@ -555,7 +555,8 @@ + __u16 *S = (__u16*)Bop; + + if (((long)D)&2) { +- *(((__u16*)D)++) = *S; ++ D = (__u16*)D++; ++ *D = *S; + i += SperD; + w--; + } diff --git a/devel/directfb/files/patch-src-misc-gfx_util.c b/devel/directfb/files/patch-src-misc-gfx_util.c new file mode 100644 index 000000000000..6707b528aba1 --- /dev/null +++ b/devel/directfb/files/patch-src-misc-gfx_util.c @@ -0,0 +1,71 @@ +--- src/misc/gfx_util.c.orig 2007-11-02 12:28:22.000000000 +0100 ++++ src/misc/gfx_util.c 2007-11-02 12:32:42.000000000 +0100 +@@ -138,14 +138,14 @@ + *(__u8 *)dst++ = *src >> 24; + src++; + } +- (__u8 *)dst += dskip; ++ dst = (__u8 *)dst + dskip; + } + break; + + case DSPF_ARGB: + for (y = 0; y < h; y++) { + dfb_memcpy (dst, src, w * 4); +- (__u8 *)dst += w * 4 + dskip; ++ dst = (__u8 *)dst + (w * 3 + dskip); + src += w; + } + break; +@@ -174,10 +174,10 @@ + a, dst_format, palette); + break; + } +- (__u8 *)dst += DFB_BYTES_PER_PIXEL (dst_format); ++ dst = (__u8 *)dst + (DFB_BYTES_PER_PIXEL (dst_format)); + src++; + } +- (__u8 *)dst += dskip; ++ dst = (__u8 *)dst + dskip; + } + break; + } +@@ -380,7 +380,7 @@ + x += x_step; + } + +- return dst; ++ return (char *)dst; + } + + void dfb_scale_linear_32( void *dst, __u32 *src, int sw, int sh, +@@ -446,9 +446,9 @@ + y_start++; + } + +- (__u8 *)outbuf = ++ outbuf = + dst + i * (DFB_BYTES_PER_PIXEL (dst_format) * dw + dskip); +- (__u8 *)outbuf_end = outbuf + DFB_BYTES_PER_PIXEL (dst_format) * dw; ++ outbuf_end = outbuf + DFB_BYTES_PER_PIXEL (dst_format) * dw; + x = scaled_x_offset; + x_start = x >> SCALE_SHIFT; + dest_x = 0; +@@ -462,7 +462,7 @@ + x += x_step; + x_start = x >> SCALE_SHIFT; + dest_x++; +- (__u8 *)outbuf += DFB_BYTES_PER_PIXEL (dst_format); ++ outbuf = (__u8 *)outbuf + DFB_BYTES_PER_PIXEL (dst_format); + } + + new_outbuf = scale_line (run_weights, filter.n_x, filter.n_y, outbuf, +@@ -480,7 +480,7 @@ + x >> SCALE_SHIFT, sw, dst_format, palette); + + x += x_step; +- (__u8 *)outbuf += DFB_BYTES_PER_PIXEL (dst_format); ++ outbuf = (__u8 *)outbuf + DFB_BYTES_PER_PIXEL (dst_format); + } + + y += y_step; diff --git a/devel/directfb/files/patch-src-misc-memcpy.c b/devel/directfb/files/patch-src-misc-memcpy.c new file mode 100644 index 000000000000..981ca7725413 --- /dev/null +++ b/devel/directfb/files/patch-src-misc-memcpy.c @@ -0,0 +1,46 @@ +--- src/misc/memcpy.c.orig 2007-11-02 12:33:04.000000000 +0100 ++++ src/misc/memcpy.c 2007-11-02 12:35:27.000000000 +0100 +@@ -226,8 +226,8 @@ + "movq %%mm6, 48(%1)\n" + "movq %%mm7, 56(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- ((const unsigned char *)from)+=64; +- ((unsigned char *)to)+=64; ++ from = (const unsigned char *)from + 64; ++ to = (unsigned char *)to + 64; + } + __asm__ __volatile__ ("emms":::"memory"); + } +@@ -288,8 +288,8 @@ + "movntq %%mm6, 48(%1)\n" + "movntq %%mm7, 56(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- ((const unsigned char *)from)+=64; +- ((unsigned char *)to)+=64; ++ from = (const unsigned char *)from + 64; ++ to = (unsigned char *)to + 64; + } + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ +@@ -346,8 +346,8 @@ + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- ((const unsigned char *)from)+=64; +- ((unsigned char *)to)+=64; ++ from = (const unsigned char *)from + 64; ++ to = (unsigned char *)to + 64; + } + else + /* +@@ -368,8 +368,8 @@ + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- ((const unsigned char *)from)+=64; +- ((unsigned char *)to)+=64; ++ from = (const unsigned char *)from + 64; ++ to = (unsigned char *)to + 64; + } + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ |