Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2007 22:48:11 +0100
From:      "Pietro Cerutti" <gahr@gahr.ch>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/118628: [patch] multimedia/libmovtar unbreak fix build with GCC 4.2
Message-ID:  <1197496091.67083@gahrtop.localhost>
Resent-Message-ID: <200712122150.lBCLo15u072503@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118628
>Category:       ports
>Synopsis:       [patch] multimedia/libmovtar unbreak fix build with 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 Dec 12 21:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Pietro Cerutti
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #16: Mon Dec 10 15:59:52 CET 2007
    root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034



>Description:


The patch below:

- fixes a "cast used as lvalue" error
- fixes a few type mismatch errors

Tested on:
8.0-CURRENT i386
7.0-BETA3 sparc64


>How-To-Repeat:





>Fix:


--- _libmovtar.diff begins here ---
--- Makefile.orig	2007-12-12 22:38:17.000000000 +0100
+++ Makefile	2007-12-12 22:38:17.000000000 +0100
@@ -24,14 +24,10 @@
 MAKE_ENV=	PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
 		PTHREAD_LIBS=${PTHREAD_LIBS}
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Broken with gcc 4.2
-.endif
-
 LIB_DEPENDS+=	jpeg.9:${PORTSDIR}/graphics/jpeg
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 # Add library patch when using -ljpeg
 # Use proper locations when using -ljpeg-mmx
--- /dev/null	2007-12-12 22:33:19.000000000 +0100
+++ files/patch-movtar_play.c	2007-12-12 22:27:36.000000000 +0100
@@ -0,0 +1,28 @@
+--- movtar_play.c.orig	2007-12-12 22:22:44.000000000 +0100
++++ movtar_play.c	2007-12-12 22:27:09.000000000 +0100
+@@ -141,9 +141,9 @@
+ #if defined(__GNUC__)
+ #define int64 unsigned long long
+ #endif
+-static const int64 te0 = 0x0080008000800080; // -128 << 2
+-static const int64 te1 = 0xe9fa7168e9fa7168; // for cb 
+-static const int64 te2 = 0x59bad24d59bad24d; // for cr
++static const int64 te0 = 0x0080008000800080ULL; // -128 << 2
++static const int64 te1 = 0xe9fa7168e9fa7168ULL; // for cb 
++static const int64 te2 = 0x59bad24d59bad24dULL; // for cr
+ 
+ METHODDEF(void)
+ ycc_rgb32_convert_mmx (j_decompress_ptr cinfo,
+@@ -263,9 +263,9 @@
+   asm ("emms");
+ }
+ 
+-static int64 rb16mask = 0x00f800f800f800f8; // just red and blue remain
+-static int64 rb16mult = 0x2000000820000008; // mult/Add factor (see intel appnote 553)
+-static int64 g16mask = 0x0000f8000000f800; // just green remains
++static int64 rb16mask = 0x00f800f800f800f8ULL; // just red and blue remain
++static int64 rb16mult = 0x2000000820000008ULL; // mult/Add factor (see intel appnote 553)
++static int64 g16mask = 0x0000f8000000f800ULL; // just green remains
+ static int64 rgb16offset = 6; // shift right after the whole stuff
+ static const int64 shiftmask = 0xffff; // shift right after the whole stuff
+ 
--- /dev/null	2007-12-12 22:33:19.000000000 +0100
+++ files/patch-movtar_yuv422.c	2007-12-12 22:29:23.000000000 +0100
@@ -0,0 +1,10 @@
+--- movtar_yuv422.c.orig	2007-12-12 22:28:38.000000000 +0100
++++ movtar_yuv422.c	2007-12-12 22:29:00.000000000 +0100
+@@ -32,6 +32,7 @@
+ */
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <jpeglib.h>
+ 
+ #define MAXPIXELS (1024*1024)  /* Maximum size of final image */
--- /dev/null	2007-12-12 22:33:19.000000000 +0100
+++ files/patch-rtjpeg_RTjpeg.c	2007-12-12 22:21:42.000000000 +0100
@@ -0,0 +1,11 @@
+--- rtjpeg/RTjpeg.c.orig	2007-12-12 22:20:39.000000000 +0100
++++ rtjpeg/RTjpeg.c	2007-12-12 22:21:15.000000000 +0100
+@@ -129,7 +129,7 @@
+  register int ci, co=1, tmp;
+  register __s16 ZZvalue;
+ 
+- (__u8)strm[0]=(__u8)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
++ strm[0]=(__u8)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
+  
+  for(ci=1; ci<=bt8; ci++) 
+  {
--- _libmovtar.diff ends here ---



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1197496091.67083>