diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-11-04 10:16:08 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-11-04 10:19:20 +0000 |
commit | 26a7caea7e40a8bcda903705376cc9209dced9fa (patch) | |
tree | ae0f49d5c6750a8841ab75a30cf4ad67e3b01aa2 /app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild | |
parent | sys-process/vixie-cron: stable 4.1-r15 for hppa/sparc, bug #635868 (thanks to... (diff) | |
download | gentoo-26a7caea7e40a8bcda903705376cc9209dced9fa.tar.gz gentoo-26a7caea7e40a8bcda903705376cc9209dced9fa.tar.bz2 gentoo-26a7caea7e40a8bcda903705376cc9209dced9fa.zip |
app-emulation/dosemu: unbreak misaligned .sys files, bug #631190
In bug #618366 I've added -no-pie LDFLAGS propagation to 16-bit targets
but did not notice dosemu has different varying base addresses for
different .com files (and I've overlooked 0-based .sys rules).
Specifying wrong base address caused incorrect jump offsets
into the final binary. That caused crash and hangup of cdrom.sys
driver.
This change restores original base addresses.
Reported-by: Tom
Reported-by: Robert Gill
Bug: https://bugs.gentoo.org/631190
Package-Manager: Portage-2.3.13, Repoman-2.3.4
RepoMan-Options: --force
Diffstat (limited to 'app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild')
-rw-r--r-- | app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild new file mode 100644 index 000000000000..8b5fcdc0a693 --- /dev/null +++ b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils flag-o-matic pax-utils toolchain-funcs + +P_FD="dosemu-freedos-1.0-bin" +COMMIT="15cfb41ff20a052769d753c3262c57ecb050ad71" + +DESCRIPTION="DOS Emulator" +HOMEPAGE="http://www.dosemu.org/" +SRC_URI="mirror://sourceforge/dosemu/${P_FD}.tgz + https://sourceforge.net/code-snapshots/git/d/do/dosemu/code.git/dosemu-code-${COMMIT}.zip -> ${P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="X svga gpm debug alsa sndfile fluidsynth" + +RDEPEND="X? ( x11-libs/libX11 + x11-libs/libXxf86vm + x11-libs/libXau + x11-libs/libXext + x11-libs/libXdmcp + x11-apps/xset + x11-apps/xlsfonts + x11-apps/bdftopcf + x11-apps/mkfontdir ) + svga? ( media-libs/svgalib ) + gpm? ( sys-libs/gpm ) + alsa? ( media-libs/alsa-lib ) + sndfile? ( media-libs/libsndfile ) + fluidsynth? ( media-sound/fluidsynth + media-sound/fluid-soundfont ) + media-libs/libsdl + >=sys-libs/slang-1.4" + +DEPEND="${RDEPEND} + X? ( x11-proto/xf86dgaproto ) + >=sys-devel/autoconf-2.57" + +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 +) + +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 + + econf $(use_with X x) \ + $(use_with svga svgalib) \ + $(use_enable debug) \ + $(use_with gpm) \ + $(use_with alsa) \ + $(use_with sndfile) \ + $(use_with fluidsynth) \ + --with-fdtarball="${DISTDIR}"/${P_FD}.tgz \ + --sysconfdir="${EPREFIX}"/etc/dosemu/ \ + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ + IA16_LDFLAGS_EXTRA=${nopie_flag} +} + +src_compile() { + 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" +} |