ted-2.23.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="X-based rich text editor"
  6. HOMEPAGE="http://www.nllgg.nl/Ted"
  7. SRC_URI="ftp://ftp.nluug.nl/pub/editors/ted/${P}.src.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc sparc x86"
  11. RDEPEND="x11-libs/gtk+:2
  12. media-libs/tiff:=
  13. virtual/jpeg:=
  14. media-libs/libpng:=
  15. x11-libs/libXft
  16. x11-libs/libXpm"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig"
  19. S="${WORKDIR}/Ted-${PV}"
  20. src_prepare() {
  21. epatch "${FILESDIR}"/${P}-make.patch \
  22. "${FILESDIR}"/${P}-freetype261.patch
  23. sed -i -e 's|/Ted/|/share/Ted/|' \
  24. "${S}"/appFrame/appFrameConfig.h.in \
  25. "${S}"/Ted/tedConfig.h.in || die
  26. # bug #461256
  27. find . -name makefile.in -exec sed -i -e '/ar r/s/ar/$(AR)/' {} \; || die
  28. # force to build dynamic binary, do not strip it
  29. sed -i \
  30. -e 's/.static//g' \
  31. -e '/strip/d' \
  32. tedPackage/makefile.in || die 'sed failed on tedPackage/makefile.in'
  33. # Fix build with freetype-2.5
  34. sed -i "s|^\(#[ \t]*include[ \t]*<\)freetype/|\1|" appFrame/appFontConfig.c || die
  35. mkdir lib || die
  36. }
  37. src_configure() {
  38. tc-export AR CC RANLIB
  39. local dir
  40. for dir in appFrame appUtil bitmap docBuf ind Ted tedPackage; do
  41. cd "${S}"/${dir}
  42. econf --cache-file=../config.cache || die "configure in ${dir} failed"
  43. done
  44. }
  45. src_compile() {
  46. emake package.shared
  47. }
  48. src_install() {
  49. default
  50. dosym /usr/share/Ted/examples/rtf2pdf.sh /usr/bin/rtf2pdf.sh
  51. }