detex-2.8-r1.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils toolchain-funcs
  4. DESCRIPTION="A filter program that removes the LaTeX (or TeX) control sequences"
  5. HOMEPAGE="http://www.cs.purdue.edu/homes/trinkle/detex/"
  6. SRC_URI="http://www.cs.purdue.edu/homes/trinkle/detex/${P}.tar"
  7. LICENSE="BSD"
  8. SLOT="0"
  9. KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  10. IUSE=""
  11. DEPEND="sys-devel/flex"
  12. RDEPEND=""
  13. src_unpack() {
  14. unpack ${A}
  15. cd "${S}"
  16. epatch "${FILESDIR}/${P}-ldflags.patch"
  17. sed -i \
  18. -e "s:CFLAGS = -O \${DEFS}:CFLAGS = ${CFLAGS} \${DEFS}:" \
  19. -e 's:LEX = lex:#LEX = lex:' \
  20. -e 's:#LEX = flex:LEX = flex:' \
  21. -e 's:#DEFS += ${DEFS} -DNO_MALLOC_DECL:DEFS += -DNO_MALLOC_DECL:' \
  22. -e 's:LEXLIB = -ll:LEXLIB = -lfl:' \
  23. Makefile || die "sed failed"
  24. }
  25. src_compile() {
  26. tc-export CC
  27. emake || die "emake failed"
  28. }
  29. src_install() {
  30. dobin detex || die
  31. dodoc README
  32. doman detex.1l
  33. }