vbam-9999.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. WX_GTK_VER="3.0"
  5. inherit cmake-utils wxwidgets gnome2-utils fdo-mime eutils
  6. if [[ ${PV} == 9999 ]]; then
  7. EGIT_REPO_URI="https://github.com/visualboyadvance-m/visualboyadvance-m.git"
  8. inherit git-r3
  9. else
  10. SRC_URI="https://dev.gentoo.org/~radhermit/distfiles/${P}.tar.xz"
  11. KEYWORDS="~amd64 ~x86"
  12. fi
  13. DESCRIPTION="Game Boy, GBC, and GBA emulator forked from VisualBoyAdvance"
  14. HOMEPAGE="https://github.com/visualboyadvance-m/visualboyadvance-m"
  15. LICENSE="GPL-2"
  16. SLOT="0"
  17. IUSE="cairo ffmpeg gtk link lirc nls openal +sdl wxwidgets"
  18. REQUIRED_USE="|| ( sdl gtk wxwidgets )"
  19. RDEPEND=">=media-libs/libpng-1.4:0=
  20. media-libs/libsdl2[joystick]
  21. link? ( >=media-libs/libsfml-2.0:= )
  22. sys-libs/zlib
  23. virtual/glu
  24. virtual/opengl
  25. ffmpeg? ( virtual/ffmpeg[-libav] )
  26. gtk? ( >=dev-cpp/glibmm-2.4.0:2
  27. >=dev-cpp/gtkmm-2.4.0:2.4
  28. >=dev-cpp/gtkglextmm-1.2.0 )
  29. lirc? ( app-misc/lirc )
  30. nls? ( virtual/libintl )
  31. wxwidgets? (
  32. cairo? ( x11-libs/cairo )
  33. openal? ( media-libs/openal )
  34. x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
  35. )"
  36. DEPEND="${RDEPEND}
  37. wxwidgets? ( virtual/imagemagick-tools )
  38. x86? ( || ( dev-lang/nasm dev-lang/yasm ) )
  39. nls? ( sys-devel/gettext )
  40. virtual/pkgconfig"
  41. src_prepare() {
  42. default
  43. # fix desktop file QA warnings
  44. edos2unix src/gtk/gvbam.desktop src/wx/wxvbam.desktop
  45. }
  46. src_configure() {
  47. local mycmakeargs=(
  48. -DENABLE_CAIRO=$(usex cairo)
  49. -DENABLE_FFMPEG=$(usex ffmpeg)
  50. -DENABLE_GTK=$(usex gtk)
  51. -DENABLE_LINK=$(usex link)
  52. -DENABLE_LIRC=$(usex lirc)
  53. -DENABLE_NLS=$(usex nls)
  54. -DENABLE_OPENAL=$(usex openal)
  55. -DENABLE_SDL=$(usex sdl)
  56. -DENABLE_WX=$(usex wxwidgets)
  57. -DENABLE_ASM_CORE=$(usex x86)
  58. -DENABLE_ASM_SCALERS=$(usex x86)
  59. -DCMAKE_SKIP_RPATH=ON
  60. )
  61. cmake-utils_src_configure
  62. }
  63. src_compile() {
  64. cmake-utils_src_compile
  65. }
  66. src_install() {
  67. cmake-utils_src_install
  68. if use sdl ; then
  69. dodoc doc/ReadMe.SDL.txt
  70. doman src/debian/vbam.1
  71. fi
  72. use wxwidgets && doman src/debian/wxvbam.1
  73. use gtk && doman src/debian/gvbam.1
  74. }
  75. pkg_preinst() {
  76. if use gtk || use wxwidgets ; then
  77. gnome2_icon_savelist
  78. fi
  79. }
  80. pkg_postinst() {
  81. if use gtk || use wxwidgets ; then
  82. gnome2_icon_cache_update
  83. fi
  84. use gtk && fdo-mime_desktop_database_update
  85. }
  86. pkg_postrm() {
  87. if use gtk || use wxwidgets ; then
  88. gnome2_icon_cache_update
  89. fi
  90. use gtk && fdo-mime_desktop_database_update
  91. }