vice-2.4.27-r2.ebuild 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils toolchain-funcs flag-o-matic
  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. PATCHES=(
  82. "${FILESDIR}"/${P}-autotools.patch
  83. )
  84. #"${FILESDIR}"/vice_rath.txt
  85. src_prepare() {
  86. if use ffmpeg && has_version ">=media-video/ffmpeg-3" ; then
  87. PATCHES+=(
  88. "${FILESDIR}"/${PN}-31580-ffmpeg-build.patch
  89. )
  90. fi
  91. default
  92. sed -i \
  93. -e 's/building//' \
  94. doc/Makefile.am || die
  95. sed -i \
  96. -e "/^docdir =/s:=.*:=/usr/share/doc/${PF}:" \
  97. doc/Makefile.am \
  98. doc/readmes/Makefile.am || die
  99. sed -i \
  100. -e "/^docdir =/s:=.*:=/usr/share/doc/${PF}/html:" \
  101. doc/html/Makefile.am || die
  102. sed -i \
  103. -e "s:/usr/local/lib/VICE:/usr/$(get_libdir)/${PN}:" \
  104. man/vice.1 \
  105. $(grep -rl --exclude="*texi" /usr/local/lib doc) || die
  106. sed -i \
  107. -e "/VICEDIR=/s:=.*:=\"/usr/$(get_libdir)/${PN}\";:" \
  108. configure.ac || die
  109. sed -i \
  110. -e "s:\(#define LIBDIR \).*:\1\"/usr/$(get_libdir)/${PN}\":" \
  111. -e "s:\(#define DOCDIR \).*:\1\"/usr/share/doc/${PF}\":" \
  112. src/arch/unix/archdep.h \
  113. src/arch/sdl/archdep_unix.h || die
  114. rm -rf src/lib/{libffmpeg,liblame} || die
  115. sed -i \
  116. -e '/SUBDIRS/s/libffmpeg//;' \
  117. -e '/SUBDIRS/s/liblame//;' \
  118. src/lib/Makefile.am || die
  119. AT_NO_RECURSIVE=1 eautoreconf
  120. }
  121. src_configure() {
  122. local gui_arg snd_arg
  123. snd_arg+=" $(use_with alsa)"
  124. snd_arg+=" $(use_with oss)"
  125. snd_arg+=" $(use_with pulseaudio pulse)"
  126. snd_arg+=" $(use_with sdlsound)"
  127. gui_arg+=" $(use_enable sdl sdlui)"
  128. # The gtk UI code has raw calls to XOpenDisplay and
  129. # is missing -lX11 if vte doesn't pull it in.
  130. #if use gtk2 || use gtk3 ; then
  131. if use gtk ; then
  132. use vte || append-libs -lX11
  133. fi
  134. gui_arg+=" $(use_enable gtk gnomeui)"
  135. #gui_arg+=" $(use_enable gtk3 gnomeui3)"
  136. gui_arg+=" $(use_enable Xaw3d xaw3d)"
  137. # --with-readline is forced to avoid using the embedded copy
  138. # don't try to actually run fc-cache (bug #280976)
  139. FCCACHE=/bin/true \
  140. PKG_CONFIG=$(tc-getPKG_CONFIG) \
  141. econf \
  142. --enable-parsid \
  143. --with-resid \
  144. --with-readline \
  145. --without-arts \
  146. --without-midas \
  147. $(use_enable ethernet) \
  148. $(use_enable ffmpeg) \
  149. $(use_enable ffmpeg external-ffmpeg) \
  150. $(use_enable fullscreen) \
  151. $(use_enable ipv6) \
  152. $(use_enable lame) \
  153. $(use_enable nls) \
  154. $(use_enable vte) \
  155. $(use_with png) \
  156. $(use_with threads uithreads) \
  157. $(use_with zlib) \
  158. ${gui_arg} \
  159. ${snd_arg} \
  160. --disable-option-checking
  161. # --disable-option-checking has to be last
  162. }
  163. src_install() {
  164. DOCS="FEEDBACK"
  165. default
  166. }