logo

overlay

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

doki-doki-litterature-club-1.1.1.ebuild (1941B)


  1. # Copyright 1999-2018 Gentoo Authors
  2. # Copyright 2018-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  3. # Distributed under the terms of the GNU General Public License v2
  4. # Copied from katawa-shoujo-1.3.1.ebuild
  5. EAPI=5
  6. inherit eutils gnome2-utils
  7. DESCRIPTION="Psychological horror game presented as a romance visual novel"
  8. HOMEPAGE="https://ddlc.moe/"
  9. SRC_URI="${P}.zip"
  10. RESTRICT="bindist fetch"
  11. # bundled renpy includes licenses of all libraries
  12. LICENSE="all-rights-reserved
  13. !system-renpy? ( MIT PSF-2 LGPL-2.1 || ( FTL GPL-2+ ) IJG libpng ZLIB BZIP2 )"
  14. SLOT="0"
  15. KEYWORDS="~amd64 ~x86"
  16. IUSE="doc +system-renpy"
  17. # app-arch/unzip for SRC_URI
  18. DEPEND="app-arch/unzip"
  19. RDEPEND="system-renpy? ( games-engines/renpy )"
  20. REQUIRED_USE="!system-renpy? ( || ( amd64 x86 ) )"
  21. # Binaries are built extremely weirdly, resulting in errors like:
  22. # BFD: Not enough room for program headers, try linking with -N
  23. #
  24. # Technically, we could make this unconditional because there are no other
  25. # binaries, but it's still good practice.
  26. RESTRICT="!system-renpy? ( strip )"
  27. QA_PREBUILT="/opt/${PN}/lib/*"
  28. S="${WORKDIR}/DDLC-${PV}-pc"
  29. pkg_nofetch() {
  30. einfo "Please download “DDLC (Windows) version ${PV}” on ${HOMEPAGE}"
  31. einfo "and save it as ${DISTDIR}/${SRC_URI}"
  32. }
  33. src_install() {
  34. if use system-renpy; then
  35. insinto "/usr/share/${PN}"
  36. doins -r game/.
  37. make_wrapper ${PN} "renpy '/usr/share/${PN}'"
  38. else
  39. insinto "/opt/${PN}"
  40. doins -r game localizations renpy "DDLC."{py,sh}
  41. local host="${CTARGET:-${CHOST}}"
  42. local arch="${host%%-*}"
  43. cd lib
  44. insinto "/opt/${PN}/lib"
  45. doins -r linux-${arch} pythonlib2.7
  46. cd ..
  47. fperms +x "/opt/${PN}/lib/linux-${arch}/"{python,"DDLC"} \
  48. "/opt/${PN}/DDLC."{py,sh}
  49. make_wrapper ${PN} "./DDLC.sh" "/opt/${PN}"
  50. fi
  51. make_desktop_entry ${PN} "DDLC"
  52. }
  53. pkg_preinst() {
  54. gnome2_icon_savelist
  55. }
  56. pkg_postinst() {
  57. gnome2_icon_cache_update
  58. }
  59. pkg_postrm() {
  60. gnome2_icon_cache_update
  61. }