vice-2.4.22.ebuild 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils toolchain-funcs flag-o-matic games
  5. DESCRIPTION="The Versatile Commodore 8-bit Emulator"
  6. HOMEPAGE="http://vice-emu.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/vice-emu/releases/${P}.tar.gz"
  8. LICENSE="GPL-2+"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ~sparc x86"
  11. IUSE="Xaw3d alsa ethernet ffmpeg fullscreen +gtk ipv6 lame nls oss png pulseaudio sdl +sdlsound threads vte zlib"
  12. # upstream says gtk3 and sdl2 shouldn't be exposed yet.
  13. #REQUIRED_USE="?? ( gtk2 gtk3 sdl )"
  14. REQUIRED_USE="?? ( gtk sdl )"
  15. GTK_COMMON="
  16. x11-libs/pango
  17. x11-libs/cairo"
  18. # gtk3? (
  19. # x11-libs/gtk+:3
  20. # vte? ( x11-libs/vte:2.90 )
  21. # ${GTK_COMMON}
  22. # )
  23. RDEPEND="
  24. virtual/jpeg:0
  25. virtual/opengl
  26. media-libs/giflib
  27. alsa? ( media-libs/alsa-lib )
  28. pulseaudio? ( media-sound/pulseaudio )
  29. sdlsound? ( media-libs/libsdl[sound] )
  30. ethernet? (
  31. >=net-libs/libpcap-0.9.8
  32. >=net-libs/libnet-1.1.2.1:1.1
  33. )
  34. ffmpeg? ( virtual/ffmpeg )
  35. lame? ( media-sound/lame )
  36. nls? ( virtual/libintl )
  37. png? ( media-libs/libpng:0 )
  38. zlib? ( sys-libs/zlib )
  39. sdl? (
  40. media-libs/libsdl[joystick,video]
  41. )
  42. !sdl? (
  43. fullscreen? (
  44. x11-libs/libXrandr
  45. x11-libs/libXxf86vm )
  46. x11-libs/libX11
  47. x11-libs/libXext
  48. sys-libs/readline:0
  49. )
  50. gtk? (
  51. x11-libs/gtk+:2
  52. vte? ( x11-libs/vte:0 )
  53. x11-libs/gtkglext
  54. ${GTK_COMMON}
  55. )
  56. !sdl? ( !gtk? (
  57. x11-libs/libXmu
  58. x11-libs/libXpm
  59. x11-libs/libXt
  60. x11-libs/libXv
  61. Xaw3d? ( x11-libs/libXaw3d )
  62. !Xaw3d? ( x11-libs/libXaw )
  63. ) )
  64. "
  65. DEPEND="${RDEPEND}
  66. virtual/pkgconfig
  67. !sdl? (
  68. fullscreen? ( x11-proto/xf86vidmodeproto )
  69. !gtk? (
  70. x11-libs/libICE
  71. x11-libs/libSM
  72. )
  73. )
  74. x11-apps/bdftopcf
  75. x11-apps/mkfontdir
  76. x11-proto/xproto
  77. x11-proto/xextproto
  78. media-libs/fontconfig
  79. x11-proto/videoproto
  80. nls? ( sys-devel/gettext )"
  81. src_prepare() {
  82. epatch "${FILESDIR}"/${P}-autotools.patch
  83. sed -i \
  84. -e 's/building//' \
  85. doc/Makefile.am || die
  86. sed -i \
  87. -e "/^docdir =/s:=.*:=/usr/share/doc/${PF}:" \
  88. doc/Makefile.am \
  89. doc/readmes/Makefile.am || die
  90. sed -i \
  91. -e "/^docdir =/s:=.*:=/usr/share/doc/${PF}/html:" \
  92. doc/html/Makefile.am || die
  93. sed -i \
  94. -e "s:/usr/local/lib/VICE:$(games_get_libdir)/${PN}:" \
  95. man/vice.1 \
  96. $(grep -rl --exclude="*texi" /usr/local/lib doc) || die
  97. sed -i \
  98. -e "/VICEDIR=/s:=.*:=\"$(games_get_libdir)/${PN}\";:" \
  99. configure.ac || die
  100. sed -i \
  101. -e "s:\(#define LIBDIR \).*:\1\"$(games_get_libdir)/${PN}\":" \
  102. -e "s:\(#define DOCDIR \).*:\1\"/usr/share/doc/${PF}\":" \
  103. src/arch/unix/archdep.h \
  104. src/arch/sdl/archdep_unix.h || die
  105. rm -rf src/lib/{libffmpeg,liblame} || die
  106. sed -i \
  107. -e '/SUBDIRS/s/libffmpeg//;' \
  108. -e '/SUBDIRS/s/liblame//;' \
  109. src/lib/Makefile.am || die
  110. AT_NO_RECURSIVE=1 eautoreconf
  111. }
  112. src_configure() {
  113. local gui_arg snd_arg
  114. snd_arg+=" $(use_with alsa)"
  115. snd_arg+=" $(use_with oss)"
  116. snd_arg+=" $(use_with pulseaudio pulse)"
  117. snd_arg+=" $(use_with sdlsound)"
  118. gui_arg+=" $(use_enable sdl sdlui)"
  119. # The gtk UI code has raw calls to XOpenDisplay and
  120. # is missing -lX11 if vte doesn't pull it in.
  121. #if use gtk2 || use gtk3 ; then
  122. if use gtk ; then
  123. use vte || append-libs -lX11
  124. fi
  125. gui_arg+=" $(use_enable gtk gnomeui)"
  126. #gui_arg+=" $(use_enable gtk3 gnomeui3)"
  127. gui_arg+=" $(use_enable Xaw3d xaw3d)"
  128. # --with-readline is forced to avoid using the embedded copy
  129. # don't try to actually run fc-cache (bug #280976)
  130. FCCACHE=/bin/true \
  131. PKG_CONFIG=$(tc-getPKG_CONFIG) \
  132. egamesconf \
  133. --enable-parsid \
  134. --with-resid \
  135. --with-readline \
  136. --without-arts \
  137. --without-midas \
  138. $(use_enable ethernet) \
  139. $(use_enable ffmpeg) \
  140. $(use_enable ffmpeg external-ffmpeg) \
  141. $(use_enable fullscreen) \
  142. $(use_enable ipv6) \
  143. $(use_enable lame) \
  144. $(use_enable nls) \
  145. $(use_enable vte) \
  146. $(use_with png) \
  147. $(use_with threads uithreads) \
  148. $(use_with zlib) \
  149. ${gui_arg} \
  150. ${snd_arg} \
  151. --disable-option-checking
  152. # --disable-option-checking has to be last
  153. }
  154. src_install() {
  155. DOCS="AUTHORS ChangeLog FEEDBACK README" \
  156. default
  157. prepgamesdirs
  158. }