From e42360c78612894b77e89e6cf5734a816c85ec3f Mon Sep 17 00:00:00 2001 From: Matoro Mahri Date: Tue, 16 Dec 2025 16:38:22 -0500 Subject: [PATCH] app-emulation/hercules-sdl: add 4.9.1 Signed-off-by: Matoro Mahri Part-of: https://github.com/gentoo/gentoo/pull/45052 Closes: https://github.com/gentoo/gentoo/pull/45052 Signed-off-by: Sam James --- app-emulation/hercules-sdl/Manifest | 1 + .../hercules-sdl/files/gen_hashes.sh | 2 +- .../hercules-sdl/hercules-sdl-4.9.1.ebuild | 93 +++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 app-emulation/hercules-sdl/hercules-sdl-4.9.1.ebuild diff --git a/app-emulation/hercules-sdl/Manifest b/app-emulation/hercules-sdl/Manifest index 069d6437ca08..0ecfb7a96289 100644 --- a/app-emulation/hercules-sdl/Manifest +++ b/app-emulation/hercules-sdl/Manifest @@ -1,3 +1,4 @@ DIST hercules-sdl-4.7.tar.gz 25439384 BLAKE2B 78a8d2df947c80e23d0e956a25a4f009dd32b09f2834cc06373f685badf9f1e657bf0f4e4408c7085371c46085718998076f3a6063caf80c9161b1fa7caa91eb SHA512 9d7060c4e2687358b9547b59b47362d642cbf2bf009085fdd41e485170d0f81029ee3d04d12b905a3a266cd26a9087e92c231c3f4600c32a8535a6140656b7b0 DIST hercules-sdl-4.8.tar.gz 29051256 BLAKE2B 70a8554a1796fab2860f137bc16c8f2d75ff9079e9d699e49552f31edfadabfcbd361b2d594bf92756f9b100c96178ee650f9a6c84507ec1472a0cbfd4389aef SHA512 3ce7fcab4ce1c003a1c42ebdd089452feb0d950851cf126d08e33a1b4201e1ae7f6e3572a2505f1a684377f9e4e8f1e1e932fe5c17498477d0946ad7cb8c4957 +DIST hercules-sdl-4.9.1.tar.gz 32229239 BLAKE2B 5e85e464277af69236fd7b6e55b67a88afb27eb40d79317b3ee8e90a1f8f2b1b4aba483a60bae9e315997f056877cc00183cc48bdd1908360f2c99a19eb3bc61 SHA512 eaf5bfc1daa9ba15b082b2a599d045e41d0905d22cb3d0ad73fe1a653bda665a4d439088bf1294ffaa9f38c4fdc45f79e6beb0b09a769cc72bfe3e29bc261c29 DIST hercules-sdl-4.9.tar.gz 32216669 BLAKE2B 0c1f4117f57a3322a6ff7f8261c2d3f428a65e487feb12170dfd8a8e15223f0f9461dc84c658d4835e01e108a101f6dcf548de52679c88e35ad690fb12a45810 SHA512 2ba95cd0b6c70460d7849fb664dddf85132da2a9c205b211cbd0d5f6c45cf08e9f06941ef63ffd85bc828aa41790e8f5ceda1d8321c8fb71a8ee4e47b6952545 diff --git a/app-emulation/hercules-sdl/files/gen_hashes.sh b/app-emulation/hercules-sdl/files/gen_hashes.sh index bb499392a4a5..dee50ea3cb0e 100644 --- a/app-emulation/hercules-sdl/files/gen_hashes.sh +++ b/app-emulation/hercules-sdl/files/gen_hashes.sh @@ -11,7 +11,7 @@ done VERSIONARR=( ${1//./ }) VERSIONTAG="Release_${VERSIONARR[0]}.${VERSIONARR[1]}" -[[ "${VERSIONARR[2]}" == "0" ]] || VERSIONTAG=".${VERSIONARR[2]}" +[[ "${VERSIONARR[2]}" == "0" ]] || VERSIONTAG+=".${VERSIONARR[2]}" RELEASEDATE="$(git -C "${CLONEDIR}/hyperion" show -s --format="%ci" "${VERSIONTAG}")" echo diff --git a/app-emulation/hercules-sdl/hercules-sdl-4.9.1.ebuild b/app-emulation/hercules-sdl/hercules-sdl-4.9.1.ebuild new file mode 100644 index 000000000000..03e12f04499a --- /dev/null +++ b/app-emulation/hercules-sdl/hercules-sdl-4.9.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools fcaps + +DESCRIPTION="The SoftDevLabs (SDL) version of the Hercules 4.x Hyperion Emulator" +HOMEPAGE="https://sdl-hercules-390.github.io/html/" +SRC_URI="https://github.com/SDL-Hercules-390/hyperion/archive/refs/tags/Release_${PV/.0/}.tar.gz -> ${P/.0/}.tar.gz" + +S="${WORKDIR}/hyperion-Release_${PV/.0/}" +LICENSE="QPL-1.0" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" +# In theory USE=object-rexx and USE=regina-rexx are not mutually-exclusive. +# In practice they functionally are as the Gentoo packages conflict, and +# additionally Hercules only supports calling out to one of them at runtime, +# controlled by the HREXX_PACKAGE environment variable. +IUSE="bzip2 debug object-rexx regina-rexx test" +RESTRICT="!test? ( test )" +FILECAPS=( + -M 755 cap_sys_nice\=eip usr/bin/hercules -- + -M 755 cap_sys_nice\=eip usr/bin/herclin -- + -M 755 cap_net_admin+ep usr/bin/hercifc +) + +COMMON_DEPEND=" + dev-libs/libltdl + net-libs/libnsl:0 + virtual/zlib:= + bzip2? ( app-arch/bzip2 ) + object-rexx? ( dev-lang/oorexx ) + regina-rexx? ( dev-lang/regina-rexx )" +RDEPEND=" + !app-emulation/hercules + !app-arch/tapeutils + ${COMMON_DEPEND}" +DEPEND=" + ${COMMON_DEPEND} + ~app-emulation/hercules-sdl-crypto-${PV} + ~app-emulation/hercules-sdl-decnumber-${PV} + ~app-emulation/hercules-sdl-softfloat-${PV} + ~app-emulation/hercules-sdl-telnet-${PV}" +# Neither package support needs to be compiled-in for tests, +# but the "rexx" command needs to be available +BDEPEND="test? ( || ( dev-lang/regina-rexx dev-lang/oorexx ) )" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.1-htmldir.patch" +) + +src_prepare() { + rm -rf crypto decNumber SoftFloat telnet || die + sed -i 's#}${hc_cv_pkg_lib_subdir}#}#g' configure.ac || die + sed -i 's#_pkgname}${hc_cv_pkg_lib_suffix}#_pkgname}#g' configure.ac || die + default + eautoreconf +} + +src_configure() { + local -x ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress=$(usex bzip2) + local confopts=( + $(use_enable bzip2 cckd-bzip2) + $(use_enable bzip2 het-bzip2) + $(use_enable object-rexx) + $(use_enable regina-rexx) + $(use_enable debug) + --enable-custom="Gentoo ${PF}.ebuild" + --disable-optimization + --disable-setuid-hercifc + --disable-capabilities + --enable-ipv6 + --enable-enhanced-configincludes + --disable-fthreads + --enable-shared + --enable-automatic-operator + --enable-extpkgs="${SYSROOT}/usr/$(get_libdir)/${PN}" + ) + + econf "${confopts[@]}" +} + +src_install() { + default + dodoc RELEASE.NOTES + + insinto /usr/share/hercules + doins hercules.cnf + + # No static archives. Have to leave .la files for modules. #720342 + find "${ED}/usr/$(get_libdir)" -name "*.la" -delete || die +}