[vlc-devel] commit: Contrib: add libschroedinger. Add some patches that would be dropped on next (Pavlov Konstantin )

git version control git at videolan.org
Fri Jun 27 23:27:53 CEST 2008


vlc | branch: master | Pavlov Konstantin <thresh at videolan.org> | Tue Jun 24 00:31:48 2008 +0400| [3c67532fc931b1feddf628264e1edc8ad01a8ee6]

Contrib: add libschroedinger. Add some patches that would be dropped on next
libschroedinger release.
Contrib: fix fluidsynth distclean target.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c67532fc931b1feddf628264e1edc8ad01a8ee6
---

 extras/contrib/src/Makefile                        |   39 ++++++++++++++-
 .../libschroedinger-fix-build-OSX-test.patch       |   24 +++++++++
 .../Patches/libschroedinger-fix-build-OSX.patch    |   52 ++++++++++++++++++++
 extras/contrib/src/packages.mak                    |    4 ++
 4 files changed, 118 insertions(+), 1 deletions(-)

diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 1662929..0ccbc6a 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -2411,8 +2411,45 @@ fluidsynth: fluidsynth-$(FLUID_VERSION).tar.gz
 
 CLEAN_FILE += .fluid
 CLEAN_PKG += fluidsynth
-DISTCLEAN_PKG += fluidsynth-$(NCURSES_VERSION).tar.gz
+DISTCLEAN_PKG += fluidsynth-$(FLUID_VERSION).tar.gz
 
+# ***************************************************************************
+# liboil
+# ***************************************************************************
+
+liboil-$(OIL_VERSION).tar.gz:
+	$(WGET) $(OIL_URL)
+
+liboil: liboil-$(OIL_VERSION).tar.gz
+	$(EXTRACT_GZ)
+
+.liboil: liboil
+	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
+	touch $@
+
+CLEAN_FILE += .liboil
+CLEAN_PKG += liboil
+DISTCLEAN_PKG += liboil-$(OIL_VERSION).tar.gz
+
+# ***************************************************************************
+# Schroedinger library
+# ***************************************************************************
+
+schroedinger-$(SCHROED_VERSION).tar.gz:
+	$(WGET) $(SCHROED_URL)
+
+schroedinger: schroedinger-$(SCHROED_VERSION).tar.gz
+	$(EXTRACT_GZ)
+	patch -d schroedinger -p1 < Patches/libschroedinger-fix-build-OSX.patch
+	patch -d schroedinger -p1 < Patches/libschroedinger-fix-build-OSX-test.patch
+
+.schroedinger: .liboil schroedinger
+	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
+	touch $@
+
+CLEAN_FILE += .schroedinger
+CLEAN_PKG += schroedinger
+DISTCLEAN_PKG += schroedinger-$(SCHROED_VERSION).tar.gz
 
 # ***************************************************************************
 # Some cleaning
