vtwm-5.4.7-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2010 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="one of many TWM descendants and implements a Virtual Desktop"
  6. HOMEPAGE="http://www.vtwm.org/"
  7. SRC_URI="http://www.vtwm.org/downloads/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~ppc ~sparc ~x86"
  11. IUSE="rplay"
  12. RDEPEND="x11-libs/libX11
  13. x11-libs/libXmu
  14. x11-libs/libXt
  15. x11-libs/libXext
  16. x11-libs/libXpm
  17. rplay? ( media-sound/rplay )"
  18. DEPEND="${RDEPEND}
  19. sys-devel/bison
  20. sys-devel/flex
  21. x11-misc/imake
  22. app-text/rman
  23. x11-proto/xproto
  24. x11-proto/xextproto"
  25. src_prepare() {
  26. epatch "${FILESDIR}"/${P}-do-not-rm.patch
  27. sed -i Imakefile \
  28. -e 's:-L/usr/local/lib::g' \
  29. -e 's:-I/usr/local/include::g' \
  30. || die "sed Imakefile"
  31. if ! use rplay ; then
  32. sed -i Imakefile \
  33. -e 's:^XCOMM\ \(.*NO_SOUND\):\1:' \
  34. -e 's:^\(SOUNDLIB.*\):XCOMM\ \1:' \
  35. -e 's:sound\..::g' \
  36. || die "sed Imakefile"
  37. epatch "${FILESDIR}"/${P}-NO_SOUND_SUPPORT.patch
  38. fi
  39. }
  40. src_configure() {
  41. xmkmf || die "xmkmf failed"
  42. emake depend || die "emake depend"
  43. }
  44. src_compile() {
  45. emake \
  46. CC=$(tc-getCC) \
  47. CCOPTIONS="${CFLAGS}" \
  48. EXTRA_LDOPTIONS="${LDFLAGS}" \
  49. || die "emake failed"
  50. }
  51. src_install() {
  52. emake BINDIR=/usr/bin \
  53. LIBDIR=/etc/X11 \
  54. MANPATH=/usr/share/man \
  55. DESTDIR="${D}" install || die "emake install failed"
  56. echo "#!/bin/sh" > vtwm
  57. echo "xsetroot -cursor_name left_ptr &" >> vtwm
  58. echo "/usr/bin/vtwm" >> vtwm
  59. exeinto /etc/X11/Sessions
  60. doexe vtwm || die
  61. dodoc doc/{4.7.*,CHANGELOG,BUGS,DEVELOPERS,HISTORY,SOUND,WISHLIST} || die
  62. }