aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libmovtar
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-12-15 03:08:40 +0800
committermiwi <miwi@FreeBSD.org>2007-12-15 03:08:40 +0800
commit578f81291d8057bba10670f5e9cce5b1e046d25d (patch)
treefe5319dd7c0316c86bd05fac562f309768b24c22 /multimedia/libmovtar
parent987396a4f242ed78e47070ddabbdf39a3afb3d46 (diff)
downloadfreebsd-ports-gnome-578f81291d8057bba10670f5e9cce5b1e046d25d.tar.gz
freebsd-ports-gnome-578f81291d8057bba10670f5e9cce5b1e046d25d.tar.zst
freebsd-ports-gnome-578f81291d8057bba10670f5e9cce5b1e046d25d.zip
- Fix build with gcc 4.2
PR: 118628 Submitted by: Pietro Cerutti <gahr@gahr.ch>
Diffstat (limited to 'multimedia/libmovtar')
-rw-r--r--multimedia/libmovtar/Makefile8
-rw-r--r--multimedia/libmovtar/files/patch-movtar_play.c28
-rw-r--r--multimedia/libmovtar/files/patch-movtar_yuv422.c10
-rw-r--r--multimedia/libmovtar/files/patch-rtjpeg_RTjpeg.c11
-rw-r--r--multimedia/libmovtar/pkg-descr2
5 files changed, 52 insertions, 7 deletions
diff --git a/multimedia/libmovtar/Makefile b/multimedia/libmovtar/Makefile
index c5893d189258..c48bc707819e 100644
--- a/multimedia/libmovtar/Makefile
+++ b/multimedia/libmovtar/Makefile
@@ -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
diff --git a/multimedia/libmovtar/files/patch-movtar_play.c b/multimedia/libmovtar/files/patch-movtar_play.c
new file mode 100644
index 000000000000..e20d199244b3
--- /dev/null
+++ b/multimedia/libmovtar/files/patch-movtar_play.c
@@ -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
+
diff --git a/multimedia/libmovtar/files/patch-movtar_yuv422.c b/multimedia/libmovtar/files/patch-movtar_yuv422.c
new file mode 100644
index 000000000000..e30a3f7159d2
--- /dev/null
+++ b/multimedia/libmovtar/files/patch-movtar_yuv422.c
@@ -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 */
diff --git a/multimedia/libmovtar/files/patch-rtjpeg_RTjpeg.c b/multimedia/libmovtar/files/patch-rtjpeg_RTjpeg.c
new file mode 100644
index 000000000000..f6fdb2b55c56
--- /dev/null
+++ b/multimedia/libmovtar/files/patch-rtjpeg_RTjpeg.c
@@ -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++)
+ {
diff --git a/multimedia/libmovtar/pkg-descr b/multimedia/libmovtar/pkg-descr
index 985d0b074926..bd4a77d86130 100644
--- a/multimedia/libmovtar/pkg-descr
+++ b/multimedia/libmovtar/pkg-descr
@@ -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/ \ No newline at end of file
+WWW: http://sourceforge.net/projects/mjpeg/