diff --git a/net/rtmpdump/Makefile b/net/rtmpdump/Makefile new file mode 100644 index 00000000000..81ebbb1c8a6 --- /dev/null +++ b/net/rtmpdump/Makefile @@ -0,0 +1,30 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ + +COMMENT = dump RTMP media streams + +DISTNAME = rtmpdump-v1.4 +PKGNAME = ${DISTNAME:S/-v/-/} + +CATEGORIES = net + +HOMEPAGE = http://sourceforge.net/projects/rtmpdump/ + +# GPLv2+ +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM =Yes +PERMIT_DISTFILES_FTP = Yes + +WANTLIB = c m stdc++ + +MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=rtmpdump/} +WRKDIST = ${WRKDIR}/rtmpdump + +MAKE_FLAGS += CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" + +NO_REGRESS = Yes + +do-install: + ${INSTALL_PROGRAM} ${WRKBUILD}/rtmpdump ${PREFIX}/bin + +.include diff --git a/net/rtmpdump/distinfo b/net/rtmpdump/distinfo new file mode 100644 index 00000000000..f2d07645a2e --- /dev/null +++ b/net/rtmpdump/distinfo @@ -0,0 +1,5 @@ +MD5 (rtmpdump-v1.4.tar.gz) = Cf7y5nT3V5CI2WaqxdCHNg== +RMD160 (rtmpdump-v1.4.tar.gz) = DFnmALXKWGV3dR4Dyq30DuN+AQU= +SHA1 (rtmpdump-v1.4.tar.gz) = SwXK2bFK/VX47oCGb+4BemX3noQ= +SHA256 (rtmpdump-v1.4.tar.gz) = VFumlU4I4UH5yl3t1Lgiss14HDyk7CSQhMhrz85KImM= +SIZE (rtmpdump-v1.4.tar.gz) = 177619 diff --git a/net/rtmpdump/patches/patch-Makefile b/net/rtmpdump/patches/patch-Makefile new file mode 100644 index 00000000000..a045b3c826b --- /dev/null +++ b/net/rtmpdump/patches/patch-Makefile @@ -0,0 +1,25 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ + +avoid gmake-isms + +--- Makefile.orig Fri Apr 17 12:26:58 2009 ++++ Makefile Fri Apr 17 12:27:00 2009 +@@ -10,13 +10,17 @@ CFLAGS=-Wall + CXXFLAGS=-Wall + LDFLAGS=-Wall + ++.SUFFIXES: .cpp ++.cpp.o: ++ $(CXX) $(CXXFLAGS) -c $< -o $@ ++ + all: rtmpdump + + clean: + rm -f rtmpdump rtmpdump.exe *.o + + rtmpdump: bytes.o log.o rtmp.o AMFObject.o rtmppacket.o rtmpdump.o parseurl.o +- $(CXX) $(LDFLAGS) $^ -o $@ ++ $(CXX) $(LDFLAGS) $> -o $@ + + win32: bytes.o log.o rtmp.o AMFObject.o rtmppacket.o rtmpdump.o parseurl.o + $(CXX) $(LDFLAGS) $^ -o rtmpdump.exe -lws2_32 -lwinmm diff --git a/net/rtmpdump/patches/patch-bytes_cpp b/net/rtmpdump/patches/patch-bytes_cpp new file mode 100644 index 00000000000..711f593698b --- /dev/null +++ b/net/rtmpdump/patches/patch-bytes_cpp @@ -0,0 +1,31 @@ +$OpenBSD: patch-bytes_cpp,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ + +- unbreak all big-endian arch (first hunk) +- unbreak strict alignment big-endian (second hunk) + +--- bytes.cpp.orig Wed Mar 11 21:33:48 2009 ++++ bytes.cpp Fri Apr 17 18:43:52 2009 +@@ -30,10 +30,10 @@ void WriteNumber(char *data, double dVal) + uint64_t res; + + #if __FLOAT_WORD_ORDER == __BYTE_ORDER ++ uint64_t in = *((uint64_t*)&dVal); + #if __BYTE_ORDER == __BIG_ENDIAN +- res = dVal; ++ res = in; + #elif __BYTE_ORDER == __LITTLE_ENDIAN +- uint64_t in = *((uint64_t*)&dVal); + res = __bswap_64(in); + #endif + #else +@@ -60,7 +60,9 @@ double ReadNumber(const char *data) + { + #if __FLOAT_WORD_ORDER == __BYTE_ORDER + #if __BYTE_ORDER == __BIG_ENDIAN +- return *((double *)data); ++ double val; ++ memcpy(&val, data, sizeof(double)); ++ return val; + #elif __BYTE_ORDER == __LITTLE_ENDIAN + uint64_t in = *((uint64_t*)data); + uint64_t res = __bswap_64(in); diff --git a/net/rtmpdump/patches/patch-bytes_h b/net/rtmpdump/patches/patch-bytes_h new file mode 100644 index 00000000000..69724c4aa70 --- /dev/null +++ b/net/rtmpdump/patches/patch-bytes_h @@ -0,0 +1,23 @@ +$OpenBSD: patch-bytes_h,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ +--- bytes.h.orig Wed Mar 11 21:55:44 2009 ++++ bytes.h Wed Apr 8 15:44:32 2009 +@@ -34,8 +34,17 @@ typedef unsigned long long int uint64_t; + | (((x) & 0x00000000000000ffull) << 56)) + + #else +-#include +-#include ++#include ++#define bswap_16 swap16 ++#define bswap_32 swap32 ++#define bswap_64 swap64 ++#define __bswap_16 __swap16 ++#define __bswap_32 __swap32 ++#define __bswap_64 __swap64 ++#define __BYTE_ORDER _BYTE_ORDER ++#define __BIG_ENDIAN _BIG_ENDIAN ++#define __LITTLE_ENDIAN _LITTLE_ENDIAN ++#define __FLOAT_WORD_ORDER _BYTE_ORDER + + typedef __uint64_t uint64_t; + typedef __uint32_t uint32_t; diff --git a/net/rtmpdump/patches/patch-log_h b/net/rtmpdump/patches/patch-log_h new file mode 100644 index 00000000000..40959e15433 --- /dev/null +++ b/net/rtmpdump/patches/patch-log_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-log_h,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ +--- log.h.orig Fri Apr 17 14:05:18 2009 ++++ log.h Fri Apr 17 14:05:37 2009 +@@ -21,7 +21,7 @@ + #ifndef __LOG_H__ + #define __LOG_H__ + +-#define _DEBUG ++/* #define _DEBUG */ + + #ifdef _DEBUG + #undef NODEBUG diff --git a/net/rtmpdump/patches/patch-rtmp_h b/net/rtmpdump/patches/patch-rtmp_h new file mode 100644 index 00000000000..e4b4fe2ac0f --- /dev/null +++ b/net/rtmpdump/patches/patch-rtmp_h @@ -0,0 +1,20 @@ +$OpenBSD: patch-rtmp_h,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ +--- rtmp.h.orig Wed Apr 8 15:50:31 2009 ++++ rtmp.h Wed Apr 8 15:50:43 2009 +@@ -27,12 +27,12 @@ + + #ifdef WIN32 + #else +-//#include +-//#include ++#include ++#include + #include + #include +-//#include +-//#include ++#include ++#include + #endif + + #include "AMFObject.h" diff --git a/net/rtmpdump/pkg/DESCR b/net/rtmpdump/pkg/DESCR new file mode 100644 index 00000000000..553e5732747 --- /dev/null +++ b/net/rtmpdump/pkg/DESCR @@ -0,0 +1,3 @@ +A small dumper for media content streamed over the RTMP protocol. +Supplying an rtmp url will result in a dumped flv file, which can be +played/transcoded using ffmpeg/mplayer, etc. diff --git a/net/rtmpdump/pkg/PLIST b/net/rtmpdump/pkg/PLIST new file mode 100644 index 00000000000..10485f812ea --- /dev/null +++ b/net/rtmpdump/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2009/04/17 17:56:50 sthen Exp $ +@bin bin/rtmpdump