diff --git a/extras/contrib/src/Patches/libschroedinger-fix-build-OSX-test.patch b/extras/contrib/src/Patches/libschroedinger-fix-build-OSX-test.patch
new file mode 100644
index 0000000..336a28f
--- /dev/null
+++ b/extras/contrib/src/Patches/libschroedinger-fix-build-OSX-test.patch
@@ -0,0 +1,24 @@
+From: David Schleef <ds at hutch.local>
+Date: Mon, 23 Jun 2008 20:24:34 +0000 (-0700)
+Subject: [build] Remove i386-only test.  not useful.
+X-Git-Url: http://diracvideo.org/git?p=schroedinger.git;a=commitdiff_plain;h=03a9d4cee3c42715a5b7370d7a62f3d788c77e2a
+
+[build] Remove i386-only test.  not useful.
+---
+
+diff --git a/testsuite/prototype/Makefile.am b/testsuite/prototype/Makefile.am
+index 0513faf..8b13789 100644
+--- a/testsuite/prototype/Makefile.am
++++ b/testsuite/prototype/Makefile.am
+@@ -1,11 +1 @@
+ 
+-if HAVE_I386
+-noinst_PROGRAMS = arith_speed
+-endif
+-
+-AM_CFLAGS = $(SCHRO_CFLAGS) $(ERROR_CFLAGS) $(LIBOIL_CFLAGS) \
+-	    -DSCHRO_ENABLE_UNSTABLE_API
+-LDADD = $(SCHRO_LIBS)
+-
+-arith_speed_SOURCES = arith_speed.c
+-
diff --git a/extras/contrib/src/Patches/libschroedinger-fix-build-OSX.patch b/extras/contrib/src/Patches/libschroedinger-fix-build-OSX.patch
new file mode 100644
index 0000000..7a014bc
--- /dev/null
+++ b/extras/contrib/src/Patches/libschroedinger-fix-build-OSX.patch
@@ -0,0 +1,52 @@
+From: David Schleef <ds at ginger.bigkitten.com>
+Date: Tue, 10 Jun 2008 18:48:06 +0000 (-0700)
+Subject: [core] Check number of processors correctly on OS/X.  Patch from
+X-Git-Url: http://diracvideo.org/git?p=schroedinger.git;a=commitdiff_plain;h=7e125aa636e520393ebf8e9315d3956e399f4175
+
+[core] Check number of processors correctly on OS/X.  Patch from
+Karl Rasche <karlrasche at gmail.com>
+---
+
+diff --git a/schroedinger/schroasync-pthread.c b/schroedinger/schroasync-pthread.c
+index 3a975e0..60bf1c1 100644
+--- a/schroedinger/schroasync-pthread.c
++++ b/schroedinger/schroasync-pthread.c
+@@ -13,6 +13,10 @@
+ #include <sys/time.h>
+ #include <time.h>
+ 
++#ifdef __APPLE__
++#include <sys/sysctl.h>
++#endif
++
+ enum {
+   STATE_IDLE,
+   STATE_BUSY,
+@@ -79,14 +83,23 @@ schro_async_new(int n_threads,
+       }
+     }
+     if (n_threads == 0) {
+-#ifndef _WIN32
+-      n_threads = sysconf(_SC_NPROCESSORS_CONF);
+-#else
++#ifdef _WIN32
+       const char *s = getenv("NUMBER_OF_PROCESSORS");
+       if (s) {
+         n_threads = atoi(s);
+       }
+-#endif
++#elif defined __APPLE__
++      {
++        int    mib[]    = {CTL_HW, HW_NCPU};
++        size_t dataSize =  sizeof(int);
++
++        if (sysctl(mib, 2, &n_threads, &dataSize, NULL, 0)) {
++          n_threads = 0;
++        }
++      }
++#else
++      n_threads = sysconf(_SC_NPROCESSORS_CONF);
++#endif        
+     }
+     if (n_threads == 0) {
+       n_threads = 1;
diff --git a/extras/contrib/src/packages.mak b/extras/contrib/src/packages.mak
index 76aed9d..dbd8bfc 100644
--- a/extras/contrib/src/packages.mak
+++ b/extras/contrib/src/packages.mak
@@ -224,3 +224,7 @@ FLUID_URL=http://download.savannah.gnu.org/releases/fluid/fluidsynth-$(FLUID_VER
 YASM_VERSION=0.7.0
 YASM_URL=$(VIDEOLAN)/testing/contrib/yasm-$(YASM_VERSION).tar.gz
 #YASM_URL=http://www.tortall.net/projects/yasm/releases/yasm-$(YASM_VERSION).tar.gz
+OIL_VERSION=0.3.14
+OIL_URL=http://liboil.freedesktop.org/download/liboil-$(OIL_VERSION).tar.gz
+SCHROED_VERSION=1.0.3
+SCHROED_URL=http://www.diracvideo.org/download/schroedinger/schroedinger-$(SCHROED_VERSION).tar.gz




More information about the vlc-devel mailing list