[arch-commits] Commit in gstreamer0.10-ugly/trunk (PKGBUILD a52-use-orc.patch orc.m4)

Jan de Groot jgc at archlinux.org
Wed Sep 1 11:02:45 UTC 2010


    Date: Wednesday, September 1, 2010 @ 07:02:44
  Author: jgc
Revision: 89488

upgpkg: gstreamer0.10-ugly 0.10.15-4
Remove duplicate dependency, patch a52dec plugin to use orc instead of liboil

Added:
  gstreamer0.10-ugly/trunk/a52-use-orc.patch
  gstreamer0.10-ugly/trunk/orc.m4
Modified:
  gstreamer0.10-ugly/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   17 ++++--
 a52-use-orc.patch |  147 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 orc.m4            |   57 ++++++++++++++++++++
 3 files changed, 216 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-09-01 10:37:09 UTC (rev 89487)
+++ PKGBUILD	2010-09-01 11:02:44 UTC (rev 89488)
@@ -4,17 +4,24 @@
 pkgbase=gstreamer0.10-ugly
 pkgname=('gstreamer0.10-ugly' 'gstreamer0.10-ugly-plugins')
 pkgver=0.10.15
-pkgrel=3
+pkgrel=4
 arch=('i686' 'x86_64')
 license=('LGPL')
-makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.29' 'libdvdread>=4.1.3' 'lame>=3.98.4' 'libmpeg2>=0.5.1' 'a52dec>=0.7.4' 'libid3tag>=0.15.1b' 'libmad>=0.15.1b' 'libsidplay>=1.36.59' 'libcdio>=0.82' 'x264=20100826' 'opencore-amr>=0.1.2' 'liboil>=0.3.17')
+makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.29' 'libdvdread>=4.1.3' 'lame>=3.98.4' 'libmpeg2>=0.5.1' 'a52dec>=0.7.4' 'libid3tag>=0.15.1b' 'libmad>=0.15.1b' 'libsidplay>=1.36.59' 'libcdio>=0.82' 'x264=20100826' 'opencore-amr>=0.1.2')
 url="http://gstreamer.freedesktop.org/"
 options=(!libtool)
