-# 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 toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="A filter program that removes the LaTeX (or TeX) control sequences"
-HOMEPAGE="http://www.cs.purdue.edu/homes/trinkle/detex/"
-SRC_URI="http://www.cs.purdue.edu/homes/trinkle/detex/${P}.tar"
+HOMEPAGE="https://www.cs.purdue.edu/homes/trinkle/detex/index-legacy.html"
+SRC_URI="https://www.cs.purdue.edu/homes/trinkle/detex/${P}.tar"
LICENSE="BSD"
SLOT="0"
DEPEND="sys-devel/flex"
RDEPEND=""
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${P}-ldflags.patch"
+PATCHES=( "${FILESDIR}/${P}-ldflags.patch" )
+
+src_prepare() {
sed -i \
-e "s:CFLAGS = -O \${DEFS}:CFLAGS = ${CFLAGS} \${DEFS}:" \
-e 's:LEX = lex:#LEX = lex:' \
-e 's:#LEX = flex:LEX = flex:' \
-e 's:#DEFS += ${DEFS} -DNO_MALLOC_DECL:DEFS += -DNO_MALLOC_DECL:' \
-e 's:LEXLIB = -ll:LEXLIB = -lfl:' \
- Makefile || die "sed failed"
+ Makefile || die "Fixing Makefile failed"
+ default
}
src_compile() {
tc-export CC
- emake || die "emake failed"
+ emake
}
src_install() {
- dobin detex || die
+ dobin detex
dodoc README
doman detex.1l
}
Index: detex-2.8/Makefile
===================================================================
---- detex-2.8.orig/Makefile
-+++ detex-2.8/Makefile
+--- a/Makefile
++++ b/Makefile
@@ -104,7 +104,7 @@ D_OBJ = detex.o
all: ${PROGS}