summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-10-22 05:36:10 +0000
committerMike Frysinger <vapier@gentoo.org>2006-10-22 05:36:10 +0000
commit4011ca469b2b2efa186c126385b7cdf5d51bf737 (patch)
treecb880d7c8f07a490e016e83d88ff5bb1e5f61279 /media-video/SDLcam/files
parentold (diff)
downloadgentoo-2-4011ca469b2b2efa186c126385b7cdf5d51bf737.tar.gz
gentoo-2-4011ca469b2b2efa186c126385b7cdf5d51bf737.tar.bz2
gentoo-2-4011ca469b2b2efa186c126385b7cdf5d51bf737.zip
Cleanup the build system some more and fix asm build errors in mmx code #152002 by Thomas Tuttle.
(Portage version: 2.1.2_pre3-r5)
Diffstat (limited to 'media-video/SDLcam/files')
-rw-r--r--media-video/SDLcam/files/SDLcam-0.7.3-build.patch9
-rw-r--r--media-video/SDLcam/files/SDLcam-0.7.3-jpeg.patch14
-rw-r--r--media-video/SDLcam/files/SDLcam-0.7.3-prototypes.patch23
-rw-r--r--media-video/SDLcam/files/SDLcam-0.7.3-relax-asm.patch74
4 files changed, 118 insertions, 2 deletions
diff --git a/media-video/SDLcam/files/SDLcam-0.7.3-build.patch b/media-video/SDLcam/files/SDLcam-0.7.3-build.patch
index ecbead404887..b7a83aa49246 100644
--- a/media-video/SDLcam/files/SDLcam-0.7.3-build.patch
+++ b/media-video/SDLcam/files/SDLcam-0.7.3-build.patch
@@ -21,7 +21,7 @@
OBJS = main.o init.o SDL_v4l.o SDL_v4l_filters.o webcam.o interface.o configuration.o config_file.o SDL_v4l_filters_thomas.o dump_thomas.o capture.o ftp-upload.o logo.o parser.o misc.o xml_theme.o dyn_misc.o
-@@ -31,28 +32,28 @@
+@@ -31,32 +32,30 @@
./install
%.o: %.cpp
@@ -57,4 +57,9 @@
+ $(CXX) $(CXXFLAGS) -fPIC -shared -o $@ $? $(LDFLAGS)
SDLcam: $(OBJS)
- $(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
+- $(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) -o $(PROG)
+ # $(LD) $(LDFLAGS) $(OBJS) -o $(PROG) -laviplay
+
+-SDL_v4l_filters_thomas.o: SDL_v4l_filters_thomas.c
+- $(CC) $(MMXFLAGS) -c SDL_v4l_filters_thomas.c
diff --git a/media-video/SDLcam/files/SDLcam-0.7.3-jpeg.patch b/media-video/SDLcam/files/SDLcam-0.7.3-jpeg.patch
new file mode 100644
index 000000000000..5a64286ed747
--- /dev/null
+++ b/media-video/SDLcam/files/SDLcam-0.7.3-jpeg.patch
@@ -0,0 +1,14 @@
+make sure we always include jpeglib.h
+
+--- dump_thomas.c
++++ dump_thomas.c
+@@ -29,8 +29,8 @@
+
+ #ifdef __cplusplus
+ extern "C" {
+-#include <jpeglib.h>
+ #endif
++#include <jpeglib.h>
+
+ int write_file_jpeg (char *file_name, unsigned char *data, int width, int height) {{{
+ struct jpeg_compress_struct jpeg;
diff --git a/media-video/SDLcam/files/SDLcam-0.7.3-prototypes.patch b/media-video/SDLcam/files/SDLcam-0.7.3-prototypes.patch
index 05056f1e96ca..c69612fe201d 100644
--- a/media-video/SDLcam/files/SDLcam-0.7.3-prototypes.patch
+++ b/media-video/SDLcam/files/SDLcam-0.7.3-prototypes.patch
@@ -30,3 +30,26 @@
int diry = image->w;
int xinc = 1;
int yinc = 1;
+--- SDL_v4l_image.h
++++ SDL_v4l_image.h
+@@ -1,5 +1,10 @@
+ #ifndef SDL_V4L_IMAGE_H
+ #define SDL_V4L_IMAGE_H
++
++#include <string.h>
++#include <stdio.h>
++#include <unistd.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- filter/Barcode.c
++++ filter/Barcode.c
+@@ -22,6 +22,7 @@
+ // TODO: Add support for UPC_E, EAN_13, EAN_8 and CODE_39
+ // TODO: Add vertical and diagonal scanning
+
++#include <stdio.h>
+ #include <string.h>
+ #include <math.h>
+
diff --git a/media-video/SDLcam/files/SDLcam-0.7.3-relax-asm.patch b/media-video/SDLcam/files/SDLcam-0.7.3-relax-asm.patch
new file mode 100644
index 000000000000..e24558c8c0ab
--- /dev/null
+++ b/media-video/SDLcam/files/SDLcam-0.7.3-relax-asm.patch
@@ -0,0 +1,74 @@
+fix build errors:
+
+SDL_v4l_filters_thomas.c: In function 'MMX_add_sub_shr':
+SDL_v4l_filters_thomas.c:50: error: memory input 3 is not directly addressable
+SDL_v4l_filters_thomas.c: In function 'yuv420p_to_rgb32':
+SDL_v4l_filters_thomas.c:154: error: memory input 4 is not directly addressable
+SDL_v4l_filters_thomas.c:154: error: memory input 5 is not directly addressable
+SDL_v4l_filters_thomas.c: In function 'yuv420p_to_bgr32':
+SDL_v4l_filters_thomas.c:256: error: memory input 4 is not directly addressable
+SDL_v4l_filters_thomas.c:256: error: memory input 5 is not directly addressable
+
+filter/Bluebox.c: In function 'Apply':
+filter/Bluebox.c:57: error: memory input 2 is not directly addressable
+
+filter/Trashmask.c: In function 'Apply':
+filter/Trashmask.c:58: error: memory input 2 is not directly addressable
+
+http://bugs.gentoo.org/152002
+
+--- SDL_v4l_filters_thomas.c
++++ SDL_v4l_filters_thomas.c
+@@ -94,7 +94,7 @@
+ : "=m" (bild) // %0
+ :"m" (buf), // %1
+ "m" (summe), // %2
+- "m" (SHIFT), // %3
++ "g" (SHIFT), // %3
+ "m" (len) // %4
+ );
+ return 1;
+@@ -226,8 +226,8 @@
+ : "m" (u), //%1
+ "m" (v), //%2
+ "m" (d), //%3
+- "m" (ng_clip), //%4
+- "m" (ng_yuv_g2) //%5
++ "g" (ng_clip), //%4
++ "g" (ng_yuv_g2) //%5
+ );
+ d+=8;
+ y+=2;
+@@ -328,8 +328,8 @@
+ : "m" (u), //%1
+ "m" (v), //%2
+ "m" (d), //%3
+- "m" (ng_clip), //%4
+- "m" (ng_yuv_g2) //%5
++ "g" (ng_clip), //%4
++ "g" (ng_yuv_g2) //%5
+ );
+ d+=8;
+ y+=2;
+--- filter/Bluebox.c
++++ filter/Bluebox.c
+@@ -120,7 +120,7 @@
+ " pop %%ebx \n"
+ : "=m" (buf) // %0
+ :"m" (dat), // %1
+- "m" (MASK), // %2
++ "g" (MASK), // %2
+ "m" (len) // %3
+ );
+ /* }}} */
+--- filter/Trashmask.c
++++ filter/Trashmask.c
+@@ -96,7 +96,7 @@
+ " pop %%ecx \n"
+ : "=m" (src) // %0
+ : "m" (dst), // %1
+- "m" (MASK), // %2
++ "g" (MASK), // %2
+ "m" (len) // %3
+ );
+ /* }}} */