summaryrefslogtreecommitdiff
path: root/recipes/librtmp
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2014-10-10 08:53:09 +0200
committerEdward Hervey <bilboed@bilboed.com>2014-10-10 08:53:09 +0200
commit2f6d65b03bafb23df429a6a4b9e726a7ff55333f (patch)
tree2ce4de4873504d459b11fd2c42e13779c5eca479 /recipes/librtmp
parentfe70bf49fa40e8eb2170c763d35b2c1796f49291 (diff)
Revert "librtmp.recipe: Use same version as gentoo"
This reverts commit fe70bf49fa40e8eb2170c763d35b2c1796f49291. Ok, it's even more broken than before, and since I'm gone this weekend let's just revert it anyone up for auto-tooling librtmp ?
Diffstat (limited to 'recipes/librtmp')
-rw-r--r--recipes/librtmp/0001-Fix-Makefiles-to-support-several-platforms.patch137
-rw-r--r--recipes/librtmp/librtmp.recipe7
2 files changed, 141 insertions, 3 deletions
diff --git a/recipes/librtmp/0001-Fix-Makefiles-to-support-several-platforms.patch b/recipes/librtmp/0001-Fix-Makefiles-to-support-several-platforms.patch
new file mode 100644
index 00000000..04bb3734
--- /dev/null
+++ b/recipes/librtmp/0001-Fix-Makefiles-to-support-several-platforms.patch
@@ -0,0 +1,137 @@
+From b5d245366a0c18004cec1294962dda6f3494954f Mon Sep 17 00:00:00 2001
+From: Andoni Morales Alastruey <ylatuya@gmail.com>
+Date: Wed, 1 Jan 2014 20:51:19 +0100
+Subject: [PATCH] Fix Makefiles to support several platforms
+
+---
+ librtmp/Makefile | 82 +++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 48 insertions(+), 34 deletions(-)
+
+diff --git a/librtmp/Makefile b/librtmp/Makefile
+index 6774db7..d864d6b 100644
+--- a/librtmp/Makefile
++++ b/librtmp/Makefile
+@@ -1,13 +1,26 @@
+ VERSION=v2.3
+
++ifndef prefix
+ prefix=/usr/local
+-
+-CC=$(CROSS_COMPILE)gcc
+-LD=$(CROSS_COMPILE)ld
+-AR=$(CROSS_COMPILE)ar
+-
++endif
++
++ifndef CC
++CC=gcc
++endif
++ifndef LD
++LD=ld
++endif
++ifndef AR
++AR=ar
++endif
++
++ifndef SYS
+ SYS=posix
++endif
++
++ifndef CRYPTO
+ CRYPTO=OPENSSL
++endif
+ #CRYPTO=GNUTLS
+ DEF_POLARSSL=-DUSE_POLARSSL
+ DEF_OPENSSL=-DUSE_OPENSSL
+@@ -25,21 +38,29 @@ CRYPTO_LIB=$(LIB_$(CRYPTO)) $(LIBS_$(SYS))
+ CRYPTO_REQ=$(REQ_$(CRYPTO))
+ CRYPTO_DEF=$(DEF_$(CRYPTO))
+
+-SO_posix=so.0
+-SO_mingw=dll
+-SO_EXT=$(SO_$(SYS))
+-
+-SHARED=yes
+-SODEF_yes=-fPIC
+-SOLIB_yes=librtmp.$(SO_EXT)
+-SOINST_yes=install_$(SO_EXT)
+-SO_DEF=$(SODEF_$(SHARED))
+-SO_LIB=$(SOLIB_$(SHARED))
+-SO_INST=$(SOINST_$(SHARED))
+-
+-DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF) $(XDEF)
+-OPT=-O2
+-CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) $(SO_DEF)
++ifeq ($(SYS),posix)
++LIBRTMP=librtmp.so.0
++LIBRTMP_L=librtmp.so
++EXTRA_LDFLAGS=-Wl,-soname,$(LIBRTMP)
++CREATE_L=ln -sf $(LIBRTMP) $(LIBRTMP_L)
++INSTALL_LIB=cp $(LIBRTMP) $(LIBDIR)
++endif
++ifeq ($(SYS),mingw)
++LIBRTMP=librtmp.dll
++LIBRTMP_L=librtmp.dll.a
++EXTRA_LDFLAGS=-Wl,--out-implib,$(LIBRTMP_L)
++CREATE_L=
++INSTALL_LIB=cp $(LIBRTMP) $(BINDIR)
++endif
++ifeq ($(SYS),darwin)
++LIBRTMP=librtmp.0.dylib
++LIBRTMP_L=librtmp.dylib
++CREATE_L=ln -sf $(LIBRTMP) $(LIBRTMP_L)
++INSTALL_LIB=cp $(LIBRTMP) $(LIBDIR)
++endif
++INSTALL_L=cp $(LIBRTMP_L) $(LIBDIR)
++
++CFLAGS:=$(CFLAGS) -fPIC -DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF)
+
+ incdir=$(prefix)/include/librtmp
+ bindir=$(prefix)/bin
+@@ -52,7 +73,7 @@ MANDIR=$(DESTDIR)$(mandir)
+
+ OBJS=rtmp.o log.o amf.o hashswf.o parseurl.o
+
+-all: librtmp.a $(SO_LIB)
++all: librtmp.a $(LIBRTMP)
+
+ clean:
+ rm -f *.o *.a *.so *.$(SO_EXT)
+@@ -60,9 +81,9 @@ clean:
+ librtmp.a: $(OBJS)
+ $(AR) rs $@ $?
+
+-librtmp.$(SO_EXT): $(OBJS)
+- $(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB)
+- ln -sf $@ librtmp.so
++$(LIBRTMP): $(OBJS)
++ $(CC) -shared $(EXTRA_LDFLAGS) $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB)
++ $(CREATE_L)
+
+ log.o: log.c log.h Makefile
+ rtmp.o: rtmp.c rtmp.h rtmp_sys.h handshake.h dh.h log.h amf.h Makefile
+@@ -74,18 +95,11 @@ librtmp.pc: librtmp.pc.in Makefile
+ sed -e "s;@prefix@;$(prefix);" -e "s;@VERSION@;$(VERSION);" \
+ -e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" librtmp.pc.in > $@
+
+-install: install_base $(SO_INST)
+-
+-install_base: librtmp.a librtmp.pc
++install: librtmp.a librtmp.pc
+ -mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig $(MANDIR)/man3
+ cp amf.h http.h log.h rtmp.h $(INCDIR)
+ cp librtmp.a $(LIBDIR)
+ cp librtmp.pc $(LIBDIR)/pkgconfig
+ cp librtmp.3 $(MANDIR)/man3
+-
+-install_so.0: librtmp.so.0
+- cp librtmp.so.0 $(LIBDIR)
+- cd $(LIBDIR); ln -sf librtmp.so.0 librtmp.so
+-
+-install_dll: librtmp.dll
+- cp librtmp.dll $(BINDIR)
++ $(INSTALL_LIB)
++ $(INSTALL_L)
+--
+1.8.3.2
+
diff --git a/recipes/librtmp/librtmp.recipe b/recipes/librtmp/librtmp.recipe
index 4da6c523..f6d81f2c 100644
--- a/recipes/librtmp/librtmp.recipe
+++ b/recipes/librtmp/librtmp.recipe
@@ -4,14 +4,15 @@ from cerbero.tools.libtool import LibtoolLibrary
class Recipe(recipe.Recipe):
name = 'librtmp'
- version = '2.4_p20131018'
+ version = '2.3'
stype = SourceType.TARBALL
btype = BuildType.MAKEFILE
- url = 'http://people.freedesktop.org/~bilboed/rtmpdump-2.4_p20131018.tar.bz2'
+ url = 'http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz'
licenses = [License.LGPLv2_1]
srcdir = 'librtmp'
tarball_dirname = 'rtmpdump-%(version)s'
- deps = ['gnutls', 'libgcrypt', 'nettle']
+ patches = ['0001-Fix-Makefiles-to-support-several-platforms.patch']
+ deps = ['gnutls', 'libgcrypt']
files_libs = ['librtmp']
files_devel = ['include/librtmp/', 'lib/pkgconfig/librtmp.pc' ]