[vlc-commits] Contribs: add gsm

Jean-Baptiste Kempf git at videolan.org
Mon Jul 4 02:27:37 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jul  4 02:24:35 2011 +0200| [76fb6afa65b5890b77c87f089a3e16b896c78ca9] | committer: Jean-Baptiste Kempf

Contribs: add gsm

libavcodec rule must be updated still

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

 contrib/src/gsm/SHA512SUMS      |    1 +
 contrib/src/gsm/gsm-cross.patch |   38 ++++++++++++++++++++++++++++++++++++++
 contrib/src/gsm/rules.mak       |   26 ++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/contrib/src/gsm/SHA512SUMS b/contrib/src/gsm/SHA512SUMS
new file mode 100644
index 0000000..c278bab
--- /dev/null
+++ b/contrib/src/gsm/SHA512SUMS
@@ -0,0 +1 @@
+88d251603c6172ce5cbc07e38d61d981b86e34fa2b1610a47f999a6ecb6db9f3bf5b6205abd8cb66ee70a6f5c6ea5679417582e78b595e081b471b15e7ff471d  gsm-1.0.12.tar.gz
diff --git a/contrib/src/gsm/gsm-cross.patch b/contrib/src/gsm/gsm-cross.patch
new file mode 100644
index 0000000..1b8d6e2
--- /dev/null
+++ b/contrib/src/gsm/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/contrib/src/gsm/rules.mak b/contrib/src/gsm/rules.mak
new file mode 100644
index 0000000..3a12f1b
--- /dev/null
+++ b/contrib/src/gsm/rules.mak
@@ -0,0 +1,26 @@
+# GSM
+GSM_VERSION := 1.0.12
+GSM_URL := $(CONTRIB_VIDEOLAN)/gsm-$(GSM_VERSION).tar.gz
+
+PKGS += gsm
+
+$(TARBALLS)/gsm-$(GSM_VERSION).tar.gz:
+	$(call download,$(GSM_URL))
+
+.sum-gsm: gsm-$(GSM_VERSION).tar.gz
+
+gsm: gsm-$(GSM_VERSION).tar.gz .sum-gsm
+	$(UNPACK)
+	mv gsm-1.0-* gsm-$(GSM_VERSION)
+	$(APPLY) $(SRC)/gsm/gsm-cross.patch
+	$(MOVE)
+ifdef HAVE_MACOSX
+	(cd $@; sed -e 's%-O2%-O2\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%# LDFLAGS >=%LDFLAGS >-= $(EXTRA_LDFLAGS)%' -e 's%gcc%$(CC)%' -i.orig  Makefile)
+endif
+	(cd $@; sed -i -e 's%-O2%-O2 -fPIC%' Makefile)
+
+.gsm: gsm
+	cd $< && $(HOSTVARS) $(MAKE)
+	cd $< && mkdir -p $(PREFIX)/include/gsm && cp inc/gsm.h $(PREFIX)/include/gsm
+	cd $< && cp lib/libgsm.a $(PREFIX)/lib
+	touch $@



More information about the vlc-commits mailing list