# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RENPY_OVERRIDE_TITLE="Ad Nauseam - The Wrong Side"

inherit renpy

DESCRIPTION="Did you wake up on the wrong side?"
HOMEPAGE="https://throwpup.itch.io/throwup-club"
SRC_URI="
	AdNauseam-${PV}-pc.zip
	r18? ( AdNauseam-adult-patch.zip )
"
S="${WORKDIR}/AdNauseam-${PV}-pc/"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+r18"
RESTRICT="bindist fetch"

BDEPEND="app-arch/unzip"

src_prepare() {
	renpy_src_prepare

	# unused, causes compilation failure
	rm "game/Disc -/zoom_vp_examples.rpy" || die "rm failed"

	if use r18; then
		cp -r "${WORKDIR}/Adult Patch" game/ || die "cp failed"
	fi
}

pkg_postinst() {
	einfo "Please do not go digging around in the source code of Ad Nauseam!"
	einfo "This ebuild installs games in their bare, un-archived layout for"
	einfo "portability reasons, however due to the nature of Ad Nauseam there may"
	einfo "be secrets in the game which have not yet been discovered. To avoid"
	einfo "spoiling the experience, Throwpup requests that you do not dig around"
	einfo "in the renpy scripts."
}