xscrabble-2.10-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib games
  5. DESCRIPTION="An X11 clone of the well-known Scrabble"
  6. HOMEPAGE="http://freshmeat.net/projects/xscrabble/?topic_id=80"
  7. SRC_URI="ftp://ftp.ac-grenoble.fr/ge/educational_games/${P}.tgz
  8. l10n_fr? ( ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_fr.tgz )
  9. ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_en.tgz"
  10. LICENSE="GPL-2+"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE="l10n_fr"
  14. RDEPEND="x11-libs/libXaw
  15. x11-libs/libXp"
  16. DEPEND="${RDEPEND}
  17. x11-misc/gccmakedep
  18. x11-misc/imake"
  19. src_unpack() {
  20. unpack ${P}.tgz
  21. cp "${DISTDIR}"/xscrabble_en.tgz .
  22. use l10n_fr && cp "${DISTDIR}"/xscrabble_fr.tgz .
  23. }
  24. src_prepare() {
  25. epatch "${FILESDIR}"/${P}-path-fixes.patch \
  26. "${FILESDIR}"/${P}-build.patch
  27. sed -i '/install/s/-s //' build || die "sed failed"
  28. }
  29. src_compile() {
  30. ./build bin || die "build failed"
  31. }
  32. src_install() {
  33. local f
  34. export DESTDIR="${D}" LIBDIR="$(get_libdir)"
  35. ./build install || die "install failed"
  36. if use l10n_fr ; then
  37. ./build lang fr || die "fr failed"
  38. fi
  39. ./build lang en || die "en failed"
  40. for f in "${D}"/usr/"${LIBDIR}"/X11/app-defaults/* ; do
  41. [[ -L ${f} ]] && continue
  42. sed -i \
  43. -e "s:/usr/games/lib/scrabble/:${GAMES_DATADIR}/${PN}/:" \
  44. -e "s:fr/eng:fr/en:" \
  45. ${f} || die "sed ${f} failed"
  46. done
  47. dodoc CHANGES README
  48. prepgamesdirs
  49. }