firefox-musl-bin-87.0-r1.ebuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Copyright 2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. MY_PV=${PVR/r/}
  5. MY_PN=${PN%%-musl-bin}
  6. HARDENED_PV='1.0'
  7. PRIVACY="https://github.com/kiss-community/repo-main/raw/master/extra/firefox-privacy"
  8. DESCRIPTION="Firefox binary from KISS linux (for musl libc)"
  9. HOMEPAGE="
  10. https://github.com/kiss-community/repo-bin
  11. https://github.com/kiss-community/repo-main/tree/master/extra/firefox
  12. "
  13. SRC_URI="
  14. https://github.com/kiss-community/repo-bin/releases/download/ff-${PV}/${MY_PN}@${MY_PV}.tar.gz
  15. -> ${P}.tar.gz
  16. hardened? (
  17. ${PRIVACY}/files/policies-${HARDENED_PV}.json
  18. -> ${PN}.policies-${HARDENED_PV}.json
  19. ${PRIVACY}/files/vendor-${HARDENED_PV}.js
  20. -> ${PN}.vendor-${HARDENED_PV}.js
  21. )
  22. "
  23. IUSE="elibc_musl +hardened"
  24. LICENSE="MIT MPL-2.0 GPL-2 LGPL-2.1"
  25. SLOT="0"
  26. KEYWORDS="amd64"
  27. RESTRICT="strip"
  28. RDEPEND="
  29. dev-libs/atk
  30. >=dev-libs/glib-2.26:2
  31. >=dev-libs/libffi-3.0.10:=
  32. >=dev-libs/nspr-4.29
  33. >=dev-libs/nss-3.62
  34. media-libs/alsa-lib
  35. media-libs/fontconfig
  36. >=media-libs/freetype-2.4.10
  37. >=media-libs/harfbuzz-2.6.8:0=
  38. >=media-libs/libpng-1.6.35:0=[apng]
  39. sys-devel/gcc:10=
  40. ~sys-libs/musl-1.2.2
  41. >=sys-libs/zlib-1.2.3
  42. >=x11-libs/cairo-1.10[X]
  43. x11-libs/gdk-pixbuf
  44. >=x11-libs/gtk+-3.4.0:3
  45. x11-libs/libX11
  46. x11-libs/libXcomposite
  47. x11-libs/libXcursor
  48. x11-libs/libXdamage
  49. x11-libs/libXext
  50. x11-libs/libXfixes
  51. x11-libs/libXi
  52. x11-libs/libXrender
  53. x11-libs/libXt
  54. x11-libs/libxcb
  55. >=x11-libs/pango-1.22.0
  56. >=x11-libs/pixman-0.19.2
  57. dev-libs/expat
  58. virtual/freedesktop-icon-theme
  59. media-video/ffmpeg
  60. >=media-libs/libjpeg-turbo-1.2.1
  61. >=media-libs/libvpx-1.8.2:0=[postproc]
  62. >=media-libs/mesa-10.2:*
  63. >=media-libs/dav1d-0.8.1:=
  64. >=media-libs/libaom-1.0.0:=
  65. "
  66. DEPEND="
  67. !www-client/firefox
  68. ${RDEPEND}
  69. "
  70. src_unpack() {
  71. mkdir -- "${P}" && cd -- "${P}" || die 'failed to prepare unpack dir'
  72. default
  73. }
  74. src_install() {
  75. dosym "../lib/${MY_PN}/${MY_PN}" "/usr/bin/${MY_PN}"
  76. rm -- "./usr/lib/${MY_PN}/${PN/-musl/}" || die
  77. mv -- ./usr/lib "${ED}/usr/" || die
  78. use hardened && {
  79. insinto "/usr/lib/${MY_PN}/browser/defaults/preferences"
  80. newins "${DISTDIR}/${PN}.vendor-${HARDENED_PV}.js" vendor.js
  81. insinto "/usr/lib/${MY_PN}/distribution"
  82. newins "${DISTDIR}/${PN}.policies-${HARDENED_PV}.json" policies.json
  83. }
  84. }