-source=(${url}/src/gst-plugins-ugly/gst-plugins-ugly-${pkgver}.tar.bz2)
-md5sums=('21c034a762a5da252f91640e53bfe457')
+source=(${url}/src/gst-plugins-ugly/gst-plugins-ugly-${pkgver}.tar.bz2
+        orc.m4
+        a52-use-orc.patch)
+md5sums=('21c034a762a5da252f91640e53bfe457'
+         '18af013824b334a037fba7ae9ca40694'
+         '74b8035a309aec1e7c36660ac34e7271')
 
 build() {
   cd "${srcdir}/gst-plugins-ugly-${pkgver}"
+  patch -Np1 -i "${srcdir}/a52-use-orc.patch"
+  cp "${srcdir}/orc.m4" common/m4/
+  autoreconf
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
     --disable-static --enable-experimental \
     --with-package-name="GStreamer Ugly Plugins (Archlinux)" \
@@ -33,7 +40,7 @@
 
 package_gstreamer0.10-ugly-plugins() {
   pkgdesc="GStreamer Multimedia Framework Ugly Plugins (gst-plugins-ugly)"
-  depends=("gstreamer0.10-ugly=${pkgver}" 'libdvdread>=4.1.3' 'lame>=3.98.4' 'libmpeg2>=0.5.1' 'a52dec>=0.7.4' 'libid3tag>=0.15.1b' 'libmad>=0.15.1b' 'libsidplay>=1.36.59' 'libcdio>=0.82' 'x264=20100826' 'opencore-amr>=0.1.2' 'gstreamer0.10-ugly')
+  depends=("gstreamer0.10-ugly=${pkgver}" 'libdvdread>=4.1.3' 'lame>=3.98.4' 'libmpeg2>=0.5.1' 'a52dec>=0.7.4' 'libid3tag>=0.15.1b' 'libmad>=0.15.1b' 'libsidplay>=1.36.59' 'libcdio>=0.82' 'x264=20100826' 'opencore-amr>=0.1.2')
   groups=('gstreamer0.10-plugins')
   replaces=('gstreamer0.10-dvdread' 'gstreamer0.10-mpeg2dec' 'gstreamer0.10-mad' 'gstreamer0.10-lame' 'gstreamer0.10-sidplay' 'gstreamer0.10-a52dec')
   conflicts=('gstreamer0.10-dvdread' 'gstreamer0.10-mpeg2dec' 'gstreamer0.10-mad' 'gstreamer0.10-lame' 'gstreamer0.10-sidplay' 'gstreamer0.10-a52dec')

Added: a52-use-orc.patch
===================================================================
--- a52-use-orc.patch	                        (rev 0)
+++ a52-use-orc.patch	2010-09-01 11:02:44 UTC (rev 89488)
@@ -0,0 +1,147 @@
+From 359260bd5b2ab88d36364954e94450f9e8718ca2 Mon Sep 17 00:00:00 2001
+From: Sebastian Dröge <sebastian.droege at collabora.co.uk>
+Date: Mon, 14 Jun 2010 12:34:25 +0000
+Subject: a52dec: Use orc for CPU feature detection and don't check for liboil
+
+---
+diff --git a/configure.ac b/configure.ac
+index 109b376..93d74f8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,12 +152,7 @@ dnl *** checks for dependency libraries ***
+ 
+ dnl GLib is required
+ AG_GST_GLIB_CHECK([2.18])
+-
+-dnl liboil is required
+-PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.14, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
+-if test "x$HAVE_LIBOIL" != "xyes"; then
+-  AC_ERROR([liboil-0.3.14 or later is required])
+-fi
++ORC_CHECK([0.4.5])
+ 
+ dnl checks for gstreamer
+ dnl uninstalled is selected preferentially -- see pkg-config(1)
+@@ -542,3 +537,5 @@ sed \
+ AC_OUTPUT
+ 
+ AG_GST_OUTPUT_PLUGINS
++
++ORC_OUTPUT
+diff --git a/ext/a52dec/Makefile.am b/ext/a52dec/Makefile.am
+index 5d8365e..d572236 100644
+--- a/ext/a52dec/Makefile.am
++++ b/ext/a52dec/Makefile.am
+@@ -4,12 +4,12 @@ libgsta52dec_la_SOURCES = gsta52dec.c
+ libgsta52dec_la_CFLAGS = \
+ 	$(GST_PLUGINS_BASE_CFLAGS) \
+ 	$(GST_CFLAGS) \
+-	$(LIBOIL_CFLAGS) \
++	$(ORC_CFLAGS) \
+ 	$(A52DEC_CFLAGS)
+ libgsta52dec_la_LIBADD = \
+ 	$(GST_PLUGINS_BASE_LIBS) \
+ 	-lgstaudio-$(GST_MAJORMINOR) \
+-	$(LIBOIL_LIBS) \
++	$(ORC_LIBS) \
+ 	$(A52DEC_LIBS)
+ libgsta52dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+ libgsta52dec_la_LIBTOOLFLAGS = --tag=disable-static
+diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
+index 7d032e4..ba62777 100644
+--- a/ext/a52dec/gsta52dec.c
++++ b/ext/a52dec/gsta52dec.c
+@@ -49,9 +49,9 @@
+ #include <a52dec/mm_accel.h>
+ #include "gsta52dec.h"
+ 
+-#include <liboil/liboil.h>
+-#include <liboil/liboilcpu.h>
+-#include <liboil/liboilfunction.h>
++#if HAVE_ORC
++#include <orc/orc.h>
++#endif
+ 
+ #ifdef LIBA52_DOUBLE
+ #define SAMPLE_WIDTH 64
+@@ -185,8 +185,6 @@ gst_a52dec_class_init (GstA52DecClass * klass)
+   g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LFE,
+       g_param_spec_boolean ("lfe", "LFE", "LFE", TRUE, G_PARAM_READWRITE));
+ 
+-  oil_init ();
+-
+   /* If no CPU instruction based acceleration is available, end up using the
+    * generic software djbfft based one when available in the used liba52 */
+ #ifdef MM_ACCEL_DJBFFT
+@@ -194,13 +192,21 @@ gst_a52dec_class_init (GstA52DecClass * klass)
+ #else
+   klass->a52_cpuflags = 0;
+ #endif
+-  cpuflags = oil_cpu_get_flags ();
+-  if (cpuflags & OIL_IMPL_FLAG_MMX)
++
++#if HAVE_ORC
++  cpuflags = orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
++
++  if (cpuflags & ORC_TARGET_MMX_MMX)
+     klass->a52_cpuflags |= MM_ACCEL_X86_MMX;
+-  if (cpuflags & OIL_IMPL_FLAG_3DNOW)
++  if (cpuflags & ORC_TARGET_MMX_3DNOW)
+     klass->a52_cpuflags |= MM_ACCEL_X86_3DNOW;
+-  if (cpuflags & OIL_IMPL_FLAG_MMXEXT)
++  if (cpuflags & ORC_TARGET_MMX_MMXEXT)
+     klass->a52_cpuflags |= MM_ACCEL_X86_MMXEXT;
++#else
++  cpuflags = 0;
++#endif
++
++  g_print ("%p\n", orc_target_get_by_name ("mmx"));
+ 
+   GST_LOG ("CPU flags: a52=%08x, liboil=%08x", klass->a52_cpuflags, cpuflags);
+ }
+--
+cgit v0.8.3-6-g21f6
+From 21d90d5539e42c4d5216a407dcb88cf136a595dd Mon Sep 17 00:00:00 2001
+From: Sebastian Dröge <sebastian.droege at collabora.co.uk>
+Date: Mon, 14 Jun 2010 12:34:56 +0000
+Subject: a52dec: Remove debug printf...
+
+---
+diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
+index ba62777..6d8cd19 100644
+--- a/ext/a52dec/gsta52dec.c
++++ b/ext/a52dec/gsta52dec.c
+@@ -206,8 +206,6 @@ gst_a52dec_class_init (GstA52DecClass * klass)
+   cpuflags = 0;
+ #endif
+ 
+-  g_print ("%p\n", orc_target_get_by_name ("mmx"));
+-
+   GST_LOG ("CPU flags: a52=%08x, liboil=%08x", klass->a52_cpuflags, cpuflags);
+ }
+ 
+--
+cgit v0.8.3-6-g21f6
+From e0cd55c80549e35576eb601624435cfd277472ca Mon Sep 17 00:00:00 2001
+From: Sebastian Dröge <sebastian.droege at collabora.co.uk>
+Date: Mon, 14 Jun 2010 13:33:14 +0000
+Subject: a52dec: Call orc_init() before trying to get target flags
+
+---
+diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
+index 6d8cd19..baebb5e 100644
+--- a/ext/a52dec/gsta52dec.c
++++ b/ext/a52dec/gsta52dec.c
+@@ -975,6 +975,10 @@ gst_a52dec_get_property (GObject * object, guint prop_id, GValue * value,
+ static gboolean
+ plugin_init (GstPlugin * plugin)
+ {
++#if HAVE_ORC
++  orc_init ();
++#endif
++
+   /* ensure GstAudioChannelPosition type is registered */
+   if (!gst_audio_channel_position_get_type ())
+     return FALSE;
+--
+cgit v0.8.3-6-g21f6

Added: orc.m4
===================================================================
--- orc.m4	                        (rev 0)
+++ orc.m4	2010-09-01 11:02:44 UTC (rev 89488)
@@ -0,0 +1,57 @@
+dnl pkg-config-based checks for Orc
+
+dnl specific:
+dnl ORC_CHECK([REQUIRED_VERSION])
+
+AC_DEFUN([ORC_CHECK],
+[
+  ORC_REQ=ifelse([$1], , "0.4.5", [$1])
+
+  AC_ARG_ENABLE(orc,
+  AC_HELP_STRING([--enable-orc],[use Orc if installed]),
+  [case "${enableval}" in
+    auto) enable_orc=auto ;;
+    yes) enable_orc=yes ;;
+    no)  enable_orc=no ;;
+    *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
+  esac
+  ],
+  [enable_orc=auto]) dnl Default value
+
+  if test "x$enable_orc" != "xno" ; then
+    PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
+      AC_DEFINE(HAVE_ORC, 1, [Use Orc])
+      ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
+      AC_SUBST(ORCC)
+      HAVE_ORC=yes
+    ], [
+      if test "x$enable_orc" = "xyes" ; then
+        AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
+      fi
+      AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
+      HAVE_ORC=no
+    ])
+  else
+    AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
+    HAVE_ORC=no
+  fi
+  AM_CONDITIONAL(HAVE_ORC, test "x$HAVE_ORC" = "xyes")
+
+]))
+
+AC_DEFUN([ORC_OUTPUT],
+[
+  if test "$HAVE_ORC" = yes ; then
+    printf "configure: *** Orc acceleration enabled.\n"
+  else
+    if test "x$enable_orc" = "xno" ; then
+      printf "configure: *** Orc acceleration disabled by --disable-orc.  Slower code paths\n"
+      printf "               will be used.\n"
+    else
+      printf "configure: *** Orc acceleration disabled.  Requires Orc >= $ORC_REQ, which was\n"
+      printf "               not found.  Slower code paths will be used.\n"
+    fi
+  fi
+  printf "\n"
+])
+




More information about the arch-commits mailing list