media-video/subtitler-yuv: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Fri, 13 Dec 2019 13:20:46 +0000 (14:20 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 13 Dec 2019 13:20:46 +0000 (14:20 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
media-video/subtitler-yuv/files/subtitler-yuv-0.6.5-fix-build-system.patch [new file with mode: 0644]
media-video/subtitler-yuv/subtitler-yuv-0.6.5.ebuild

diff --git a/media-video/subtitler-yuv/files/subtitler-yuv-0.6.5-fix-build-system.patch b/media-video/subtitler-yuv/files/subtitler-yuv-0.6.5-fix-build-system.patch
new file mode 100644 (file)
index 0000000..da5ec86
--- /dev/null
@@ -0,0 +1,55 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,28 +1,7 @@
+ #need -O2 for io in beep.c
+-CFLAGS = -O2 -Wall
+-
+-#CC = gcc
+-#CC=/usr/local/bin/gcc
+-
+-SRC1 = \
+-subtitler-yuv.c \
+-color_processor.c \
+-frame_list.c \
+-load_font.c \
+-load_pictures.c \
+-load_ppml_file.c \
+-object_list.c \
+-parser.c \
+-text_processing.c \
+-external_programs.c \
+-x11.c
+-
+-SRC2 = \
+-process_wave.c
+-
++CFLAGS += -Wall
+ OBJECT1 = \
+-subtitler-yuv.o \
+ color_processor.o \
+ frame_list.o \
+ load_font.o \
+@@ -34,20 +13,11 @@
+ external_programs.o \
+ x11.o
+-OBJECT2 = \
+-process_wave.o
+-
+-LIBRARY1 = -lm -lXt -lXpm -lXaw
+-LIBRARY2 =
++LDLIBS = -lm -lXt -lX11 -lXaw
+ #$(XLIB) $(XAWLIB) $(XTOOLLIB) $(XLIB)
+-all:
+-      gcc $(CFLAGS) -c $(SRC1)
+-      gcc $(CFLAGS) -c $(SRC2)
+-
+-      gcc -o subtitler-yuv  -L/usr/X11R6/lib/ $(OBJECT1) $(LIBRARY1)
+-      gcc -o process_wave  -L/usr/X11R6/lib/ $(OBJECT2) $(LIBRARY2)
++subtitler-yuv: $(OBJECT1)
+ # DEPENDENCIES
index d1e7738874fe8bf615181a663c5455366cf1a45e..37e21cbb86a241a37909c1a4a928842931a0ebfc 100644 (file)
@@ -1,41 +1,35 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
+
 inherit toolchain-funcs
 
-DESCRIPTION="for mjpegtools for adding subtitles, pictures, and effects embedded in the picture"
+DESCRIPTION="for mjpegtools for adding subtitles, pictures & effects embedded in the picture"
 HOMEPAGE="http://panteltje.com/panteltje/subtitles/"
 SRC_URI="mirror://gentoo/${P}.tgz"
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
 
-RDEPEND="x11-libs/libX11
+RDEPEND="
+       x11-libs/libX11
        x11-libs/libXaw
        x11-libs/libXt"
 DEPEND="${RDEPEND}"
 
-src_prepare() {
-       sed -i \
-               -e '/^CFLAGS/s:= -O2:+=:' \
-               -e '/CFLAGS/s:gcc:$(CC):' \
-               -e 's:gcc -o:$(CC) $(LDFLAGS) -o:' \
-               -e 's:-L/usr/X11R6/lib/::' \
-               -e 's:-lXpm:-lX11:' \
-               Makefile || die
-}
+PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch )
 
-src_compile() {
+src_configure() {
        tc-export CC
-       emake
 }
 
 src_install() {
        dobin ${PN}
-       dodoc CHANGES HOWTO_USE_THIS README*
+       einstalldocs
+       dodoc HOWTO_USE_THIS
+
        insinto /usr/share/${PN}
        doins *.{ppm,ppml,zip}
 }