logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

lightspark-0.8.3.ebuild (2527B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit cmake toolchain-funcs xdg-utils
  5. DESCRIPTION="High performance flash player"
  6. HOMEPAGE="https://lightspark.github.io/"
  7. SRC_URI="https://github.com/lightspark/lightspark/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="LGPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="cpu_flags_x86_sse2 curl ffmpeg gles2-only nsplugin ppapi profile rtmp"
  12. # Note: no LLVM since it's broken upstream
  13. RDEPEND="app-arch/xz-utils:0=
  14. dev-cpp/glibmm:2=
  15. dev-libs/glib:2=
  16. dev-libs/libpcre:3=[cxx]
  17. media-fonts/liberation-fonts
  18. media-libs/freetype:2=
  19. media-libs/libpng:0=
  20. media-libs/libsdl2:0=
  21. media-libs/sdl2-mixer:0=
  22. sys-libs/zlib:0=
  23. x11-libs/cairo:0=
  24. x11-libs/libX11:0=
  25. x11-libs/pango:0=
  26. virtual/jpeg:0=
  27. curl? ( net-misc/curl:0= )
  28. ffmpeg? ( media-video/ffmpeg:0= )
  29. gles2-only? ( media-libs/mesa:0=[gles2] )
  30. !gles2-only? (
  31. >=media-libs/glew-1.5.3:0=
  32. virtual/opengl:0=
  33. )
  34. rtmp? ( media-video/rtmpdump:0= )"
  35. DEPEND="${RDEPEND}
  36. amd64? ( dev-lang/nasm )
  37. x86? ( dev-lang/nasm )
  38. virtual/pkgconfig"
  39. S=${WORKDIR}/${P/_rc*/}
  40. src_configure() {
  41. local mycmakeargs=(
  42. -DENABLE_CURL=$(usex curl)
  43. -DENABLE_GLES2=$(usex gles2-only)
  44. -DENABLE_LIBAVCODEC=$(usex ffmpeg)
  45. -DENABLE_RTMP=$(usex rtmp)
  46. -DENABLE_MEMORY_USAGE_PROFILING=$(usex profile)
  47. -DENABLE_PROFILING=$(usex profile)
  48. -DENABLE_SSE2=$(usex cpu_flags_x86_sse2)
  49. -DCOMPILE_NPAPI_PLUGIN=$(usex nsplugin)
  50. -DPLUGIN_DIRECTORY="${EPREFIX}"/usr/$(get_libdir)/${PN}/plugins
  51. # TODO: install /etc/chromium file? block adobe-flash?
  52. -DCOMPILE_PPAPI_PLUGIN=$(usex ppapi)
  53. -DPPAPI_PLUGIN_DIRECTORY="${EPREFIX}"/usr/$(get_libdir)/chromium-browser/${PN}
  54. )
  55. cmake_src_configure
  56. }
  57. src_install() {
  58. cmake_src_install
  59. if use nsplugin; then
  60. # copied from nsplugins.eclass, that's broken in EAPI 7
  61. dodir /usr/$(get_libdir)/nsbrowser/plugins
  62. dosym ../../lightspark/plugins/liblightsparkplugin.so \
  63. /usr/$(get_libdir)/nsbrowser/plugins/liblightsparkplugin.so
  64. fi
  65. }
  66. pkg_postinst() {
  67. xdg_icon_cache_update
  68. xdg_desktop_database_update
  69. if use nsplugin && has_version "www-plugins/gnash[nsplugin]"; then
  70. elog "Having two plugins installed for the same MIME type may confuse"
  71. elog "Mozilla based browsers. It is recommended to disable the nsplugin"
  72. elog "USE flag for either gnash or lightspark. For details, see"
  73. elog "https://bugzilla.mozilla.org/show_bug.cgi?id=581848"
  74. fi
  75. }
  76. pkg_postrm() {
  77. xdg_icon_cache_update
  78. xdg_desktop_database_update
  79. }