From 4dc2f97ed84159736ecfb5dea5485e83b27810d1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 13 Nov 2024 03:02:43 +0000 Subject: gentoo auto-resync : 13:11:2024 - 03:02:42 --- app-emulation/dosemu/Manifest | 3 +- .../dosemu/dosemu-1.4.1_pre20130107-r5.ebuild | 123 -------------------- .../dosemu/dosemu-1.4.1_pre20130107-r6.ebuild | 127 +++++++++++++++++++++ .../dosemu-1.4.1_pre20130107-gcc10-const.patch | 64 +++++++++++ 4 files changed, 193 insertions(+), 124 deletions(-) delete mode 100644 app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild create mode 100644 app-emulation/dosemu/dosemu-1.4.1_pre20130107-r6.ebuild create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-gcc10-const.patch (limited to 'app-emulation/dosemu') diff --git a/app-emulation/dosemu/Manifest b/app-emulation/dosemu/Manifest index 60b3d5152a83..bb5a3d67f933 100644 --- a/app-emulation/dosemu/Manifest +++ b/app-emulation/dosemu/Manifest @@ -3,6 +3,7 @@ AUX dosemu-1.4.1_pre20130107-as.patch 421 BLAKE2B 4ad9440d9553f1162cb33fef6570bf AUX dosemu-1.4.1_pre20130107-fix-inline.patch 560 BLAKE2B 015ac356542cf8cdcb8de6e1f6441704bf2d89eafdba2a2f1a54ff7069bc49393b7e86ab20bb433c34eeaaada43c3cb437ed31f9fbc5ec6fa28832a23921dff3 SHA512 66f3e9a119fb0f80d311d46af6e980ce2f519f389317391746805b875eaecf2f0f714f726e2d6306345c7f68c3e2b2432f8adb16a72a51faf49067ac618e1424 AUX dosemu-1.4.1_pre20130107-flex-2.6.3.patch 463 BLAKE2B d4bc8b47ce97742b0f162a0d03f9347a420ccd8c5d6dbcc92907cdb00654c73ebfaf5b108fd6ed4fb7528d4f254c7e125bc70292cce7634cb04baad27cade69d SHA512 51674b60fb341f56c7120a9349c9890a9770cdef524ae3ccf6795769fde31823b2b57aaaafd6111c236550c16caf53246773dda1cd71639887ffaa7093d95cc0 AUX dosemu-1.4.1_pre20130107-fortify.patch 1961 BLAKE2B ec1e9a8d78ac041c33ae4b4c534a028fa47fc84b8383183006b2830cf28d1a4c227324d2dd0f6aa07c138fbbe3fb991d3ad76012ccd85da973c65b851d965f50 SHA512 90a5dbc6b00d2b13086c15997cf056e1a54721518a76a85425c7adb6d859782e26391c28386e847fd914a01f0c243615c21c1317a58c19ed9603133e0256971a +AUX dosemu-1.4.1_pre20130107-gcc10-const.patch 2184 BLAKE2B 820966ad2c63713ccb852e1e00086387f715a9634d1ae91d602fd347bf7e5ea8b2d042ae04443eec8dbcf6f9ab85fbdd4e9af6c7aaf563a6f78f3adbecec8d65 SHA512 21a3995b9be9da9becf8a6e473997132bed2b975ca5f363ab951fe4d10945f4e500fd6f2706a9cb39e7bf61f843ba7c2d56ceaa576fe9f720c4820bf99de3ba9 AUX dosemu-1.4.1_pre20130107-ia16-ldflags.patch 1787 BLAKE2B a265263de5ccb12df7224343daba5d43786d7f522ae071057105e710d9cfab384a7020c0cdbb305f9da57ecf5ed8ae745ebf115f3cd0b370962e7054dc6690dc SHA512 53fe8b40bc57a2459dcd16d3fba9d81d1cdab498232afe0c19f612737861f88b2f98c584d4fa1a4548e273a38fc17d254f890a64f3112cb0433d7679e7afcdb3 AUX dosemu-1.4.1_pre20130107-lto.patch 921 BLAKE2B 6b36f4e5502fb8b8202ab4396e6c9394d073a88843f3ad67d49bfc02130e6f15f793019e2532b98836975467951d6cf50b008b6401292d9495d55992f636b2fb SHA512 f8b2326abdff86b41e8125e9df242c08834c9f4d28c42ac90b45b409806fc9d453c951d22c2f61d5069844d6f0743600df42ca45d98e103798fbffc28485a0d5 AUX dosemu-1.4.1_pre20130107-nm.patch 1491 BLAKE2B b4a493a882ee82b5e8ae9ba9397b8bcaaff9b77cd585cfcb65af77125231538a993c6303da0271087da9048e3f3e5865ca8abb5c0738a6838252a21e14267ff8 SHA512 ce33f6cc1ba9e1e0ed9947098a8ee6740efe3aae3b7b129f55bac6e41519dc2ac46059e6164faaeee139c890924ee4bb5b382f4453d80a68c5add611f3179b23 @@ -10,5 +11,5 @@ AUX dosemu-1.4.1_pre20130107-no-glibc.patch 559 BLAKE2B 93ba50a5acda4b0b556e5393 AUX dosemu-1.4.1_pre20130107-pcm_write_interleaved-incompatiible-pointer-type.patch 579 BLAKE2B a0b909b98ee4fc41dd02d1f98e63afb791a9c07592134b24d1095ef125017839654bfbdcacbecb9640f740d1178e71235b1f241526d448f8ecd028d5650d867d SHA512 002799cda6801bbb214d99444424879c660ed85945453c4dbbc1698b7169489bd3c70e42205c265acf71455a7edeb079789cc6b14df6ed45aa8ab5668aebc80c DIST dosemu-1.4.1_pre20130107.zip 2767256 BLAKE2B 068c38108257b83d046682d4e9bda6f2da84195cff3aa5eb73764e88ba48bd415a6af9fa1b57059dee12ddd75b379df730fe6957014b554cc13b12ac029eed8d SHA512 eb8dcb914a74b235f2b37ff4dd5c1c84b4916ff195c7bf76cdbe6a4d5e6247c57297eef0c579f219ff7f475e727d66fa5a0f314da46d79cc97a0d794e9ad5864 DIST dosemu-freedos-1.0-bin.tgz 1205628 BLAKE2B e88a23b14cf1ccccb4f648b3c3af39330d8af29940e228b951cc7e48595f9838236066b67f841328e75ee7aee18f9e7814ea33382bb48902ca7947806b646852 SHA512 d0c4235ceac55de63ce5f72e51b7d57a82b8104f4bf2df6f4dc25c9889d3337b40d75665c2dfc98492ec7123e0959a725f5c7579e145895024bd80a07036e3bd -EBUILD dosemu-1.4.1_pre20130107-r5.ebuild 3194 BLAKE2B eae4210e5387b6af704b15766440df62ed3bab11021febdc1c55040035bcac0e4623f7d7672c5e04a91979fd8bddb5db4f4456a1445382e68287f91d47016003 SHA512 3e2237b4de911ccc80380ce8fe46c2973e1bc781c839c30119c13464c1c7118a984ce2e10fc4114387c1c9b1f1fe6e6524fa09edbed40c31fe57aea4eedc39d8 +EBUILD dosemu-1.4.1_pre20130107-r6.ebuild 3262 BLAKE2B 58a5b0c18698ab6af8f8c9dd77ab314a6831817c4b00c6d54a6d1bfe9193adc55dceaf71972b1487d24ecc4c18af2aecad2a016327d8ee618d06ff05c0451ff5 SHA512 aa5198bf124cb024fc27f3039837591e08895507ecf32227b5b365cbc0d7c4dd3186349e4dd2796187a8293798c588d87d5cea1924f5e8eb53599e2a33dde5bc MISC metadata.xml 349 BLAKE2B fedd50e957691cd0f390899d1895eae1883db66df4518b7e12d16cb5a942e7b3748bfa06d7af38dfbab2386305c473713f6303eb2746573c68dbabaff7b4a5ea SHA512 a6b190200756ecb3df7744aaba0f431fbfbb3dd327c652782c3dd3cb2fbd16694cdc223e63b7db471532497786702fdb0f93848297ec2c686815789ccb60a86b diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild deleted file mode 100644 index bb6904b66047..000000000000 --- a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 2002-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit autotools flag-o-matic pax-utils toolchain-funcs - -P_FD="dosemu-freedos-1.0-bin" -COMMIT="15cfb41ff20a052769d753c3262c57ecb050ad71" -# snapshot is downloaded as: -# https://sourceforge.net/code-snapshots/git/d/do/dosemu/code.git/dosemu-code-${COMMIT}.zip - -DESCRIPTION="DOS Emulator" -HOMEPAGE="http://www.dosemu.org/" -SRC_URI="https://downloads.sourceforge.net/dosemu/${P_FD}.tgz - https://dev.gentoo.org/~sam/distfiles/${P}.zip" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* amd64 x86" -IUSE="X alsa debug fluidsynth gpm svga" - -BDEPEND="app-arch/unzip - X? ( - x11-apps/bdftopcf - >=x11-apps/mkfontscale-1.2.0 - )" -COMMON_DEPEND="media-libs/libsdl - >=sys-libs/slang-1.4 - X? ( - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXxf86vm - ) - alsa? ( media-libs/alsa-lib ) - fluidsynth? ( - media-sound/fluid-soundfont - media-sound/fluidsynth - ) - gpm? ( sys-libs/gpm ) - svga? ( media-libs/svgalib )" -# sndfile? ( media-libs/libsndfile ) -DEPEND="${COMMON_DEPEND} - X? ( x11-base/xorg-proto )" -RDEPEND="${COMMON_DEPEND} - X? ( x11-apps/xset )" - -S="${WORKDIR}/${PN}-code-${COMMIT}" - -PATCHES=( - "${FILESDIR}"/${P}-fortify.patch - "${FILESDIR}"/${PN}-1.4.1_pre20091009-dash.patch - "${FILESDIR}"/${P}-no-glibc.patch - "${FILESDIR}"/${P}-flex-2.6.3.patch - "${FILESDIR}"/${P}-ia16-ldflags.patch - "${FILESDIR}"/${P}-fix-inline.patch - "${FILESDIR}"/${P}-lto.patch - "${FILESDIR}"/${P}-as.patch - "${FILESDIR}"/${P}-nm.patch - "${FILESDIR}"/${P}-pcm_write_interleaved-incompatiible-pointer-type.patch -) - -pkg_pretend() { - if tc-is-clang; then - die "${P} does not work on clang due to missing 16-bit assembly support: https://bugs.gentoo.org/729240. Please try gcc." - fi -} - -src_prepare() { - default - - # Has problems with -O3 on some systems - replace-flags -O[3-9] -O2 - - # This one is from media-sound/fluid-soundfont (bug #479534) - sed "s,/usr/share/soundfonts/default.sf2,${EPREFIX}/usr/share/sounds/sf2/FluidR3_GM.sf2,"\ - -i src/plugin/fluidsynth/mid_o_flus.c || die - - eautoreconf -} - -src_configure() { - # workaround binutils ld.gold bug #618366 - local nopie_flag= - if tc-enables-pie; then - if gcc-specs-pie; then - # before gcc got upstream support for '-no-pie' - nopie_flag=-nopie - else - nopie_flag=-no-pie - fi - fi - - # sndfile support is unconditionally disabled in src/plugin/sndfile/snd_o_wav.c - # CPP has to be set explicitly to workaround autoconf-2.69 - # CPP detection (fixed in 2.70). bug #762748. - econf $(use_with X x) \ - $(use_with svga svgalib) \ - $(use_enable debug) \ - $(use_with gpm) \ - $(use_with alsa) \ - $(use_with fluidsynth) \ - --without-sndfile \ - --with-fdtarball="${DISTDIR}"/${P_FD}.tgz \ - --sysconfdir="${EPREFIX}"/etc/dosemu/ \ - --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ - IA16_LDFLAGS_EXTRA=${nopie_flag} \ - CPP="$(tc-getCPP)" -} - -src_compile() { - # src/makefile.common is written manually, uses AR=ar - emake AR="$(tc-getAR)" -} - -src_install() { - default - - # r - randmmap: dosemu tries to get address mapping - # exactly where asked, loops otherwise. - # m - allow RWX mapping: as it's an emulator / code loader - pax-mark -mr "${ED}/usr/bin/dosemu.bin" -} diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r6.ebuild b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r6.ebuild new file mode 100644 index 000000000000..96d4eda00252 --- /dev/null +++ b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r6.ebuild @@ -0,0 +1,127 @@ +# Copyright 2002-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools flag-o-matic pax-utils toolchain-funcs + +P_FD="dosemu-freedos-1.0-bin" +COMMIT="15cfb41ff20a052769d753c3262c57ecb050ad71" +# snapshot is downloaded as: +# https://sourceforge.net/code-snapshots/git/d/do/dosemu/code.git/dosemu-code-${COMMIT}.zip + +DESCRIPTION="DOS Emulator" +HOMEPAGE="http://www.dosemu.org/" +SRC_URI="https://downloads.sourceforge.net/dosemu/${P_FD}.tgz + https://dev.gentoo.org/~sam/distfiles/${P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="X alsa debug fluidsynth gpm svga" + +BDEPEND="app-arch/unzip + sys-devel/bison + X? ( + x11-apps/bdftopcf + >=x11-apps/mkfontscale-1.2.0 + )" +COMMON_DEPEND="media-libs/libsdl + >=sys-libs/slang-1.4 + X? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + ) + alsa? ( media-libs/alsa-lib ) + fluidsynth? ( + media-sound/fluid-soundfont + media-sound/fluidsynth + ) + gpm? ( sys-libs/gpm ) + svga? ( media-libs/svgalib )" +# sndfile? ( media-libs/libsndfile ) +DEPEND="${COMMON_DEPEND} + X? ( x11-base/xorg-proto )" +RDEPEND="${COMMON_DEPEND} + X? ( x11-apps/xset )" + +S="${WORKDIR}/${PN}-code-${COMMIT}" + +PATCHES=( + "${FILESDIR}"/${P}-fortify.patch + "${FILESDIR}"/${PN}-1.4.1_pre20091009-dash.patch + "${FILESDIR}"/${P}-no-glibc.patch + "${FILESDIR}"/${P}-flex-2.6.3.patch + "${FILESDIR}"/${P}-ia16-ldflags.patch + "${FILESDIR}"/${P}-fix-inline.patch + "${FILESDIR}"/${P}-lto.patch + "${FILESDIR}"/${P}-as.patch + "${FILESDIR}"/${P}-nm.patch + "${FILESDIR}"/${P}-pcm_write_interleaved-incompatiible-pointer-type.patch + "${FILESDIR}"/${P}-gcc10-const.patch +) + +pkg_pretend() { + if tc-is-clang; then + die "${P} does not work on clang due to missing 16-bit assembly support: https://bugs.gentoo.org/729240. Please try gcc." + fi +} + +src_prepare() { + default + + # Has problems with -O3 on some systems + replace-flags -O[3-9] -O2 + + # This one is from media-sound/fluid-soundfont (bug #479534) + sed "s,/usr/share/soundfonts/default.sf2,${EPREFIX}/usr/share/sounds/sf2/FluidR3_GM.sf2,"\ + -i src/plugin/fluidsynth/mid_o_flus.c || die + + eautoreconf +} + +src_configure() { + unset YACC + + # workaround binutils ld.gold bug #618366 + local nopie_flag= + if tc-enables-pie; then + if gcc-specs-pie; then + # before gcc got upstream support for '-no-pie' + nopie_flag=-nopie + else + nopie_flag=-no-pie + fi + fi + + # sndfile support is unconditionally disabled in src/plugin/sndfile/snd_o_wav.c + # CPP has to be set explicitly to workaround autoconf-2.69 + # CPP detection (fixed in 2.70). bug #762748. + econf $(use_with X x) \ + $(use_with svga svgalib) \ + $(use_enable debug) \ + $(use_with gpm) \ + $(use_with alsa) \ + $(use_with fluidsynth) \ + --without-sndfile \ + --with-fdtarball="${DISTDIR}"/${P_FD}.tgz \ + --sysconfdir="${EPREFIX}"/etc/dosemu/ \ + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ + IA16_LDFLAGS_EXTRA=${nopie_flag} \ + CPP="$(tc-getCPP)" +} + +src_compile() { + # src/makefile.common is written manually, uses AR=ar + emake AR="$(tc-getAR)" +} + +src_install() { + default + + # r - randmmap: dosemu tries to get address mapping + # exactly where asked, loops otherwise. + # m - allow RWX mapping: as it's an emulator / code loader + pax-mark -mr "${ED}/usr/bin/dosemu.bin" +} diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-gcc10-const.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-gcc10-const.patch new file mode 100644 index 000000000000..01cf146c603c --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-gcc10-const.patch @@ -0,0 +1,64 @@ +https://bugs.gentoo.org/890302 +https://bugzilla.redhat.com/1866474 +https://sourceforge.net/p/dosemu/patches/129/ + +commit b3320c3a67c0bb050b40e76831ec95a4d156890a +Author: Matthew Ogilvie +Date: Thu Jun 15 21:55:30 2023 -0600 + + mem_base: avoid undefined behavior writing to const global with casts + + Fix crash under gcc 10 or later. + +--- a/src/arch/linux/mapping/mapping.c ++++ b/src/arch/linux/mapping/mapping.c +@@ -47,8 +47,8 @@ static int kmem_mappings = 0; + static struct mem_map_struct kmem_map[MAX_KMEM_MAPPINGS]; + + static int init_done = 0; +-unsigned char * const mem_base; +-char * const lowmem_base; ++unsigned char * mem_base; ++char * lowmem_base; + + static struct mappingdrivers *mappingdrv[] = { + #ifdef HAVE_SHM_OPEN +@@ -205,7 +205,7 @@ void *alias_mapping(int cap, unsigned targ, size_t mapsize, int protect, void *s + addr = mappingdriver.alias(cap, target, mapsize, protect, source); + update_aliasmap(target, mapsize, (cap & MAPPING_VGAEMU) ? target : source); + if (cap & MAPPING_INIT_LOWRAM) { +- *(unsigned char **)&mem_base = addr; ++ mem_base = addr; + } + return addr; + } +@@ -416,7 +416,7 @@ void *alloc_mapping(int cap, size_t mapsize, off_t target) + + if (cap & MAPPING_INIT_LOWRAM) { + Q__printf("MAPPING: LOWRAM_INIT, cap=%s, base=%p\n", cap, addr); +- *(char **)(&lowmem_base) = addr; ++ lowmem_base = addr; + } + return addr; + } +--- a/src/include/memory.h ++++ b/src/include/memory.h +@@ -209,7 +209,7 @@ void *lowmemp(const void *ptr); + restrictions it can be non-zero. Non-zero values block vm86 but at least + give NULL pointer protection. + */ +-extern unsigned char * const mem_base; ++extern unsigned char * mem_base; + + /* lowmem_base points to a shared memory image of the area 0--1MB+64K. + It does not have any holes or mapping for video RAM etc. +@@ -221,7 +221,7 @@ extern unsigned char * const mem_base; + It is set "const" to help GCC optimize accesses. In reality it is set only + once, at startup + */ +-extern char * const lowmem_base; ++extern char * lowmem_base; + + #define UNIX_READ_BYTE(addr) (*(Bit8u *) (addr)) + #define UNIX_WRITE_BYTE(addr, val) (*(Bit8u *) (addr) = (val) ) + -- cgit v1.2.3