ports/63745: [Patch] multimedia/mjpegtools -- Fix build on 5.x
michael johnson
ahze at ahze.net
Thu Mar 4 07:30:24 UTC 2004
>Number: 63745
>Category: ports
>Synopsis: [Patch] multimedia/mjpegtools -- Fix build on 5.x
>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 Mar 03 23:30:23 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: michael johnson
>Release: 5.2-CURRENT
>Organization:
>Environment:
>Description:
This fixes build on 5.x current
I tested on both 4.x and 5.x.
patch-gcc-yuvdenoise::motion.c came from gentoo portage.
I wasn't quite sure what to do with
@${REINPLACE_CMD} -e 's|#include <getopt.h>|#include "/usr/include/getop
t.h"|'
this might be the wrong way to include /usr/include/getopt.h instead of /usr/local/include/getopt.h. please tell me if this is wrong.
>How-To-Repeat:
>Fix:
diff -ruN multimedia/mjpegtools.orig/Makefile multimedia/mjpegtools/Makefile
--- multimedia/mjpegtools.orig/Makefile Wed Mar 3 23:36:15 2004
+++ multimedia/mjpegtools/Makefile Thu Mar 4 02:16:40 2004
@@ -54,10 +54,6 @@
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502102
-BROKEN= "Does not compile"
-.endif
-
.if ${ARCH} != "i386"
PLIST_SUB+= DIVX='@comment '
.else
@@ -142,6 +138,12 @@
.endif
post-patch:
+ @${REINPLACE_CMD} -e 's|#include <getopt.h>|#include "/usr/include/getopt.h"|' \
+ ${WRKSRC}/lavtools/divxdec.cpp \
+ ${WRKSRC}/lavtools/lav2divx.cpp \
+ ${WRKSRC}/lavtools/lavplay.c \
+ ${WRKSRC}/lavtools/lavrec.c \
+ ${WRKSRC}/lavtools/yuv2divx.cpp
@${REINPLACE_CMD} -E -e 's|^(pkgconfigdir = )\$$\(libdir\)/(pkgconfig)|\1${PREFIX}/libdata/\2|' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|stdint.h|sys/types.h|' \
diff -ruN multimedia/mjpegtools.orig/files/patch-gcc3-yuvdenoise::motion.c multimedia/mjpegtools/files/patch-gcc3-yuvdenoise::motion.c
--- multimedia/mjpegtools.orig/files/patch-gcc3-yuvdenoise::motion.c Wed Dec 31 19:00:00 1969
+++ multimedia/mjpegtools/files/patch-gcc3-yuvdenoise::motion.c Thu Mar 4 02:13:46 2004
@@ -0,0 +1,60 @@
+diff -uNr yuvdenoise/motion.c yuvdenoise/motion.c.orig
+--- yuvdenoise/motion.c 2002-05-06 04:13:37.000000000 -0400
++++ yuvdenoise/motion.c.orig 2003-07-25 01:52:38.339744992 -0400
+@@ -251,6 +251,9 @@
+ " movl %1 , %%eax; /* load frameadress into eax */\n"
+ " movl %2 , %%ebx; /* load frameadress into ebx */\n"
+ " movl %3 , %%ecx; /* load width into ecx */\n"
++ " shrl $1 , %%ecx; /* shift width to scale it in the asm. */\n"
++ " /* why? we need an lvalue as input... gcc33... */\n"
++ " /* (carrbc1 at wfu.edu) */\n"
+ " /* */\n"
+ ".rept 4 ; /* Loop for 4 lines */\n"
+ " movd (%%eax), %%mm1; /* 4 Pixels from filtered frame to mm1 */\n"
+@@ -270,7 +273,7 @@
+ " /* */\n"
+ " movq %%mm0 , %0 ; /* make mm0 available to gcc ... */\n"
+ :"=m" (a)
+- :"m" (frm), "m" (ref), "m" (denoiser.frame.w/2)
++ :"m" (frm), "m" (ref), "m" (denoiser.frame.w)
+ :"%eax", "%ebx", "%ecx"
+ );
+ #endif
+@@ -295,7 +298,10 @@
+ " movl %1 , %%eax; /* load frameadress into eax */\n"
+ " movl %2 , %%ebx; /* load frameadress into ebx */\n"
+ " movl %3 , %%ecx; /* load width into ecx */\n"
+- " ; /* */\n"
++ " shrl $1 , %%ecx; /* shift width to scale it in the asm. */\n"
++ " /* why? we need an lvalue as input... gcc33... */\n"
++ " /* (carrbc1 at wfu.edu) */\n"
++ " /* */\n"
+ " .rept 4 ; /* */\n"
+ " movd (%%eax), %%mm1; /* 4 Pixels from filtered frame to mm1 */\n"
+ " movd (%%ebx), %%mm2; /* 4 Pixels from filtered frame to mm2 */\n"
+@@ -307,7 +313,7 @@
+ " /* */\n"
+ " movq %%mm0 , %0 ; /* make mm0 available to gcc ... */\n"
+ :"=m" (a)
+- :"m" (frm), "m" (ref), "m" (denoiser.frame.w/2)
++ :"m" (frm), "m" (ref), "m" (denoiser.frame.w)
+ :"%eax", "%ebx", "%ecx"
+ );
+ #endif
+@@ -349,6 +355,7 @@
+ static uint32_t a;
+ #ifdef HAVE_ASM_MMX
+ static uint32_t bit_mask[2] = {0x7f7f7f7f,0x7f7f7f7f};
++ static uint32_t* bit_mask_addr = bit_mask;
+
+ __asm__ __volatile__
+ (
+@@ -380,7 +387,7 @@
+ " /* */"
+ " movq %%mm0 , %0 ; /* make mm0 available to gcc ... */"
+ :"=m" (a)
+- :"m" (frm1),"m" (frm2), "m" (ref), "m" (denoiser.frame.w), "m" (bit_mask)
++ :"m" (frm1),"m" (frm2), "m" (ref), "m" (denoiser.frame.w), "m" (bit_mask_addr)
+ :"%eax", "%ebx", "%ecx", "%edx"
+ );
+ #endif
diff -ruN multimedia/mjpegtools.orig/files/patch-mplex::systems.hh multimedia/mjpegtools/files/patch-mplex::systems.hh
--- multimedia/mjpegtools.orig/files/patch-mplex::systems.hh Wed Dec 31 19:00:00 1969
+++ multimedia/mjpegtools/files/patch-mplex::systems.hh Thu Mar 4 01:47:07 2004
@@ -0,0 +1,11 @@
+--- mplex/systems.hh.orig Thu Mar 4 01:45:50 2004
++++ mplex/systems.hh Thu Mar 4 01:46:04 2004
+@@ -4,6 +4,8 @@
+ #include <sys/param.h>
+ #include "inputstrm.hh"
+
++#include <cassert>
++
+ #include <vector>
+
+ using std::vector;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list