From b8194cde46d4fb966090f5291ca21d88dcfd9a46 Mon Sep 17 00:00:00 2001 From: Yuan Liao Date: Wed, 14 Dec 2022 08:27:10 -0800 Subject: [PATCH] games-emulation/dosbox-x: Update for upstream's rolling release adoption Without a clear explanation, the upstream of this package has stopped tagging releases and willy-nilly switched to "continuously built" "nightly builds" (a.k.a. prone-to-break-on-any-day binaries put for user downloads at an obscure place). To allow Gentoo users to use recent versions of this package without having to resort to the live ebuild, we have no choice other than to make new non-live ebuilds based on GitHub snapshot tarballs from now on. Signed-off-by: Yuan Liao --- .../dosbox-x/dosbox-x-2022.08.0.ebuild | 2 ++ games-emulation/dosbox-x/dosbox-x-9999.ebuild | 26 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild b/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild index 396f0023f1..473948a538 100644 --- a/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild +++ b/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild @@ -1,6 +1,8 @@ # Copyright 2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Note: This is the last release (non-pre-release) tagged by upstream + EAPI=8 inherit autotools flag-o-matic toolchain-funcs xdg diff --git a/games-emulation/dosbox-x/dosbox-x-9999.ebuild b/games-emulation/dosbox-x/dosbox-x-9999.ebuild index fba8467c01..e2738549fd 100644 --- a/games-emulation/dosbox-x/dosbox-x-9999.ebuild +++ b/games-emulation/dosbox-x/dosbox-x-9999.ebuild @@ -3,14 +3,24 @@ EAPI=8 -inherit autotools toolchain-funcs xdg +inherit autotools readme.gentoo-r1 toolchain-funcs xdg if [[ "${PV}" == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git" else - SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/dosbox-x-windows-v${PV}.tar.gz" - S="${WORKDIR}/${PN}-${PN}-windows-v${PV}" + # https://github.com/joncampbell123/dosbox-x/discussions/3862 + GIT_COMMIT="" + DOC_CONTENTS=" + DOSBox-X upstream has stopped making releases. Therefore, this + package has installed a copy of DOSBox-X built from an upstream + repository snapshot at the following Git commit:\n + \n + ${GIT_COMMIT} + " + + SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${GIT_COMMIT}" KEYWORDS="~amd64" fi @@ -126,6 +136,11 @@ src_test() { "${@}" || die "Unit tests failed" } +src_install() { + default + [[ -n "${DOC_CONTENTS}" ]] && readme.gentoo_create_doc +} + pkg_preinst() { xdg_pkg_preinst @@ -148,6 +163,11 @@ pkg_preinst() { pkg_postinst() { xdg_pkg_postinst + if ! has "${PVR}" ${REPLACING_VERSIONS} && [[ -n "${DOC_CONTENTS}" ]]; then + FORCE_PRINT_ELOG=1 + readme.gentoo_print_elog + fi + if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then elog elog "Note on the Debugger"