antiword-0.37-r1.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils toolchain-funcs
  5. IUSE="kde"
  6. PATCHVER="r2"
  7. DESCRIPTION="free MS Word reader"
  8. HOMEPAGE="http://www.winfield.demon.nl"
  9. SRC_URI="http://www.winfield.demon.nl/linux/${P}.tar.gz
  10. https://dev.gentoo.org/~grobian/distfiles/${PN}-gentoo-patches-${PATCHVER}.tar.bz2"
  11. SLOT="0"
  12. LICENSE="GPL-2"
  13. KEYWORDS="alpha amd64 ~arm ~hppa ppc ppc64 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  14. src_prepare() {
  15. # Makefile is a symlink to Makefile.Linux, avoid that we patch it by
  16. # accident using patch <2.7, see bug #435492
  17. rm Makefile || die
  18. EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PN}-gentoo-patches-${PATCHVER}"
  19. # Re-add convenience symlink, see above
  20. ln -s Makefile.Linux Makefile
  21. epatch "${FILESDIR}"/${P}-CVE-2014-8123.patch
  22. }
  23. src_configure() { :; }
  24. src_compile() {
  25. emake PREFIX="${EPREFIX}" OPT="${CFLAGS}" CC="$(tc-getCC)" LD="$(tc-getCC)" \
  26. LDFLAGS="${LDFLAGS}" || die "emake failed"
  27. }
  28. src_install() {
  29. emake -j1 PREFIX="${EPREFIX}" DESTDIR="${D}" global_install || die
  30. use kde || rm -f "${ED}"/usr/bin/kantiword
  31. insinto /usr/share/${PN}/examples
  32. doins Docs/testdoc.doc Docs/antiword.php || die
  33. cd Docs
  34. doman antiword.1 || die
  35. dodoc ChangeLog Exmh Emacs FAQ History Netscape QandA ReadMe Mozilla Mutt || die
  36. }