summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-03-24 22:53:14 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-03-24 22:53:14 +0000
commit47dd62b0cec393c8ac09b9c5d0a37f6a9c434244 (patch)
tree049d3b0f3a427aa8ee1f44abd915c88da585e098 /media-sound/litestream
parentAdded to ~ppc (Manifest recommit) (diff)
downloadgentoo-2-47dd62b0cec393c8ac09b9c5d0a37f6a9c434244.tar.gz
gentoo-2-47dd62b0cec393c8ac09b9c5d0a37f6a9c434244.tar.bz2
gentoo-2-47dd62b0cec393c8ac09b9c5d0a37f6a9c434244.zip
Liteweight mp3 streaming server compatible with shoutcast protocol. Ebuild submitted by Adam Roben <aroben@fas.harvard.edu> in bug #35354.
Diffstat (limited to 'media-sound/litestream')
-rw-r--r--media-sound/litestream/ChangeLog12
-rw-r--r--media-sound/litestream/Manifest2
-rw-r--r--media-sound/litestream/files/digest-litestream-1.21
-rw-r--r--media-sound/litestream/files/litestream-1.2-Makefile.patch11
-rw-r--r--media-sound/litestream/files/vargs.h140
-rw-r--r--media-sound/litestream/litestream-1.2.ebuild45
-rw-r--r--media-sound/litestream/metadata.xml5
7 files changed, 216 insertions, 0 deletions
diff --git a/media-sound/litestream/ChangeLog b/media-sound/litestream/ChangeLog
new file mode 100644
index 000000000000..74d87a94e9f3
--- /dev/null
+++ b/media-sound/litestream/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for media-sound/litestream
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/litestream/ChangeLog,v 1.1 2004/03/24 22:53:14 eradicator Exp $
+
+*litestream-1.2 (24 Mar 2004)
+
+ 24 Mar 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ litestream-1.2.ebuild, metadata.xml, files/litestream-1.2-Makefile.patch,
+ files/vargs.h:
+ Liteweight mp3 streaming server compatible with shoutcast protocol. Ebuild
+ submitted by Adam Roben <aroben@fas.harvard.edu> in bug #35354.
+
diff --git a/media-sound/litestream/Manifest b/media-sound/litestream/Manifest
new file mode 100644
index 000000000000..d6cf5d2f5d49
--- /dev/null
+++ b/media-sound/litestream/Manifest
@@ -0,0 +1,2 @@
+MD5 3cb271d1169190169e9b74be52dd011f litestream-1.2.ebuild 516
+MD5 7b22396a0ce85c0f2f7260047052237c files/digest-litestream-1.2 65
diff --git a/media-sound/litestream/files/digest-litestream-1.2 b/media-sound/litestream/files/digest-litestream-1.2
new file mode 100644
index 000000000000..a78946ec09a9
--- /dev/null
+++ b/media-sound/litestream/files/digest-litestream-1.2
@@ -0,0 +1 @@
+MD5 6f3466df356fd66ad619449513a43a06 litestream-1.2.tar.gz 41075
diff --git a/media-sound/litestream/files/litestream-1.2-Makefile.patch b/media-sound/litestream/files/litestream-1.2-Makefile.patch
new file mode 100644
index 000000000000..0db0cb599f04
--- /dev/null
+++ b/media-sound/litestream/files/litestream-1.2-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2004-03-24 14:43:31.000000000 -0800
++++ Makefile 2004-03-24 14:44:44.000000000 -0800
+@@ -12,7 +12,7 @@
+ all: litestream literestream source client server
+
+ dbug.o: dbug.c
+- $(CC) $(CFLAGS) -o $@ -c $^ $(LDFLAGS) $(INCLUDES)
++ $(CC) $(CFLAGS) -o $@ -c $< $(LDFLAGS) $(INCLUDES)
+
+ libdbug.a: dbug.o
+ rm -f $@
diff --git a/media-sound/litestream/files/vargs.h b/media-sound/litestream/files/vargs.h
new file mode 100644
index 000000000000..ae78d16ef932
--- /dev/null
+++ b/media-sound/litestream/files/vargs.h
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * *
+ * N O T I C E *
+ * *
+ * Copyright Abandoned, 1987, Fred Fish *
+ * *
+ * *
+ * This previously copyrighted work has been placed into the public *
+ * domain by the author and may be freely used for any purpose, *
+ * private or commercial. *
+ * *
+ * Because of the number of inquiries I was receiving about the use *
+ * of this product in commercially developed works I have decided to *
+ * simply make it public domain to further its unrestricted use. I *
+ * specifically would be most happy to see this material become a *
+ * part of the standard Unix distributions by AT&T and the Berkeley *
+ * Computer Science Research Group, and a standard part of the GNU *
+ * system from the Free Software Foundation. *
+ * *
+ * I would appreciate it, as a courtesy, if this notice is left in *
+ * all copies and derivative works. Thank you. *
+ * *
+ * The author makes no warranty of any kind with respect to this *
+ * product and explicitly disclaims any implied warranties of mer- *
+ * chantability or fitness for any particular purpose. *
+ * *
+ ******************************************************************************
+ */
+
+
+/*
+ * FILE
+ *
+ * vargs.h include file for environments without varargs.h
+ *
+ * SCCS
+ *
+ * @(#)vargs.h 1.2 5/8/88
+ *
+ * SYNOPSIS
+ *
+ * #include "vargs.h"
+ *
+ * DESCRIPTION
+ *
+ * This file implements a varargs macro set for use in those
+ * environments where there is no system supplied varargs. This
+ * generally works because systems which don't supply a varargs
+ * package are precisely those which don't strictly need a varargs
+ * package. Using this one then allows us to minimize source
+ * code changes. So in some sense, this is a "portable" varargs
+ * since it is only used for convenience, when it is not strictly
+ * needed.
+ *
+ */
+
+/*
+ * These macros allow us to rebuild an argument list on the stack
+ * given only a va_list. We can use these to fake a function like
+ * vfprintf, which gets a fixed number of arguments, the last of
+ * which is a va_list, by rebuilding a stack and calling the variable
+ * argument form fprintf. Of course this only works when vfprintf
+ * is not available in the host environment, and thus is not available
+ * for fprintf to call (which would give us an infinite loop).
+ *
+ * Note that ARGS_TYPE is a long, which lets us get several bytes
+ * at a time while also preventing lots of "possible pointer alignment
+ * problem" messages from lint. The messages are valid, because this
+ * IS nonportable, but then we should only be using it in very
+ * nonrestrictive environments, and using the real varargs where it
+ * really counts.
+ *
+ */
+
+#define ARG0 a0
+#define ARG1 a1
+#define ARG2 a2
+#define ARG3 a3
+#define ARG4 a4
+#define ARG5 a5
+#define ARG6 a6
+#define ARG7 a7
+#define ARG8 a8
+#define ARG9 a9
+
+#define ARGS_TYPE long
+#define ARGS_LIST ARG0,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8,ARG9
+#define ARGS_DCL auto ARGS_TYPE ARGS_LIST
+
+/*
+ * A pointer of type "va_list" points to a section of memory
+ * containing an array of variable sized arguments of unknown
+ * number. This pointer is initialized by the va_start
+ * macro to point to the first byte of the first argument.
+ * We can then use it to walk through the argument list by
+ * incrementing it by the size of the argument being referenced.
+ */
+
+typedef char *va_list;
+
+/*
+ * The first variable argument overlays va_alist, which is
+ * nothing more than a "handle" which allows us to get the
+ * address of the first argument on the stack. Note that
+ * by definition, the va_dcl macro includes the terminating
+ * semicolon, which makes use of va_dcl in the source code
+ * appear to be missing a semicolon.
+ */
+
+#define va_dcl ARGS_TYPE va_alist;
+
+/*
+ * The va_start macro takes a variable of type "va_list" and
+ * initializes it. In our case, it initializes a local variable
+ * of type "pointer to char" to point to the first argument on
+ * the stack.
+ */
+
+#define va_start(list) list = (char *) &va_alist
+
+/*
+ * The va_end macro is a null operation for our use.
+ */
+
+#define va_end(list)
+
+/*
+ * The va_arg macro is the tricky one. This one takes
+ * a va_list as the first argument, and a type as the second
+ * argument, and returns a value of the appropriate type
+ * while advancing the va_list to the following argument.
+ * For our case, we first increment the va_list arg by the
+ * size of the type being recovered, cast the result to
+ * a pointer of the appropriate type, and then dereference
+ * that pointer as an array to get the previous arg (which
+ * is the one we wanted.
+ */
+
+#define va_arg(list,type) ((type *) (list += sizeof (type)))[-1]
+
diff --git a/media-sound/litestream/litestream-1.2.ebuild b/media-sound/litestream/litestream-1.2.ebuild
new file mode 100644
index 000000000000..cf76dd89cc25
--- /dev/null
+++ b/media-sound/litestream/litestream-1.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/litestream/litestream-1.2.ebuild,v 1.1 2004/03/24 22:53:14 eradicator Exp $
+
+inherit eutils
+
+DESCRIPTION="Litstream is a lightweight and robust shoutcast-compatible streaming mp3 server."
+HOMEPAGE="http://www.litestream.org/"
+SRC_URI="http://litestream.org/litestream/${P}.tar.gz"
+LICENSE="BSD"
+
+IUSE=""
+SLOT="0"
+
+KEYWORDS="~x86"
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cp ${FILESDIR}/vargs.h ${S}/include
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-Makefile.patch
+
+ append-flags "-DNO_VARARGS"
+ sed -i "s/CFLAGS = /CFLAGS = ${CFLAGS} /g" Makefile
+}
+
+src_compile() {
+ emake all || die
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe litestream literestream
+ newexe source litestream-source
+ newexe server litestream-server
+ newexe client litestream-client
+
+ dodoc ABOUT ACKNOWLEDGEMENTS BUGS CHANGELOG CONTACT FILES LICENSE MAKEITGO README
+}
diff --git a/media-sound/litestream/metadata.xml b/media-sound/litestream/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-sound/litestream/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>