summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-01-14 01:47:19 +0100
committerDavid Seifert <soap@gentoo.org>2016-01-14 01:47:52 +0100
commitedcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0 (patch)
tree29cda3e7f008d23ad55e212739ce10f44266083c /media-sound/daudio
parentapp-misc/when: version bump to 1.1.35 (diff)
downloadgentoo-edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0.tar.gz
gentoo-edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0.tar.bz2
gentoo-edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0.zip
media-sound/daudio: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics
Gentoo-Bug: 570582 In addition, modernize to EAPI=6 and fix implicit declarations. Package-Manager: portage-2.2.26
Diffstat (limited to 'media-sound/daudio')
-rw-r--r--media-sound/daudio/daudio-0.3-r1.ebuild45
-rw-r--r--media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch98
2 files changed, 143 insertions, 0 deletions
diff --git a/media-sound/daudio/daudio-0.3-r1.ebuild b/media-sound/daudio/daudio-0.3-r1.ebuild
new file mode 100644
index 000000000000..2ff9aab27979
--- /dev/null
+++ b/media-sound/daudio/daudio-0.3-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Distributed audio on the local network"
+HOMEPAGE="http://daudio.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+#-sparc: 0.3: static audio on local daemon. No audio when client connects to amd64 daemon
+KEYWORDS="~amd64 ~ppc -sparc ~x86"
+
+IUSE=""
+DEPEND=">=media-libs/libmad-0.15.0b-r1"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-makefile.patch"
+ "${FILESDIR}/${P}-qa-implicit-declarations.patch"
+)
+
+src_prepare() {
+ # fix #570582 by restoring pre-GCC5 inline semantics
+ append-cflags -std=gnu89
+
+ tc-export CC
+ default
+}
+
+src_compile() {
+ emake -C client
+ emake -C server
+ emake -C streamer
+}
+
+src_install() {
+ dobin client/daudioc server/daudiod streamer/dstreamer
+ newinitd "${FILESDIR}"/daudio.rc daudio
+ dodoc doc/*
+}
diff --git a/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch b/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch
new file mode 100644
index 000000000000..d60be6f64e68
--- /dev/null
+++ b/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch
@@ -0,0 +1,98 @@
+Fix implicit declarations, such as:
+
+main.c: In function ‘main’:
+main.c:45:2: warning: incompatible implicit declaration of built-in function ‘exit’
+ exit(1);
+ ^
+--- daudio-0.3/client/main.c
++++ daudio-0.3/client/main.c
+@@ -22,6 +22,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <sched.h>
++#include <stdlib.h>
+
+ int main(int argc, char **argv) {
+ int s;
+@@ -50,7 +51,7 @@
+
+ /* drop priveledges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ set_default_options(void);
+
+--- daudio-0.3/client/net.c
++++ daudio-0.3/client/net.c
+@@ -27,6 +27,7 @@
+ #include <asm/unistd.h>
+ #include <mad.h>
+ #include <pthread.h>
++#include <stdlib.h>
+
+ #include "net.h"
+ #include "../common/frame.h"
+--- daudio-0.3/server/local.c
++++ daudio-0.3/server/local.c
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
++#include <stdlib.h>
+
+ #include "timer.h"
+ #include "data.h"
+@@ -71,7 +72,7 @@
+
+ /* drop priveleges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ current = bigbuf.buffer;
+
+--- daudio-0.3/server/main.c
++++ daudio-0.3/server/main.c
+@@ -25,6 +25,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <signal.h>
++#include <stdlib.h>
+
+ int main () {
+ int r;
+@@ -40,19 +41,19 @@
+ uid = getuid();
+ r = d_init();
+ if(r == -1) {
+- seteuid(uid);
++ if(seteuid(uid)){};
+ perror("d_init failed");
+ exit(1);
+ }
+ r = b_init();
+ if(r == -1) {
+- seteuid(uid);
++ if(seteuid(uid)){};
+ perror("b_init failed");
+ exit(1);
+ }
+ r = t_init();
+ /* drop priveleges */
+- seteuid(uid);
++ if(seteuid(uid)){};
+ if(r == -1) {
+ perror("t_init failed");
+ exit(1);
+--- daudio-0.3/server/timer.c
++++ daudio-0.3/server/timer.c
+@@ -124,7 +124,7 @@
+
+ /* drop priveleges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ mytimer.it_value.tv_sec = 0;
+ mytimer.it_value.tv_usec = 0;