logo

overlay

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

renpy-8.0.3-r1.ebuild (2614B)


  1. # Copyright 1999-2022 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{8,9,10} )
  5. DISTUTILS_SINGLE_IMPL=1
  6. DISTUTILS_USE_PEP517=setuptools
  7. inherit gnome2-utils distutils-r1
  8. DESCRIPTION="Visual novel engine written in python"
  9. HOMEPAGE="https://www.renpy.org"
  10. SRC_URI="https://www.renpy.org/dl/${PV}/${P}-source.tar.bz2"
  11. S="${WORKDIR}/${P}-source"
  12. LICENSE="MIT"
  13. SLOT=0
  14. KEYWORDS="~amd64"
  15. IUSE="development doc examples"
  16. REQUIRED_USE="examples? ( development )"
  17. BDEPEND="
  18. $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]')
  19. virtual/pkgconfig"
  20. DEPEND="
  21. dev-libs/fribidi
  22. $(python_gen_cond_dep '
  23. '~dev-python/pygame_sdl2-${PV}'[${PYTHON_USEDEP}]
  24. >=dev-lang/python-exec-0.3[${PYTHON_USEDEP}]
  25. ')
  26. media-libs/glew:0
  27. media-libs/libpng:0
  28. media-libs/libsdl2[video]
  29. media-libs/freetype:2
  30. sys-libs/zlib
  31. media-video/ffmpeg"
  32. RDEPEND="${DEPEND}
  33. !app-eselect/eselect-renpy"
  34. PATCHES=(
  35. "${FILESDIR}/${P}-system-path.patch"
  36. "${FILESDIR}/renpy-6.99.12.4-compat-style.patch"
  37. "${FILESDIR}/renpy-6.99.12.4-compat-infinite-loop.patch"
  38. "${FILESDIR}/${P}-use-system-fribidi.patch"
  39. "${FILESDIR}/renpy-8.0.3-ignore_rpyc_errors.patch"
  40. )
  41. python_prepare_all() {
  42. einfo "Deleting precompiled python files"
  43. find . -name '*.py[co]' -print -delete || die
  44. rm -r module/fribidi-src || die
  45. export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)"
  46. distutils-r1_python_prepare_all
  47. }
  48. python_compile() {
  49. cd "${S}"/module || die
  50. distutils-r1_python_compile
  51. }
  52. python_install() {
  53. cd "${S}"/module || die
  54. distutils-r1_python_install
  55. cd "${S}" || die
  56. python_newscript renpy.py ${PN}
  57. python_domodule renpy
  58. if use development ; then
  59. python_domodule launcher
  60. fi
  61. if use examples ; then
  62. python_domodule the_question tutorial
  63. fi
  64. }
  65. python_install_all() {
  66. distutils-r1_python_install_all
  67. if use development; then
  68. newicon -s 32 launcher/game/images/logo32.png ${P}.png
  69. make_desktop_entry ${PN} "Ren'Py ${PV}" ${P}
  70. fi
  71. if use doc; then
  72. insinto "/usr/share/doc/${PF}/html"
  73. doins -r doc/*
  74. fi
  75. newman "${FILESDIR}/${PN}.1" "${P}.1"
  76. }
  77. pkg_preinst() {
  78. use development && gnome2_icon_savelist
  79. }
  80. pkg_postinst() {
  81. use development && gnome2_icon_cache_update
  82. local v
  83. for v in ${REPLACING_VERSIONS}; do
  84. ver_test "${v}" -ge 7 && continue
  85. einfo "Starting from ${PN}-7 slots are dropped."
  86. einfo "RenPy natively supports compatibility with games made for older versions."
  87. einfo "Report bugs upstream on such problems, usually they are easy to fix."
  88. break
  89. done
  90. }
  91. pkg_postrm() {
  92. use development && gnome2_icon_cache_update
  93. }