diff options
Diffstat (limited to 'app-emulation/dosemu')
-rw-r--r-- | app-emulation/dosemu/Manifest | 3 | ||||
-rw-r--r-- | app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild | 61 | ||||
-rw-r--r-- | app-emulation/dosemu/dosemu-1.4.1_pre20130107-r3.ebuild | 81 | ||||
-rw-r--r-- | app-emulation/dosemu/files/dosemu-1.3.4-shm.diff | 11 | ||||
-rw-r--r-- | app-emulation/dosemu/files/dosemu-1.4.0.1-gcc433.diff | 11 | ||||
-rw-r--r-- | app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-flex.patch | 45 | ||||
-rw-r--r-- | app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch | 48 | ||||
-rw-r--r-- | app-emulation/dosemu/metadata.xml | 17 |
8 files changed, 277 insertions, 0 deletions
diff --git a/app-emulation/dosemu/Manifest b/app-emulation/dosemu/Manifest new file mode 100644 index 000000000000..166c308d1f15 --- /dev/null +++ b/app-emulation/dosemu/Manifest @@ -0,0 +1,3 @@ +DIST dosemu-1.4.1_pre20091009.tar.bz2 1965194 SHA256 bf57f3a567008892fcaf0a58f69aae37a4b251f08855968958fa8fc6c06b1d4b SHA512 45aa0fff97f11270a50f9d5f10ec0be137e585c33a163e2b3318e924fe60f6aff90433fa52e90a5f8f9f1557b69720c4750ea685f3f72b644345021a01efc6ae WHIRLPOOL 607a1f92a60f31540d9e7e4033ef913d115a1e2f0a578e4083f8b55c2d0144352fe9f04273dfe953f80ad7bf38dab901dc6b7a4fce2ea3b0676329837b2719cb +DIST dosemu-1.4.1_pre20130107.zip 2767256 SHA256 072e1d8ea9c574b02e556d926a287c9c55b82384ed652bb8dd6f3488801901aa SHA512 eb8dcb914a74b235f2b37ff4dd5c1c84b4916ff195c7bf76cdbe6a4d5e6247c57297eef0c579f219ff7f475e727d66fa5a0f314da46d79cc97a0d794e9ad5864 WHIRLPOOL d2835f82515e40d3c85c1ee53c7add5ba055637864ee63997ec912f53862006e33b4139a253b98cb76ca3cdbd7bdca6614609d9e8e716b074283e77cd8105e3c +DIST dosemu-freedos-1.0-bin.tgz 1205628 SHA256 080c306a1b611e1861fd64466062f268eb44d2bf38082b8a57efadb5a9c0ebc7 SHA512 d0c4235ceac55de63ce5f72e51b7d57a82b8104f4bf2df6f4dc25c9889d3337b40d75665c2dfc98492ec7123e0959a725f5c7579e145895024bd80a07036e3bd WHIRLPOOL 9e6acf38dc8fafe95a49baaaac2a97fdd02c508b7c30c60823f8af7f44aa62b8d82c92661640b4cef05fcdbea401fafea752ec4a0e439a8eff361dd41aa392d3 diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild b/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild new file mode 100644 index 000000000000..83615529e1d3 --- /dev/null +++ b/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils flag-o-matic + +P_FD="dosemu-freedos-1.0-bin" +DESCRIPTION="DOS Emulator" +HOMEPAGE="http://www.dosemu.org/" +SRC_URI="mirror://sourceforge/dosemu/${P_FD}.tgz + mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="X svga gpm debug alsa sndfile" + +RDEPEND="X? ( x11-libs/libXxf86vm + x11-libs/libXau + 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 ) + >=sys-libs/slang-1.4" + +DEPEND="${RDEPEND} + X? ( x11-proto/xf86dgaproto ) + >=sys-devel/autoconf-2.57" +S="${WORKDIR}/${PN}" + +src_compile() { + epatch "${FILESDIR}"/${P}-flex.patch #437074 + + # Has problems with -O3 on some systems + replace-flags -O[3-9] -O2 + + unset KERNEL + + econf `use_with X x` \ + `use_enable svga svgalib` \ + `use_enable debug` \ + `use_with gpm` \ + `use_with alsa` \ + `use_with sndfile` \ + --with-fdtarball="${DISTDIR}"/${P_FD}.tgz \ + --sysconfdir=/etc/dosemu/ \ + --with-docdir=/usr/share/doc/${PF} || die + + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die + # Don't remove COPYING, see bug #137286 + dodoc BUGS ChangeLog COPYING NEWS README THANKS || die #nowarn +} diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r3.ebuild b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r3.ebuild new file mode 100644 index 000000000000..c9c050a9e872 --- /dev/null +++ b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r3.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit 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 + http://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}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-fortify.patch + + # 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 +} + +src_configure() { + 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} +} + +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" +} diff --git a/app-emulation/dosemu/files/dosemu-1.3.4-shm.diff b/app-emulation/dosemu/files/dosemu-1.3.4-shm.diff new file mode 100644 index 000000000000..f0868a988f0b --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.3.4-shm.diff @@ -0,0 +1,11 @@ +--- dosemu-1.3.4/etc/dosemu.conf.orig 2007-01-28 22:19:44.000000000 +0100 ++++ dosemu-1.3.4/etc/dosemu.conf 2007-01-28 22:19:58.000000000 +0100 +@@ -166,7 +166,7 @@ + # preferred mapping driver, one of: auto, mapshm, mapashm, mapfile + # Default: ""="auto" + +-# $_mapping= "" ++$_mapping= "mapshm" + + ############################################################################## + ## Debug settings diff --git a/app-emulation/dosemu/files/dosemu-1.4.0.1-gcc433.diff b/app-emulation/dosemu/files/dosemu-1.4.0.1-gcc433.diff new file mode 100644 index 000000000000..8b0ca77df6c0 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.0.1-gcc433.diff @@ -0,0 +1,11 @@ +--- trunk/src/tools/periph/dexeconfig.c 2008/03/28 14:01:17 1854 ++++ trunk/src/tools/periph/dexeconfig.c 2008/03/30 22:58:55 1855 +@@ -238,7 +238,7 @@ + exit(1); + } + close(fd); +- fc = open(cfile, O_WRONLY | O_CREAT | O_TRUNC); ++ fc = creat(cfile, S_IWUSR | S_IRUSR); + if (fc < 0) { + perror("cannot open config file"); + exit(1); diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-flex.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-flex.patch new file mode 100644 index 000000000000..7e8e291ef1b8 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-flex.patch @@ -0,0 +1,45 @@ +Gentoo-bug: http://bugs.gentoo.org/437074 + +commit 81232816b90e85488d7f11f96b8fcdc5f4988c93 +Author: Stas Sergeev <stsp@users.sourceforge.net> +Date: Sun Oct 14 19:51:09 2012 +0400 + + remove prototypes for lex-generated functions + +diff --git a/src/base/init/lexer.h b/src/base/init/lexer.h +index 65b3ab8..082f08c 100644 +--- a/src/base/init/lexer.h ++++ b/src/base/init/lexer.h +@@ -1,4 +1,4 @@ +-/* ++/* + * (C) Copyright 1992, ..., 2007 the "DOSEMU-Development-Team". + * + * for details see file COPYING.DOSEMU in the DOSEMU distribution +@@ -6,7 +6,9 @@ + + /* + * We are intercepting the yylex() function calls from the parser +- */ ++ */ ++#ifndef LEXER_H ++#define LEXER_H + #define OUR_YY_DECL int yylex (YYSTYPE* yylval) + OUR_YY_DECL; + +@@ -27,14 +29,4 @@ extern int include_lines[]; + extern int line_count; + extern int last_include; + +-extern int yyget_lineno(void); +-extern void yyset_lineno(int line_number); +-extern void yyset_out(FILE * out_str); +-extern void yyset_in(FILE * out_str); +-extern void yyset_debug(int bdebug ); +-extern int yyget_debug(void); +-extern int yylex_destroy(void); +-extern FILE* yyget_in(void); +-extern FILE* yyget_out(void); +-extern int yyget_leng(void); +-extern char *yyget_text(void); ++#endif diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch new file mode 100644 index 000000000000..5daa4e9fee41 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch @@ -0,0 +1,48 @@ +From ff9bea065f4cc6068dcb8d6ea9423105305ca590 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Mon, 5 Aug 2013 13:03:21 +0300 +Subject: [PATCH] src/tools/tools86.c: fix stack buffer overflow in + 'change_aout' + +Detected by gcc: + +gcc -std=gnu99 -c -MP -MMD -I../../src/include -I../../src/plugin/include -Wall -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -pipe -O2 -fomit-frame-pointer -o tools86.o tools86.c +In file included from /usr/include/stdio.h:937:0, + from tools86.c:98: + In function 'fread', + inlined from 'change_aout.constprop.1' at tools86.c:174:12, + inlined from 'main' at tools86.c:391:18: + /usr/include/bits/stdio2.h:293:2: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [enabled by default] + return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream); + ^ +Gentoo-bug: http://bugs.gentoo.org/343577 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + src/tools/tools86.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/tools/tools86.c b/src/tools/tools86.c +index 141610d..35a0b96 100644 +--- a/src/tools/tools86.c ++++ b/src/tools/tools86.c +@@ -137,7 +137,7 @@ struct bsd_header { /* a.out header */ + #endif + + #ifdef __linux__ +-static int header_ld86out_to_gnuasout(struct bsd_header *bsd, struct gnu_header *gnu) ++static int header_ld86out_to_gnuasout(const struct bsd_header *bsd, struct gnu_header *gnu) + { + if (bsd->a_magic[0] != 0x01 || bsd->a_magic[1] != 0x03 || + bsd->a_flags != 0x00 || bsd->a_cpu != 0x10) return -1; +@@ -171,7 +171,7 @@ static int change_aout(char *objfile, int update_symtable) + return errno; + } + #ifdef __linux__ +- if (fread(&bsd,sizeof(gnu),1,f) != 1 ) { ++ if (fread(&bsd,sizeof(bsd),1,f) != 1 ) { + fclose(f); + return -1; + } +-- +1.8.3.2 + diff --git a/app-emulation/dosemu/metadata.xml b/app-emulation/dosemu/metadata.xml new file mode 100644 index 000000000000..14ef792f53f8 --- /dev/null +++ b/app-emulation/dosemu/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hanno@gentoo.org</email> + </maintainer> + <maintainer> + <email>slyfox@gentoo.org</email> + <name>Sergei Trofimovich</name> + </maintainer> + <use> + <flag name="fluidsynth">use <pkg>media-sound/fluidsynth</pkg> for MIDI emulation</flag> + </use> + <upstream> + <remote-id type="sourceforge">dosemu</remote-id> + </upstream> +</pkgmetadata> |