1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Fix build with gcc 4.2

PR:		118628
Submitted by:	Pietro Cerutti <gahr@gahr.ch>
This commit is contained in:
Martin Wilke 2007-12-14 19:08:40 +00:00
parent 92d5ba518f
commit df688841b9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=203617
5 changed files with 52 additions and 7 deletions

View File

@ -24,14 +24,10 @@ CONFIGURE_ENV= LOCALBASE="${LOCALBASE}"
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

View File

@ -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

View File

@ -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 */

View File

@ -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++)
{

View File

@ -16,4 +16,4 @@ internally during the opening process).
You can freely jump forwards and backwards between the frames in
an opened file.
WWW: http://sourceforge.net/projects/mjpeg/
WWW: http://sourceforge.net/projects/mjpeg/