media-sound/litestream: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Wed, 16 Oct 2019 11:39:48 +0000 (13:39 +0200)
committerDavid Seifert <soap@gentoo.org>
Wed, 16 Oct 2019 11:39:48 +0000 (13:39 +0200)
Bug: https://bugs.gentoo.org/697274
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: David Seifert <soap@gentoo.org>
media-sound/litestream/files/litestream-1.3_rc3-fix-build-system.patch [new file with mode: 0644]
media-sound/litestream/litestream-1.3_rc3.ebuild

diff --git a/media-sound/litestream/files/litestream-1.3_rc3-fix-build-system.patch b/media-sound/litestream/files/litestream-1.3_rc3-fix-build-system.patch
new file mode 100644 (file)
index 0000000..0ef4eaa
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,32 +1,27 @@
+ # $Id: Makefile,v 1.8 2005/09/06 21:26:02 roundeye Exp $
+ INCLUDES = -Iinclude
+-AR=   ar
+-RANLIB=       sh ranlib.sh
+-CFLAGS = $(INCLUDES) -Wall -g -DVERSION="\"Litestream 1.2\""
++CFLAGS += -Wall
+-LDFLAGS = # -lnsl -lsocket
++CPPFLAGS += $(INCLUDES) -DVERSION="\"Litestream 1.2\"" -DNO_VARARGS
+ all: litestream literestream source client server 
+ .depend: $(WILDCARD *.c)
+-      $(CC) -MM $(CFLAGS) -DDEPEND *.c > .depend
++      $(CC) -MM $(CFLAGS) $(CPPFLAGS) -DDEPEND *.c > .depend
+-client: stream_cli.o stream_sched.o hexdump.o client.o stream_log.o
+-      $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
++client: stream_cli.o stream_sched.o hexdump.o stream_log.o
+-server: stream_serv.o stream_sched.o hexdump.o server.o stream_log.o
+-      $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
++server: stream_serv.o stream_sched.o hexdump.o stream_log.o
+ literestream: stream_serv.o stream_sched.o restream.o hexdump.o icy.o yp.o stream_cli.o http.o textutils.o stream_log.o
+-      $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
++      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^
+ litestream: stream_serv.o stream_sched.o stream.o hexdump.o icy.o yp.o stream_cli.o http.o textutils.o stream_log.o
+-      $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
++      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^
+-source: stream_sched.o stream_cli.o http.o stream_log.o source.o mp3.o playlist.o textutils.o
+-      $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
++source: stream_sched.o stream_cli.o http.o stream_log.o mp3.o playlist.o textutils.o
+ clean:
+       rm -f *.o source server client litestream literestream .depend *.core
index 21c19359359807ff1d372a2821dc9101031be101..e0d4d98fac8dee13e95563a5395f392626402152 100644 (file)
@@ -1,40 +1,31 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils flag-o-matic toolchain-funcs
-
-MY_P=${P/_rc/RC}
+inherit toolchain-funcs
 
 DESCRIPTION="Litstream is a lightweight and robust shoutcast-compatible streaming mp3 server"
 HOMEPAGE="http://www.litestream.org/"
-SRC_URI="http://litestream.org/litestream/${MY_P}.tar.gz"
+SRC_URI="http://litestream.org/litestream/${P/_rc/RC}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc sparc x86"
-IUSE=""
-
-S=${WORKDIR}/${MY_P}
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-       sed -i -e 's:CFLAGS = :CFLAGS = ${OPTFLAGS} :; s:-g::' \
-               Makefile || die "sed failed"
-}
+S="${WORKDIR}/${P/_rc/RC}"
+PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch )
 
-src_compile() {
-       append-flags "-DNO_VARARGS"
-       emake CC=$(tc-getCC) OPTFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
-       dobin litestream literestream || die "dobin failed"
+       dobin litestream literestream
        newbin source litestream-source
        newbin server litestream-server
        newbin client litestream-client
 
-       dodoc ABOUT ACKNOWLEDGEMENTS BUGS CHANGELOG CONTACT FILES MAKEITGO README
+       einstalldocs
+       dodoc ABOUT ACKNOWLEDGEMENTS CONTACT FILES MAKEITGO
 }