ports/116126: [patch] multimedia/fxtv: unbreak on HEAD (gcc 4.2)

Simun Mikecin numisemis at yahoo.com
Wed Sep 5 16:50:01 UTC 2007


>Number:         116126
>Category:       ports
>Synopsis:       [patch] multimedia/fxtv: unbreak on HEAD (gcc 4.2)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 16:50:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Simun Mikecin
>Release:        FreeBSD/amd64 -CURRENT
>Organization:
>Environment:
FreeBSD xxx 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Sep  1 15:18:17 CEST 2007     root at xxx:/usr/obj/usr/src.current/sys/DATA  amd64
>Description:
This patch unbreaks building this port on 7-CURRENT (with gcc 4.2)

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN fxtv.orig/Makefile fxtv/Makefile
--- fxtv.orig/Makefile	2007-05-27 04:39:44.000000000 +0200
+++ fxtv/Makefile	2007-09-05 18:42:04.297237642 +0200
@@ -31,10 +31,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 700042
-BROKEN=		Broken with gcc 4.2
-.endif
-
 # This program does not actually require the programs below unless you
 #   use audio/video recording and/or playback and save to a non-raw format.
 .if defined(WITH_EXTRA)
diff -urN fxtv.orig/files/patch-videolib_videolib.c fxtv/files/patch-videolib_videolib.c
--- fxtv.orig/files/patch-videolib_videolib.c	1970-01-01 01:00:00.000000000 +0100
+++ fxtv/files/patch-videolib_videolib.c	2007-09-05 18:33:20.524964412 +0200
@@ -0,0 +1,38 @@
+--- videolib/videolib.c.orig	1999-11-03 03:22:04.000000000 +0100
++++ videolib/videolib.c	2007-09-05 18:31:05.000000000 +0200
+@@ -479,9 +479,8 @@
+             *(p++) = (*src16 >> 8) | (*src16 << 8);
+             src16++;
+           }
+-          for ( i = dst_line_pad; i > 0; i-- )
+-            *(((VL_UINT8 *)p)++) = 0x00;
+-          (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
++          memset(p, 0, dst_line_pad);
++          dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+         }
+ 
+         src16 = dst_line = (VL_UINT16 *) dst->buf;
+@@ -513,9 +512,9 @@
+         if ( src_padded ) 
+           src16 = (VL_UINT16 *)( (VL_UINT8 *)src16 + dst_line_pad );
+         else
+-          for ( i = dst_line_pad; i > 0; i-- )
+-            *(((VL_UINT8 *)dst)++) = 0x00;
+-        (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
++          memset(dst, 0, dst_line_pad);
++          dst += dst_line_pad / sizeof(VL_IMAGE);
++          dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+       }
+ 
+       if ( !dst_swap_b ) {                       /*  More ugliness  */
+@@ -527,8 +526,8 @@
+             *(p++) = (*src16 >> 8) | (*src16 << 8);
+             src16++;
+           }
+-          (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
+-          (VL_UINT8 *)src16    += dst->geom.bytes_per_line;
++          dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
++          src16    += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+         }
+       }
+     }


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list