[vlc-devel] commit: Contribs: Provide GSM for FFmpeg. This library is stupid... Seriously. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Mar 29 20:35:02 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Mar 29 20:33:45 2009 +0200| [cb0cf7c9a2200267344475c18356ed5dfad8b0cd] | committer: Jean-Baptiste Kempf 

Contribs: Provide GSM for FFmpeg. This library is stupid... Seriously.

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

 extras/contrib/src/Makefile                |   27 ++++++++++++++++++-
 extras/contrib/src/Patches/gsm-cross.patch |   38 ++++++++++++++++++++++++++++
 extras/contrib/src/packages.mak            |    2 +
 3 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index a05737f..cbfc5c7 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -133,7 +133,7 @@ endif
 FFMPEGCONF+= --enable-small --disable-debug --disable-mpegaudio-hp
 FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
 else
-FFMPEGCONF+= --enable-libmp3lame --enable-libfaac
+FFMPEGCONF+= --enable-libmp3lame --enable-libfaac --enable-libgsm
 endif
 
 ifdef HAVE_BEOS
@@ -1117,7 +1117,7 @@ else
 ifdef HAVE_UCLIBC
 .ffmpeg: ffmpeg
 else
-.ffmpeg: ffmpeg .faac .lame
+.ffmpeg: ffmpeg .faac .lame .gsm
 endif
 endif
 	(cd $<; $(HOSTCC) ./configure $(FFMPEGCONF) --prefix=$(PREFIX) --extra-cflags="$(CFLAGS) $(FFMPEG_CFLAGS) -DRUNTIME_CPUDETECT" --extra-ldflags="$(LDFLAGS)" $(FFMPEGCONF) --disable-shared --enable-static && make && make install-libs install-headers)
@@ -2549,6 +2549,29 @@ CLEAN_FILE += .libupnp
 CLEAN_PKG += libupnp
 DISTCLEAN_PKG += libupnp-$(UPNP_VERSION).tar.bz2
 
+# *********
+# GSM
+# *********
+gsm-$(GSM_VERSION).tar.gz:
+	$(WGET) $(GSM_URL)
+
+gsm: gsm-$(GSM_VERSION).tar.gz
+	rm -rf $@ || true
+	gunzip -c $< | tar xf - --exclude='[*?:<>\|]'
+	mv gsm-1.0-* gsm || true
+ifneq ($(HOST),$(BUILD))
+	(patch -p0 < Patches/gsm-cross.patch)
+endif
+
+.gsm: gsm
+	(cd $<; $(HOSTCC) make && cp inc/gsm.h $(PREFIX)/include && cp lib/libgsm.a  $(PREFIX)/lib)
+	touch $@
+
+CLEAN_FILE += .gsm
+CLEAN_PKG += gsm
+DISTCLEAN_PKG += gsm-$(GSM_VERSION).tar.gz
+
+
 
 # ***************************************************************************
 # Some cleaning
diff --git a/extras/contrib/src/Patches/gsm-cross.patch b/extras/contrib/src/Patches/gsm-cross.patch
new file mode 100644
index 0000000..1b8d6e2
--- /dev/null
+++ b/extras/contrib/src/Patches/gsm-cross.patch
@@ -0,0 +1,38 @@
+diff -ruN gsm/Makefile gsm.new/Makefile
+--- gsm/Makefile	2006-04-26 21:14:26.000000000 +0200
++++ gsm.new/Makefile	2009-03-29 20:12:39.000000000 +0200
+@@ -43,10 +43,8 @@
+ # CC		= /usr/lang/acc
+ # CCFLAGS 	= -c -O
+ 
+-CC		= gcc -ansi -pedantic
+ CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
+ 
+-LD 		= $(CC)
+ 
+ # LD		= gcc
+ # LDFLAGS 	=
+@@ -98,14 +96,11 @@
+ SHELL		= /bin/sh
+ LN		= ln
+ BASENAME 	= basename
+-AR		= ar
+ ARFLAGS		= cr
+ RMFLAGS		=
+ FIND		= find
+ COMPRESS 	= compress
+ COMPRESSFLAGS 	= 
+-# RANLIB 	= true
+-RANLIB	 	= ranlib
+ 
+ #
+ #    You shouldn't have to configure below this line if you're porting.
+@@ -279,7 +274,7 @@
+ 
+ # Target rules
+ 
+-all:		$(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
++all:		$(LIBGSM)
+ 		@-echo $(ROOT): Done.
+ 
+ tst:		$(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
diff --git a/extras/contrib/src/packages.mak b/extras/contrib/src/packages.mak
index f9e2336..e7ece98 100644
--- a/extras/contrib/src/packages.mak
+++ b/extras/contrib/src/packages.mak
@@ -228,3 +228,5 @@ SCHROED_VERSION=1.0.4
 SCHROED_URL=http://www.diracvideo.org/download/schroedinger/schroedinger-$(SCHROED_VERSION).tar.gz
 ASS_VERSION=0.9.5
 ASS_URL=$(SF)/libass/libass-$(ASS_VERSION).tar.bz2
+GSM_VERSION=1.0.12
+GSM_URL=http://user.cs.tu-berlin.de/~jutta/gsm/gsm-$(GSM_VERSION).tar.gz




More information about the vlc-devel mailing list