]> git.sesse.net Git - vlc/commitdiff
Contribs: Provide GSM for FFmpeg. This library is stupid... Seriously.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Mar 2009 18:33:45 +0000 (20:33 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Mar 2009 18:34:52 +0000 (20:34 +0200)
extras/contrib/src/Makefile
extras/contrib/src/Patches/gsm-cross.patch [new file with mode: 0644]
extras/contrib/src/packages.mak

index a05737f19894a9d85eb8042855dec7ac4cd88797..cbfc5c734b9e95a1cdda6e32d4c35a32d0e49459 100644 (file)
@@ -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 (file)
index 0000000..1b8d6e2
--- /dev/null
@@ -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
index f9e233693a9b72178867d42cc965ef5310b98c54..e7ece983399937790fd7baa8353146e641599150 100644 (file)
@@ -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