summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-04-09 04:52:09 +0000
committerJeroen Roovers <jer@gentoo.org>2010-04-09 04:52:09 +0000
commitcb7a3e1e9b88da54f6242c49f5734f9de1bb2104 (patch)
tree6cbd00cb638f8a110b1fb5265e11ae026f3ce2b5 /net-misc/tcpsound
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-cb7a3e1e9b88da54f6242c49f5734f9de1bb2104.tar.gz
gentoo-2-cb7a3e1e9b88da54f6242c49f5734f9de1bb2104.tar.bz2
gentoo-2-cb7a3e1e9b88da54f6242c49f5734f9de1bb2104.zip
Clean up ebuild. Remove all "mktool" use. Respect LDFLAGS. Incidentally fix useless compiler flags. Make (failing) Makefile commands explicit. Finish building or die (bug #313661).
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'net-misc/tcpsound')
-rw-r--r--net-misc/tcpsound/ChangeLog9
-rw-r--r--net-misc/tcpsound/files/tcpsound-0.3.1-asneeded.patch22
-rw-r--r--net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch52
-rw-r--r--net-misc/tcpsound/tcpsound-0.3.1.ebuild17
4 files changed, 68 insertions, 32 deletions
diff --git a/net-misc/tcpsound/ChangeLog b/net-misc/tcpsound/ChangeLog
index 052548118d8e..3896eef1a61d 100644
--- a/net-misc/tcpsound/ChangeLog
+++ b/net-misc/tcpsound/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/tcpsound
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/tcpsound/ChangeLog,v 1.5 2010/03/29 12:20:07 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tcpsound/ChangeLog,v 1.6 2010/04/09 04:52:09 jer Exp $
+
+ 09 Apr 2010; Jeroen Roovers <jer@gentoo.org> tcpsound-0.3.1.ebuild,
+ -files/tcpsound-0.3.1-asneeded.patch,
+ +files/tcpsound-0.3.1-makefile.patch:
+ Clean up ebuild. Remove all "mktool" use. Respect LDFLAGS. Incidentally
+ fix useless compiler flags. Make (failing) Makefile commands explicit.
+ Finish building or die (bug #313661).
29 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> tcpsound-0.3.1.ebuild,
+files/tcpsound-0.3.1-asneeded.patch:
diff --git a/net-misc/tcpsound/files/tcpsound-0.3.1-asneeded.patch b/net-misc/tcpsound/files/tcpsound-0.3.1-asneeded.patch
deleted file mode 100644
index 76f4e2b4d01f..000000000000
--- a/net-misc/tcpsound/files/tcpsound-0.3.1-asneeded.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- Makefile
-+++ Makefile
-@@ -10,15 +10,16 @@
- MAN = tcpsound.1
- MANGZ = $(MAN:.1=.1.gz)
- MKTOOL = ./mktool
--CFLAGS = -c -v -g -W1 -I$(includedir) -L$(libdir) -lSDL -lmba -lpthread
-+CFLAGS = -c -v -g -W1 -I$(includedir)
-+LIBS = -L$(libdir) -lSDL -lmba -lpthread
- CC = $(MKTOOL)
-
- .SUFFIXES: .1 .1.gz
-
- tcpsound: mktool src/tcpsound.c src/sound.h src/sound.c src/parse.h src/parse.c
-- @$(CC) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound
-+ @$(CC) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound $(LIBS)
- play: mktool src/play.c
-- @$(CC) $(CFLAGS) src/play.c -o play
-+ @$(CC) $(CFLAGS) src/play.c -o play $(LIBS)
-
- mktool:
- cc -g -o mktool mktool.c
diff --git a/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch b/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch
new file mode 100644
index 000000000000..2d05fbbfe9f1
--- /dev/null
+++ b/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch
@@ -0,0 +1,52 @@
+--- Makefile.org 2005-09-05 09:26:34.000000000 +0200
++++ Makefile 2010-04-09 06:42:41.000000000 +0200
+@@ -1,32 +1,35 @@
+ # Makefile for tcpsound
+
+-prefix = /usr/local
++prefix = $(DESTDIR)/usr
+
+ bindir = $(prefix)/bin
+-wavdir = $(prefix)/share/sounds
++wavdir = $(prefix)/share/tcpsound
+ includedir = $(prefix)/include
+ libdir = $(prefix)/lib
+-mandir = $(prefix)/man
++mandir = $(prefix)/man/man1
+ MAN = tcpsound.1
+ MANGZ = $(MAN:.1=.1.gz)
+-MKTOOL = ./mktool
+-CFLAGS = -c -v -g -W1 -I$(includedir) -L$(libdir) -lSDL -lmba -lpthread
+-CC = $(MKTOOL)
++MKTOOL = install
++CFLAGS += -I$(includedir)
++LIBS = -L$(libdir) -lSDL -lmba -lpthread
+
+ .SUFFIXES: .1 .1.gz
+
+-tcpsound: mktool src/tcpsound.c src/sound.h src/sound.c src/parse.h src/parse.c
+- @$(CC) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound
+-play: mktool src/play.c
+- @$(CC) $(CFLAGS) src/play.c -o play
++tcpsound: src/tcpsound.c src/sound.h src/sound.c src/parse.h src/parse.c
++ $(CC) $(LDFLAGS) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound $(LIBS)
++play: src/play.c
++ $(CC) $(LDFLAGS) $(CFLAGS) src/play.c -o play $(LIBS)
+
+ mktool:
+ cc -g -o mktool mktool.c
+
+-install: mktool
+- $(MKTOOL) -i -m 0755 tcpsound $(bindir)
+- $(MKTOOL) -i wavs/*.wav $(wavdir)
+- -$(MKTOOL) -i docs/man/*.1.gz $(mandir)/man1
++install: tcpsound
++ $(MKTOOL) -d $(bindir)
++ $(MKTOOL) -d $(wavdir)
++ $(MKTOOL) -d $(mandir)
++ $(MKTOOL) -m 0755 tcpsound $(bindir)
++ $(MKTOOL) -m 0644 wavs/*.wav $(wavdir)
++ -$(MKTOOL) -m 0644 docs/man/tcpsound.1.gz $(mandir)
+ @echo
+ @echo installation successful
+ uninstall: mktool
diff --git a/net-misc/tcpsound/tcpsound-0.3.1.ebuild b/net-misc/tcpsound/tcpsound-0.3.1.ebuild
index 7636235eaed5..c9c4846da2d3 100644
--- a/net-misc/tcpsound/tcpsound-0.3.1.ebuild
+++ b/net-misc/tcpsound/tcpsound-0.3.1.ebuild
@@ -1,8 +1,10 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/tcpsound/tcpsound-0.3.1.ebuild,v 1.4 2010/03/29 12:20:07 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tcpsound/tcpsound-0.3.1.ebuild,v 1.5 2010/04/09 04:52:09 jer Exp $
-inherit eutils
+EAPI="2"
+
+inherit eutils toolchain-funcs
DESCRIPTION="Play sounds in response to network traffic"
HOMEPAGE="http://www.ioplex.com/~miallen/tcpsound/"
@@ -17,13 +19,12 @@ DEPEND="net-analyzer/tcpdump
media-libs/libsdl
dev-libs/libmba"
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-asneeded.patch
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
}
src_compile() {
+ tc-export CC
sed -i -e "s;/usr/share/sounds:/usr/local/share/sounds;/usr/share/tcpsound;g"\
"${S}"/src/tcpsound.c "${S}"/elaborate.conf
@@ -34,9 +35,7 @@ src_compile() {
src_install() {
# Makefile expects /usr/bin to be there...
- dodir /usr/bin
- # einstall is required here
- einstall || die
+ emake DESTDIR="${D}" install || die
dodoc README.txt elaborate.conf
}