[73968] trunk/dports/gnome/gst-plugins-good
jeremyhu at macports.org
jeremyhu at macports.org
Tue Nov 30 07:25:06 PST 2010
Revision: 73968
http://trac.macports.org/changeset/73968
Author: jeremyhu at macports.org
Date: 2010-11-30 07:25:03 -0800 (Tue, 30 Nov 2010)
Log Message:
-----------
gst-plugins-good: Actually add the patch
Added Paths:
-----------
trunk/dports/gnome/gst-plugins-good/files/
trunk/dports/gnome/gst-plugins-good/files/universal.patch
Added: trunk/dports/gnome/gst-plugins-good/files/universal.patch
===================================================================
--- trunk/dports/gnome/gst-plugins-good/files/universal.patch (rev 0)
+++ trunk/dports/gnome/gst-plugins-good/files/universal.patch 2010-11-30 15:25:03 UTC (rev 73968)
@@ -0,0 +1,426 @@
+diff -Naurp gst-plugins-good-0.10.25.orig/common/m4/gst-arch.m4 gst-plugins-good-0.10.25/common/m4/gst-arch.m4
+--- gst-plugins-good-0.10.25.orig/common/m4/gst-arch.m4 2010-05-13 20:40:31.000000000 -0400
++++ gst-plugins-good-0.10.25/common/m4/gst-arch.m4 2010-11-30 09:54:54.000000000 -0500
+@@ -1,105 +1,3 @@
+-dnl AG_GST_ARCH
+-dnl sets up defines and automake conditionals for host architecture
+-dnl checks endianness
+-dnl defines HOST_CPU
+-
+-AC_DEFUN([AG_GST_ARCH],
+-[
+- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
+-
+- dnl Determine CPU
+- case "x${host_cpu}" in
+- xi?86 | xk? | xi?86_64)
+- case $host_os in
+- solaris*)
+- AC_CHECK_DECL([__i386], [I386_ABI="yes"], [I386_ABI="no"])
+- AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
+-
+- if test "x$I386_ABI" = "xyes" ; then
+- HAVE_CPU_I386=yes
+- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+- fi
+- if test "x$AMD64_ABI" = "xyes" ; then
+- HAVE_CPU_X86_64=yes
+- AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64])
+- fi
+- ;;
+- *)
+- HAVE_CPU_I386=yes
+- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+-
+- dnl FIXME could use some better detection
+- dnl (ie CPUID)
+- case "x${host_cpu}" in
+- xi386 | xi486) ;;
+- *)
+- AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
+- esac
+- ;;
+- esac
+- ;;
+- xpowerpc)
+- HAVE_CPU_PPC=yes
+- AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the host CPU is a PowerPC]) ;;
+- xpowerpc64)
+- HAVE_CPU_PPC64=yes
+- AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the host CPU is a 64 bit PowerPC]) ;;
+- xalpha*)
+- HAVE_CPU_ALPHA=yes
+- AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the host CPU is an Alpha]) ;;
+- xarm*)
+- HAVE_CPU_ARM=yes
+- AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the host CPU is an ARM]) ;;
+- xsparc*)
+- HAVE_CPU_SPARC=yes
+- AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the host CPU is a SPARC]) ;;
+- xmips*)
+- HAVE_CPU_MIPS=yes
+- AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the host CPU is a MIPS]) ;;
+- xhppa*)
+- HAVE_CPU_HPPA=yes
+- AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the host CPU is a HPPA]) ;;
+- xs390*)
+- HAVE_CPU_S390=yes
+- AC_DEFINE(HAVE_CPU_S390, 1, [Define if the host CPU is a S390]) ;;
+- xia64*)
+- HAVE_CPU_IA64=yes
+- AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the host CPU is a IA64]) ;;
+- xm68k*)
+- HAVE_CPU_M68K=yes
+- AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the host CPU is a M68K]) ;;
+- xx86_64)
+- HAVE_CPU_X86_64=yes
+- AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64]) ;;
+- xcris)
+- HAVE_CPU_CRIS=yes
+- AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the host CPU is a CRIS]) ;;
+- xcrisv32)
+- HAVE_CPU_CRISV32=yes
+- AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the host CPU is a CRISv32]) ;;
+- esac
+-
+- dnl Determine endianness
+- AC_C_BIGENDIAN
+-
+- AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_PPC64, test "x$HAVE_CPU_PPC64" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_HPPA, test "x$HAVE_CPU_HPPA" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_MIPS, test "x$HAVE_CPU_MIPS" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_S390, test "x$HAVE_CPU_S390" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_IA64, test "x$HAVE_CPU_IA64" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_M68K, test "x$HAVE_CPU_M68K" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_X86_64, test "x$HAVE_CPU_X86_64" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_CRIS, test "x$HAVE_CPU_CRIS" = "xyes")
+- AM_CONDITIONAL(HAVE_CPU_CRISV32, test "x$HAVE_CPU_CRISV32" = "xyes")
+-
+- AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [the host CPU])
+-])
+-
+ dnl check if unaligned memory access works correctly
+ AC_DEFUN([AG_GST_UNALIGNED_ACCESS], [
+ AC_MSG_CHECKING([if unaligned memory access works correctly])
+diff -Naurp gst-plugins-good-0.10.25.orig/configure.ac gst-plugins-good-0.10.25/configure.ac
+--- gst-plugins-good-0.10.25.orig/configure.ac 2010-09-02 14:22:47.000000000 -0400
++++ gst-plugins-good-0.10.25/configure.ac 2010-11-30 09:56:01.000000000 -0500
+@@ -92,10 +92,6 @@ dnl *** checks for platform ***
+
+ dnl * hardware/architecture *
+
+-dnl common/m4/gst-arch.m4
+-dnl check CPU type
+-AG_GST_ARCH
+-
+ dnl Determine endianness
+ AC_C_BIGENDIAN
+
+@@ -1187,7 +1183,6 @@ sed \
+ -e 's/.* GST_MAJORMINOR$/#define GST_MAJORMINOR "'$GST_MAJORMINOR'"/' \
+ -e "s,.* GST_PACKAGE_NAME$,#define GST_PACKAGE_NAME \"${GST_PACKAGE_NAME}\"," \
+ -e 's/.* GST_PACKAGE_ORIGIN$/#define GST_PACKAGE_ORIGIN "Unknown package origin"/' \
+- -e 's/.* HAVE_CPU_I386$/#define HAVE_CPU_I386 1/' \
+ -e 's/.* HAVE_FGETPOS$/#define HAVE_FGETPOS 1/' \
+ -e 's/.* HAVE_FSETPOS$/#define HAVE_FSETPOS 1/' \
+ -e 's/.* HAVE_LIBXML2$/#define HAVE_LIBXML2 1/' \
+@@ -1198,7 +1193,6 @@ sed \
+ -e 's/.* HAVE_SYS_TYPES_H$/#define HAVE_SYS_TYPES_H 1/' \
+ -e 's/.* HAVE_WIN32$/#define HAVE_WIN32 1/' \
+ -e 's/.* HAVE_WINSOCK2_H$/#define HAVE_WINSOCK2_H 1/' \
+- -e 's/.* HOST_CPU$/#define HOST_CPU "i686"/' \
+ -e 's/.* LIBDIR$/#ifdef _DEBUG\n# define LIBDIR PREFIX "\\\\debug\\\\lib"\n#else\n# define LIBDIR PREFIX "\\\\lib"\n#endif/' \
+ -e 's/.* LOCALEDIR$/#define LOCALEDIR PREFIX "\\\\share\\\\locale"/' \
+ -e "s/.* PACKAGE$/#define PACKAGE \"$PACKAGE\"/" \
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/deinterlace/gstdeinterlacemethod.h gst-plugins-good-0.10.25/gst/deinterlace/gstdeinterlacemethod.h
+--- gst-plugins-good-0.10.25.orig/gst/deinterlace/gstdeinterlacemethod.h 2010-07-05 06:12:48.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/deinterlace/gstdeinterlacemethod.h 2010-11-30 09:57:18.000000000 -0500
+@@ -25,7 +25,7 @@
+ #include <gst/video/video.h>
+
+ #if defined(HAVE_GCC_ASM) && defined(HAVE_ORC)
+-#if defined(HAVE_CPU_I386) || defined(HAVE_CPU_X86_64)
++#ifdef __i386__
+ #define BUILD_X86_ASM
+ #endif
+ #endif
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/deinterlace/tvtime/x86-64_macros.inc gst-plugins-good-0.10.25/gst/deinterlace/tvtime/x86-64_macros.inc
+--- gst-plugins-good-0.10.25.orig/gst/deinterlace/tvtime/x86-64_macros.inc 2009-08-10 18:15:55.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/deinterlace/tvtime/x86-64_macros.inc 2010-11-30 09:58:55.000000000 -0500
+@@ -29,33 +29,9 @@
+ * Original author: Achim Schneider <batchall at mordor.ch>
+ */
+
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif
+-
+ #ifndef XAX
+
+-#if defined (HAVE_CPU_I386) && !defined(HAVE_CPU_X86_64)
+-
+-#define XAX "eax"
+-#define XBX "ebx"
+-#define XCX "ecx"
+-#define XDX "edx"
+-#define XSI "esi"
+-#define XDI "edi"
+-#define XSP "esp"
+-#define MOVX "movl"
+-#define LEAX "leal"
+-#define DECX "decl"
+-#define PUSHX "pushl"
+-#define POPX "popl"
+-#define CMPX "cmpl"
+-#define ADDX "addl"
+-#define SHLX "shll"
+-#define SHRX "shrl"
+-#define SUBX "subl"
+-
+-#elif defined (HAVE_CPU_X86_64)
++#if defined (__x86_64__)
+
+ #define XAX "rax"
+ #define XBX "rbx"
+@@ -75,8 +51,28 @@
+ #define SHRX "shrq"
+ #define SUBX "subq"
+
++#elif defined(__i386__)
++
++#define XAX "eax"
++#define XBX "ebx"
++#define XCX "ecx"
++#define XDX "edx"
++#define XSI "esi"
++#define XDI "edi"
++#define XSP "esp"
++#define MOVX "movl"
++#define LEAX "leal"
++#define DECX "decl"
++#define PUSHX "pushl"
++#define POPX "popl"
++#define CMPX "cmpl"
++#define ADDX "addl"
++#define SHLX "shll"
++#define SHRX "shrl"
++#define SUBX "subl"
++
+ #else
+-#error Undefined architecture. Define either ARCH_X86 or ARCH_X86_64.
++#error Undefined architecture. Neither __i386__ nor __x86_64__ defined.
+ #endif
+
+ #endif
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/Makefile.am gst-plugins-good-0.10.25/gst/goom/Makefile.am
+--- gst-plugins-good-0.10.25.orig/gst/goom/Makefile.am 2010-07-05 06:12:48.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/Makefile.am 2010-11-30 10:00:46.000000000 -0500
+@@ -4,20 +4,9 @@ plugin_LTLIBRARIES = libgstgoom.la
+ PPC_FILES=ppc_zoom_ultimate.s ppc_drawings.s ppc_drawings.h ppc_zoom_ultimate.h
+ MMX_FILES=mmx.c xmmx.c mmx.h xmmx.h
+
+-if HAVE_CPU_PPC
+ # disable until someone figures out how to build these correctly on ppc
+-#ARCH_FILES = $(PPC_FILES)
+-ARCH_FILES =
+-endif
+-if HAVE_CPU_PPC64
+-# disable until someone figures out how to build these correctly on ppc
+-#ARCH_FILES = $(PPC_FILES)
+-ARCH_FILES =
+-endif
+-if HAVE_CPU_I386
+-ARCH_FILES = $(MMX_FILES)
+-ARCH_CFLAGS = -DBUILD_MMX
+-endif
++ARCH_FILES = $(MMX_FILES)
++#ARCH_FILES += $(PPC_FILES)
+
+ libgstgoom_la_SOURCES = \
+ gstgoom.c gstgoom.h \
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/convolve_fx.c gst-plugins-good-0.10.25/gst/goom/convolve_fx.c
+--- gst-plugins-good-0.10.25.orig/gst/goom/convolve_fx.c 2010-05-13 20:40:16.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/convolve_fx.c 2010-11-30 10:03:49.000000000 -0500
+@@ -189,7 +189,7 @@ create_output_with_brightness (VisualFX
+ ytex = yprime + yi + CONV_MOTIF_W * 0x10000 / 2;
+ yprime += c;
+
+-#ifdef HAVE_MMX
++#ifdef __MMX__
+ __asm__ __volatile__ ("\n\t pxor %%mm7, %%mm7" /* mm7 = 0 */
+ "\n\t movd %[xtex], %%mm2" "\n\t movd %[ytex], %%mm3" "\n\t punpckldq %%mm3, %%mm2" /* mm2 = [ ytex | xtex ] */
+ "\n\t movd %[c], %%mm4" "\n\t movd %[s], %%mm6" "\n\t pxor %%mm5, %%mm5" "\n\t psubd %%mm6, %%mm5" "\n\t punpckldq %%mm5, %%mm4" /* mm4 = [ -s | c ] */
+@@ -259,7 +259,7 @@ create_output_with_brightness (VisualFX
+ }
+ #endif
+ }
+-#ifdef HAVE_MMX
++#ifdef __MMX__
+ __asm__ __volatile__ ("\n\t emms");
+ #endif
+
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/goom_config.h gst-plugins-good-0.10.25/gst/goom/goom_config.h
+--- gst-plugins-good-0.10.25.orig/gst/goom/goom_config.h 2010-05-13 20:40:16.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/goom_config.h 2010-11-30 10:05:26.000000000 -0500
+@@ -38,8 +38,3 @@
+ #define ALPHA 0
+ #endif
+
+-#if defined (BUILD_MMX) && defined (HAVE_GCC_ASM)
+-
+-#define HAVE_MMX
+-#endif
+-
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/ifs.c gst-plugins-good-0.10.25/gst/goom/ifs.c
+--- gst-plugins-good-0.10.25.orig/gst/goom/ifs.c 2010-05-13 20:40:16.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/ifs.c 2010-11-30 10:03:49.000000000 -0500
+@@ -37,7 +37,7 @@
+
+ #include "goom_config.h"
+
+-#ifdef HAVE_MMX
++#ifdef __MMX__
+ #include "mmx.h"
+ #endif
+
+@@ -509,7 +509,7 @@ ifs_update (PluginInfo * goomInfo, Pixel
+ points = draw_ifs (goomInfo, &nbpt, fx_data);
+ nbpt--;
+
+-#ifdef HAVE_MMX
++#ifdef __MMX__
+ movd_m2r (couleursl, mm1);
+ punpckldq_r2r (mm1, mm1);
+ for (i = 0; i < nbpt; i += increment) {
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/mathtools.h gst-plugins-good-0.10.25/gst/goom/mathtools.h
+--- gst-plugins-good-0.10.25.orig/gst/goom/mathtools.h 2010-05-13 20:40:16.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/mathtools.h 2010-11-30 10:03:49.000000000 -0500
+@@ -38,7 +38,7 @@
+ #endif /* BigEndian_ */
+
+ /* TODO: this optimization is very efficient: put it again when all works
+-#ifdef HAVE_MMX
++#ifdef __MMX__
+ #define F2I(dbl,i) {double d = dbl + _double2fixmagic; i = ((int*)&d)[iman_] >> _shiftamt;}
+ #else*/
+ #define F2I(dbl,i) i=(int)dbl;
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/mmx.c gst-plugins-good-0.10.25/gst/goom/mmx.c
+--- gst-plugins-good-0.10.25.orig/gst/goom/mmx.c 2010-01-26 21:07:25.000000000 -0500
++++ gst-plugins-good-0.10.25/gst/goom/mmx.c 2010-11-30 10:03:49.000000000 -0500
+@@ -24,14 +24,14 @@
+ I'll undefine BROKEN_PAND by default.
+ */
+
++#if defined(__MMX__) && !defined(__x86_64__)
++
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include "goom_config.h"
+
+-#ifdef HAVE_MMX
+-
+ #define BUFFPOINTNB 16
+ #define BUFFPOINTMASK 0xffff
+ #define BUFFINCR 0xff
+@@ -288,4 +288,4 @@ mmx_supported (void)
+ {
+ return (0);
+ }
+-#endif /* HAVE_MMX */
++#endif /* __MMX__ */
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/plugin_info.c gst-plugins-good-0.10.25/gst/goom/plugin_info.c
+--- gst-plugins-good-0.10.25.orig/gst/goom/plugin_info.c 2010-07-05 06:12:48.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/plugin_info.c 2010-11-30 10:09:16.000000000 -0500
+@@ -34,17 +34,17 @@
+ #endif
+
+
+-#if defined (HAVE_CPU_PPC64) || defined (HAVE_CPU_PPC)
++#if defined (__ppc__) || defined(__ppc64__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include "ppc_zoom_ultimate.h"
+ #include "ppc_drawings.h"
+-#endif /* HAVE_CPU_PPC64 || HAVE_CPU_PPC */
++#endif /* __ppc__ || __ppc64__ */
+
+
+-#ifdef HAVE_MMX
++#if defined(__MMX__) && !defined(__x86_64__)
+ #include "mmx.h"
+-#endif /* HAVE_MMX */
++#endif /* __MMX__ */
+
+ #include <string.h>
+
+@@ -68,9 +68,7 @@ setOptimizedMethods (PluginInfo * p)
+
+ GST_INFO ("orc cpu flags: 0x%08x", cpuFlavour);
+
+-/* FIXME: what about HAVE_CPU_X86_64 ? */
+-#ifdef HAVE_CPU_I386
+-#ifdef HAVE_MMX
++#if defined(__MMX__) && !defined(__x86_64__)
+ #ifdef HAVE_ORC
+ GST_INFO ("have an x86");
+ if (cpuFlavour & ORC_TARGET_MMX_MMXEXT) {
+@@ -86,19 +84,18 @@ setOptimizedMethods (PluginInfo * p)
+ }
+ #endif
+ #endif
+-#endif /* HAVE_CPU_I386 */
+
+ /* disable all PPC stuff until someone finds out what to use here instead of
+ * CPU_OPTION_64_BITS, and until someone fixes the assembly build for ppc */
+ #if 0
+-#ifdef HAVE_CPU_PPC64
++#ifdef __pcc64__
+ if ((cpuFlavour & CPU_OPTION_64_BITS) != 0) {
+ /* p->methods.create_output_with_brightness = ppc_brightness_G5; */
+ p->methods.zoom_filter = ppc_zoom_generic;
+ }
+-#endif /* HAVE_CPU_PPC64 */
++#endif /* __ppc64__ */
+
+-#ifdef HAVE_CPU_PPC
++#ifdef __ALTIVEC__
+ if ((cpuFlavour & ORC_TARGET_ALTIVEC_ALTIVEC) != 0) {
+ /* p->methods.create_output_with_brightness = ppc_brightness_G4; */
+ p->methods.zoom_filter = ppc_zoom_G4;
+@@ -106,7 +103,7 @@ setOptimizedMethods (PluginInfo * p)
+ /* p->methods.create_output_with_brightness = ppc_brightness_generic;*/
+ p->methods.zoom_filter = ppc_zoom_generic;
+ }
+-#endif /* HAVE_CPU_PPC */
++#endif /* __ALTIVEC__ */
+ #endif
+
+ cpuFlavour = 0; /* trick compiler into thinking variable is used */
+diff -Naurp gst-plugins-good-0.10.25.orig/gst/goom/xmmx.c gst-plugins-good-0.10.25/gst/goom/xmmx.c
+--- gst-plugins-good-0.10.25.orig/gst/goom/xmmx.c 2010-05-13 20:40:16.000000000 -0400
++++ gst-plugins-good-0.10.25/gst/goom/xmmx.c 2010-11-30 10:03:49.000000000 -0500
+@@ -24,14 +24,15 @@
+ It appears that the latest gas has the pand problem fixed, therefore
+ I'll undefine BROKEN_PAND by default.
+ */
++
++#if defined(__MMX__) && !defined(__x86_64__)
++
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include "goom_config.h"
+
+-#ifdef HAVE_MMX
+-
+ /* a definir pour avoir exactement le meme resultat que la fonction C
+ * (un chouillat plus lent).. mais la difference est assez peu notable.
+ */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101130/598dab3c/attachment.html>
More information about the macports-changes
mailing list