From nobody@FreeBSD.org  Wed Sep  5 16:45:56 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4276716A417
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2007 16:45:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EEEF13C4DB
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2007 16:45:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l85GjrW4084572
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 5 Sep 2007 16:45:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l85GjreZ084571;
	Wed, 5 Sep 2007 16:45:53 GMT
	(envelope-from nobody)
Message-Id: <200709051645.l85GjreZ084571@www.freebsd.org>
Date: Wed, 5 Sep 2007 16:45:53 GMT
From: Simun Mikecin <numisemis@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] multimedia/fxtv: unbreak on HEAD (gcc 4.2)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 16:50:01 GMT 2007
>Closed-Date:    Sat Sep 08 12:10:15 GMT 2007
>Last-Modified:  Sat Sep  8 12:20:01 GMT 2007
>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@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:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sat Sep 8 12:09:58 UTC 2007 
State-Changed-Why:  
Commited, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116126 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/116126: commit references a PR
Date: Sat,  8 Sep 2007 12:09:45 +0000 (UTC)

 edwin       2007-09-08 12:09:40 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/fxtv      Makefile 
   Added files:
     multimedia/fxtv/files patch-videolib_videolib.c 
   Log:
   [patch] multimedia/fxtv: unbreak on HEAD (gcc 4.2)
   
           This patch unbreaks building this port on 7-CURRENT (with gcc 4.2)
   
   PR:             ports/116126
   Submitted by:   Simun Mikecin <numisemis@yahoo.com>
   
   Revision  Changes    Path
   1.49      +1 -5      ports/multimedia/fxtv/Makefile
   1.1       +38 -0     ports/multimedia/fxtv/files/patch-videolib_videolib.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
