Package-Name: libfame
Homepage: http://fame.sourceforge.net/
Source: sourceforge:///fame/libfame-(\d+(.\d+)+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	cp -pf AUTHORS BUGS CHANGES COPYING README TODO "$(PREFIX)/"
	$(MAKE) -f ../Makefile configure
	$(MAKE)
	$(MAKE) install
Install:
	$(MAKE) instbin BIN=libfame-config
	$(MAKE) addldso
	$(MAKE) instman SECTION=3 MAN="fame_close fame_encode_frame fame_encode_slice fame_end_frame fame_get_object fame_init fame_open fame_register fame_start_frame fame_unregister"
	$(MAKE) instaclocal M4=libfame
Patch: <<EOT
######## begin GCC4 patch
--- src/half_mmx.h.old	2002-05-01 03:04:02 +0900
+++ src/half_mmx.h	2005-10-14 21:24:33 +0900
@@ -18,7 +18,7 @@
 */
 /**************************** half-pixel interpolation ***********************/
 
-static short const _mmx_one[] = { 1, 1, 1, 1 };
+static const struct {short n[4];} _mmx_one = {{ 1, 1, 1, 1 }};
 
 static void inline mmx_interpolate(unsigned char **ref,
 				   int pitch,
@@ -87,7 +87,7 @@
 		"movl 12(%0), %3\n"        /* %3 = ref[3] */
 		"movq %%mm3, (%3)\n"       /* store in frame */
 		: "=r"(ref), "=r"(pitch), "=r"(rc), "=r"(dummy)
-		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy)
+		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy), "m" (_mmx_one)
 		: "memory");
 }
 
--- src/half_sse.h.old	2002-01-27 11:24:56 +0900
+++ src/half_sse.h	2005-10-14 21:24:42 +0900
@@ -19,8 +19,8 @@
 */
 /**************************** half-pixel interpolation ***********************/
 
-static short const _mmx_one[] = { 1, 1, 1, 1 };
-static unsigned char const _mmx_one_byte[] = {1,1,1,1,1,1,1,1};
+static const struct {short n[4];} _mmx_one = {{ 1, 1, 1, 1 }};
+static const struct {unsigned char n[8];} _mmx_one_byte = {{1,1,1,1,1,1,1,1}};
 
 
 static void inline mmx_interpolate_signed(unsigned char **ref,
@@ -90,7 +90,7 @@
 		"movl 12(%0), %3\n"        /* %3 = ref[3] */
 		"movq %%mm3, (%3)\n"       /* store in frame */
 		: "=r"(ref), "=r"(pitch), "=r"(rc), "=r"(dummy)
-		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy)
+		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy), "m" (_mmx_one)
 		: "memory");
 }
 
@@ -140,7 +140,7 @@
 		"movl 12(%0), %3\n"        /* %3 = ref[3] */
 		"movq %%mm7, (%3)\n"       /* store in frame */
 		: "=r"(ref), "=r"(pitch), "=r"(rc), "=r"(dummy)
-		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy)
+		: "0"(ref), "1"(pitch), "2"(rc), "3"(dummy), "m" (_mmx_one_byte)
 		: "memory");
 }
 
######## end GCC4 patch
######## begin aclocal underquoted definition patch
--- libfame.m4.in.old	2001-11-20 20:56:37 +0900
+++ libfame.m4.in	2005-10-14 21:27:48 +0900
@@ -3,7 +3,7 @@
 dnl Vivien Chappelier 12/11/00
 dnl stolen from ORBit autoconf
 dnl
-AC_DEFUN(AM_PATH_LIBFAME,
+AC_DEFUN([AM_PATH_LIBFAME],
 [dnl 
 dnl Get the cflags and libraries from the libfame-config script
 dnl
######## end aclocal underquoted definition patch
EOT

/pkg/libfame/
/usr/bin/libfame-config
/usr/man/man3/fame_close.3.gz
/usr/man/man3/fame_encode_frame.3.gz
/usr/man/man3/fame_encode_slice.3.gz
/usr/man/man3/fame_end_frame.3.gz
/usr/man/man3/fame_get_object.3.gz
/usr/man/man3/fame_init.3.gz
/usr/man/man3/fame_open.3.gz
/usr/man/man3/fame_register.3.gz
/usr/man/man3/fame_start_frame.3.gz
/usr/man/man3/fame_unregister.3.gz
/usr/share/aclocal/libfame.m4
