diff options
author | mi <mi@FreeBSD.org> | 2005-07-13 07:41:42 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2005-07-13 07:41:42 +0800 |
commit | d34c816b7d89fb0eab8fbc45c705b8beb38c56f0 (patch) | |
tree | 8a43cae75f09b9996840cd6e50d1655377ea2fd5 /multimedia/libfame | |
parent | f68260ffee55af6738406387bd7599891fab7bc3 (diff) | |
download | freebsd-ports-gnome-d34c816b7d89fb0eab8fbc45c705b8beb38c56f0.tar.gz freebsd-ports-gnome-d34c816b7d89fb0eab8fbc45c705b8beb38c56f0.tar.zst freebsd-ports-gnome-d34c816b7d89fb0eab8fbc45c705b8beb38c56f0.zip |
Fix configure to stop appending ``-march=i386'' to CFLAGS on i386.
Depending on other optimization options, compiler could get confused
into an internal error, and was, probably, building pessimized code
even when working.
Ensure warning-free build, while I'm here. Mark the SSE as having no
effect -- ``--enable-sse'' causes configure to add the HAS_SSE define
to CFLAGS, but nothing in the current release checks for that flag. Ha-ha.
There are SSE implementations of some parts of the code (they are just
no used), so, perhaps, someone can add another patch to make use of them,
when possible.
Diffstat (limited to 'multimedia/libfame')
-rw-r--r-- | multimedia/libfame/Makefile | 2 | ||||
-rw-r--r-- | multimedia/libfame/files/patch-cflags | 10 | ||||
-rw-r--r-- | multimedia/libfame/files/patch-warnings | 133 |
3 files changed, 144 insertions, 1 deletions
diff --git a/multimedia/libfame/Makefile b/multimedia/libfame/Makefile index 3c3b50bcad0f..c866ccb4db03 100644 --- a/multimedia/libfame/Makefile +++ b/multimedia/libfame/Makefile @@ -26,7 +26,7 @@ MAN3= fame_close.3 fame_encode_frame.3 fame_get_object.3 fame_init.3 \ fame_open.3 fame_register.3 fame_unregister.3 fame_encode_slice.3 \ fame_start_frame.3 fame_end_frame.3 -OPTIONS= SSE "SSE optimized routines" off \ +OPTIONS= SSE "SSE optimized routines (no effect in this release)" off \ MMX "MMX optimized routines" on .include <bsd.port.pre.mk> diff --git a/multimedia/libfame/files/patch-cflags b/multimedia/libfame/files/patch-cflags new file mode 100644 index 000000000000..23361f553cbe --- /dev/null +++ b/multimedia/libfame/files/patch-cflags @@ -0,0 +1,10 @@ +--- configure Wed Feb 11 08:12:28 2004 ++++ configure Tue Jul 12 18:56:00 2005 +@@ -4500,4 +4500,7 @@ + + case "$target" in ++ *-*-freebsd*) ++ CFLAGS="$CFLAGS -DHAS_BSWAP" ++ ;; + alpha*-*-linux*) + if test x$ac_cv_c_compiler_gnu = xyes; then diff --git a/multimedia/libfame/files/patch-warnings b/multimedia/libfame/files/patch-warnings new file mode 100644 index 000000000000..fe734e698110 --- /dev/null +++ b/multimedia/libfame/files/patch-warnings @@ -0,0 +1,133 @@ +Some patches to fix compiler warnings... + + -mi + +The mpeg_close method only does anything, if MMX was used. Do not even +declare nor define it, if that is not the case. +--- src/fame_decoder_mpeg.c Tue Jul 1 04:59:34 2003 ++++ src/fame_decoder_mpeg.c Tue Jul 12 19:02:15 2005 +@@ -79,5 +79,7 @@ + static void mpeg_interpolate(fame_decoder_t *decoder, int rounding); + static void mpeg_leave(fame_decoder_t *decoder); ++#ifdef HAS_MMX + static void mpeg_close(fame_decoder_t *decoder); ++#endif + + FAME_CONSTRUCTOR(fame_decoder_mpeg_t) +@@ -91,5 +93,9 @@ + FAME_DECODER(this)->interpolate = mpeg_interpolate; + FAME_DECODER(this)->leave = mpeg_leave; ++#ifdef HAS_MMX + FAME_DECODER(this)->close = mpeg_close; ++#else ++ FAME_DECODER(this)->close = NULL; ++#endif + return(this); + } +@@ -604,4 +610,5 @@ + } + ++#ifdef HAS_MMX + /* mpeg_close */ + /* */ +@@ -619,5 +626,4 @@ + fame_decoder_mpeg_t *decoder_mpeg = FAME_DECODER_MPEG(decoder); + +-#ifdef HAS_MMX + /* free mismatch accumulator */ + { +@@ -627,4 +633,4 @@ + fame_free(decoder_mpeg->mismatch_accumulator[i]); + } +-#endif + } ++#endif + +Include the missing header: +--- src/fame_rate_simple.c Mon Apr 8 11:58:05 2002 ++++ src/fame_rate_simple.c Tue Jul 12 19:05:27 2005 +@@ -20,4 +20,5 @@ + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> /* strlen() */ + #include <math.h> + #include "fame.h" +--- src/fame_rate_1param.c Sun May 12 14:34:45 2002 ++++ src/fame_rate_1param.c Tue Jul 12 19:07:54 2005 +@@ -20,4 +20,5 @@ + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> /* strlen() */ + #include <math.h> + #include "fame.h" +--- src/mae_mmx.h Mon May 20 14:58:06 2002 ++++ src/mae_mmx.h Tue Jul 12 19:22:34 2005 +@@ -19,8 +19,8 @@ + */ + +-static unsigned int MAE8x8_withmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int dummy; +@@ -71,8 +71,8 @@ + } + +-static unsigned int MAE8x8_withoutmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withoutmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int dummy; +--- src/mae_int.h Mon May 20 14:58:06 2002 ++++ src/mae_int.h Tue Jul 12 19:24:06 2005 +@@ -19,8 +19,8 @@ + */ + +-static unsigned int MAE8x8_withmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int j,i; +@@ -42,8 +42,9 @@ + } + +-static unsigned int MAE8x8_withoutmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withoutmask(unsigned char *ref, ++ unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int j,i; +--- src/fame_motion_pmvfast.c Sat Oct 5 08:44:47 2002 ++++ src/fame_motion_pmvfast.c Tue Jul 12 19:28:52 2005 +@@ -20,4 +20,5 @@ + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> /* memcpy, memset */ + #include "fame.h" + #include "fame_malloc.h" +@@ -922,5 +923,4 @@ + fame_motion_vector_t *pvector_left, *pvector_topleft; + fame_motion_vector_t *pvector_top, *pvector_topright; +- unsigned int weight_left, weight_top, weight_topright; + + unsigned char *shape; |