diff options
author | Artur Maciag <artur@Artur-Maciags-Mac.local> | 2010-11-14 20:50:40 +0100 |
---|---|---|
committer | Artur Maciag <artur@Artur-Maciags-Mac.local> | 2010-11-14 20:50:40 +0100 |
commit | 1fce056bf00b4606bd284fa61e41974b77be1330 (patch) | |
tree | 22ae6474c97dab36a3bed0ce6d23ea23cf45ccf1 | |
parent | [dev-python/django-threadedcomments] new live ebuild (diff) | |
download | piczu-prefix.tar.gz piczu-prefix.tar.bz2 piczu-prefix.zip |
[media-video/rtmpdump] darwin supportprefix
-rw-r--r-- | media-video/rtmpdump/Manifest | 3 | ||||
-rw-r--r-- | media-video/rtmpdump/files/rtmpdump-darwin-10.6.patch | 48 | ||||
-rw-r--r-- | media-video/rtmpdump/rtmpdump-2.3.ebuild | 75 |
3 files changed, 126 insertions, 0 deletions
diff --git a/media-video/rtmpdump/Manifest b/media-video/rtmpdump/Manifest new file mode 100644 index 0000000..452afdd --- /dev/null +++ b/media-video/rtmpdump/Manifest @@ -0,0 +1,3 @@ +AUX rtmpdump-darwin-10.6.patch 1274 RMD160 d84bf328e8a3d8a8aa06eadbe1770e932da8e42c SHA1 8d1c10106dc014208788b551cd0c0a362328f656 SHA256 84b50952e8e3b55a57a2c99550c71dd4c658c90b711da3176c062b44dcd6c1f7 +DIST rtmpdump-2.3.tgz 125103 RMD160 1d48925e6567783806fa68819d6a695cd06138bc SHA1 b65ce7708ae79adb51d1f43dd0b6d987076d7c42 SHA256 ef38b7a99d82ce6912063d21063aeaf28185341b3df486e24bffce5354224b2c +EBUILD rtmpdump-2.3.ebuild 2275 RMD160 0b76f9b5a7345b7026af11ef56348dc56e6ad288 SHA1 6b3d4cc8e043688a4f4312b60df3be2dbfb6b1d0 SHA256 ebff7f63f16e856f489c7664385a35168063fafc099b633a695a6c15100ac423 diff --git a/media-video/rtmpdump/files/rtmpdump-darwin-10.6.patch b/media-video/rtmpdump/files/rtmpdump-darwin-10.6.patch new file mode 100644 index 0000000..5a229b3 --- /dev/null +++ b/media-video/rtmpdump/files/rtmpdump-darwin-10.6.patch @@ -0,0 +1,48 @@ +--- librtmp/Makefile.orig 2010-11-14 19:05:15 +0100 ++++ librtmp/Makefile 2010-11-14 19:10:05 +0100 +@@ -25,12 +25,12 @@ + CRYPTO_REQ=$(REQ_$(CRYPTO)) + CRYPTO_DEF=$(DEF_$(CRYPTO)) + +-SO_posix=so.0 ++SO_posix=0.dylib + SO_mingw=dll + SO_EXT=$(SO_$(SYS)) + + SHARED=yes +-SODEF_yes=-fPIC ++SODEF_yes=-fPIC -fno-common + SOLIB_yes=librtmp.$(SO_EXT) + SOINST_yes=install_$(SO_EXT) + SO_DEF=$(SODEF_$(SHARED)) +@@ -55,14 +55,14 @@ + all: librtmp.a $(SO_LIB) + + clean: +- rm -f *.o *.a *.so *.$(SO_EXT) ++ rm -f *.o *.a *.dylib *.$(SO_EXT) + + librtmp.a: $(OBJS) + $(AR) rs $@ $? + + librtmp.$(SO_EXT): $(OBJS) +- $(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB) +- ln -sf $@ librtmp.so ++ $(CC) -shared -current_version 1.0.0 -compatibility_version 1.0.0 $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB) ++ ln -sf $@ librtmp.dylib + + 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 +@@ -83,9 +83,9 @@ + 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_0.dylib: librtmp.0.dylib ++ cp librtmp.0.dylib $(LIBDIR) ++ cd $(LIBDIR); ln -sf librtmp.0.dylib librtmp.dylib + + install_dll: librtmp.dll + cp librtmp.dll $(BINDIR) diff --git a/media-video/rtmpdump/rtmpdump-2.3.ebuild b/media-video/rtmpdump/rtmpdump-2.3.ebuild new file mode 100644 index 0000000..3932a6a --- /dev/null +++ b/media-video/rtmpdump/rtmpdump-2.3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/rtmpdump/rtmpdump-2.3.ebuild,v 1.10 2010/10/11 18:51:42 jer Exp $ +EAPI="3" + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Open source command-line RTMP client intended to stream audio or video flash content" +HOMEPAGE="http://rtmpdump.mplayerhq.hu/" +SRC_URI="http://rtmpdump.mplayerhq.hu/download/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ppc ppc64 x86 ~x86-macos ~x64-macos" +IUSE="gnutls polarssl ssl" + +DEPEND="ssl? ( + gnutls? ( net-libs/gnutls ) + polarssl? ( !gnutls? ( >=net-libs/polarssl-0.14.0 ) ) + !gnutls? ( !polarssl? ( dev-libs/openssl ) ) + ) + sys-libs/zlib" +RDEPEND="${DEPEND}" + +pkg_setup() { + if ! use ssl && ( use gnutls || use polarssl ) ; then + ewarn "USE='gnutls polarssl' are ignored without USE='ssl'." + ewarn "Please review the local USE flags for this package." + fi +} + +src_prepare() { + # fix Makefile ( bug #298535 , bug #318353 and bug #324513 ) + sed -i 's/\$(MAKEFLAGS)//g' Makefile \ + || die "failed to fix Makefile" + sed -i -e 's:OPT=:&-fPIC :' \ + -e 's:OPT:OPTS:' \ + -e 's:CFLAGS=.*:& $(OPT):' librtmp/Makefile \ + || die "failed to fix Makefile" + # Darwin 10.6 compile fix + if [[ ${CHOST} == *-darwin* ]] ; then + epatch ${FILESDIR}/rtmpdump-darwin-10.6.patch + fi +} + +src_compile() { + if use ssl ; then + if use gnutls ; then + crypto="GNUTLS" + elif use polarssl ; then + crypto="POLARSSL" + else + crypto="OPENSSL" + fi + fi + #fix multilib-script support. Bug #327449 + sed -i "/^libdir/s:lib$:$(get_libdir)$:" librtmp/Makefile + emake CC=$(tc-getCC) LD=$(tc-getLD) \ + OPT="${CFLAGS}" XLDFLAGS="${LDFLAGS}" CRYPTO="${crypto}" SYS=posix || die "emake failed" +} + +src_install() { + mkdir -p "${ED}"/${DESTTREE}/$(get_libdir) + emake DESTDIR="${ED}" prefix="${DESTTREE}" mandir="${DESTTREE}/share/man" \ + CRYPTO="${crypto}" install || die "emake install failed" + # Fix install_name + if [[ ${CHOST} == *-darwin* ]] ; then + ebegin "fixing install_name of librtmp.0.dylib" + install_name_tool \ + -id "${EPREFIX}"/usr/lib/librtmp.0.dylib \ + "${ED}"/usr/lib/librtmp.0.dylib + eend $? + fi + dodoc README ChangeLog rtmpdump.1.html rtmpgw.8.html || die "dodoc failed" +} |