logo

overlay

My (experimental) gentoo overlay

doki-doki-litterature-club-1.1.0.ebuild (1819B)


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