public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2016-06-28  8:22 Austin English
  0 siblings, 0 replies; 8+ messages in thread
From: Austin English @ 2016-06-28  8:22 UTC (permalink / raw
  To: gentoo-commits

commit:     143e036505e2b27b1aa5037d52a5f999391b4168
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 04:03:24 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 08:16:49 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=143e0365

games-emulation/dosbox: fix compiling with clang (#449060)

Also apply two patches needed by Wine using DOSBox (#586650)

Gentoo-Bug: https://bugs.gentoo.org/449060
Gentoo-Bug: https://bugs.gentoo.org/586650

Upstream-Bug: https://bugs.winehq.org/show_bug.cgi?id=18118
Upstream-Bug: https://bugs.winehq.org/show_bug.cgi?id=25887
Upstream-Bug: https://bugs.winehq.org/show_bug.cgi?id=26423

Package-Manager: portage-2.2.26

 games-emulation/dosbox/dosbox-0.74-r1.ebuild       |  51 +++++++
 .../dosbox/files/dosbox-0.74-clang.patch           |  48 +++++++
 .../dosbox/files/dosbox-0.74-gcc46.patch           |   4 +-
 .../dosbox/files/dosbox-0.74-wine-drive-z.patch    | 151 +++++++++++++++++++++
 .../dosbox/files/dosbox-0.74-wine-filenames.patch  |  89 ++++++++++++
 5 files changed, 341 insertions(+), 2 deletions(-)

diff --git a/games-emulation/dosbox/dosbox-0.74-r1.ebuild b/games-emulation/dosbox/dosbox-0.74-r1.ebuild
new file mode 100644
index 0000000..80989ea
--- /dev/null
+++ b/games-emulation/dosbox/dosbox-0.74-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="DOS emulator"
+HOMEPAGE="http://dosbox.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dosbox/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+IUSE="alsa debug hardened opengl"
+
+DEPEND="alsa? ( media-libs/alsa-lib )
+	debug? ( sys-libs/ncurses:0 )
+	opengl? ( virtual/glu virtual/opengl )
+	media-libs/libpng:0
+	media-libs/libsdl[joystick,video,X]
+	media-libs/sdl-net
+	media-libs/sdl-sound"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-clang.patch
+	"${FILESDIR}"/${P}-gcc46.patch
+	"${FILESDIR}"/${P}-wine-drive-z.patch
+	"${FILESDIR}"/${P}-wine-filenames.patch
+)
+
+src_prepare() {
+	epatch -p1 "${PATCHES[@]}"
+}
+
+src_configure() {
+	egamesconf \
+		$(use_enable alsa alsa-midi) \
+		$(use_enable !hardened dynamic-core) \
+		$(use_enable !hardened dynamic-x86) \
+		$(use_enable debug) \
+		$(use_enable opengl)
+}
+
+src_install() {
+	default
+	make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
+	doicon src/dosbox.ico
+	prepgamesdirs
+}

diff --git a/games-emulation/dosbox/files/dosbox-0.74-clang.patch b/games-emulation/dosbox/files/dosbox-0.74-clang.patch
new file mode 100644
index 0000000..df2923f
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.74-clang.patch
@@ -0,0 +1,48 @@
+Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=449060
+
+Two backports from Dosbox SVN needed for clang support:
+src/fpu/fpu_instructions_x86.h changes are revision 3841
+src/cpu/core_dynrec/risc_x64.h changes are revision 3894
+
+Index: src/fpu/fpu_instructions_x86.h
+===================================================================
+--- a/src/fpu/fpu_instructions_x86.h	(revision 3840)
++++ b/src/fpu/fpu_instructions_x86.h	(revision 3841)
+@@ -1161,12 +1161,12 @@
+ 
+ static void FPU_FLD_I16(PhysPt addr,Bitu store_to) {
+ 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
+-	FPUD_LOAD(fild,WORD,)
++	FPUD_LOAD(fild,WORD,s)
+ }
+ 
+ static void FPU_FLD_I16_EA(PhysPt addr) {
+ 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
+-	FPUD_LOAD_EA(fild,WORD,)
++	FPUD_LOAD_EA(fild,WORD,s)
+ }
+ 
+ static void FPU_FLD_I32(PhysPt addr,Bitu store_to) {
+@@ -1211,7 +1211,7 @@
+ }
+ 
+ static void FPU_FST_I16(PhysPt addr) {
+-	FPUD_STORE(fistp,WORD,)
++	FPUD_STORE(fistp,WORD,s)
+ 	mem_writew(addr,(Bit16u)fpu.p_regs[8].m1);
+ }
+ 
+Index: src/cpu/core_dynrec/risc_x64.h
+===================================================================
+--- a/src/cpu/core_dynrec/risc_x64.h	(revision 3893)
++++ b/src/cpu/core_dynrec/risc_x64.h	(revision 3894)
+@@ -85,7 +85,8 @@
+ 
+ static INLINE void gen_reg_memaddr(HostReg reg,void* data) {
+ 	Bit64s diff = (Bit64s)data-((Bit64s)cache.pos+5);
+-	if ((diff<0x80000000LL) && (diff>-0x80000000LL)) {
++//	if ((diff<0x80000000LL) && (diff>-0x80000000LL)) { //clang messes itself up on this...
++	if ( (diff>>63) == (diff>>31) ) { //signed bit extend, test to see if value fits in a Bit32s
+ 		cache_addb(0x05+(reg<<3));
+ 		// RIP-relative addressing is offset after the instruction 
+ 		cache_addd((Bit32u)(((Bit64u)diff)&0xffffffffLL)); 

diff --git a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
index 16811d4..54cd51b 100644
--- a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
+++ b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
@@ -1,5 +1,5 @@
---- include/dos_inc.h.old	2011-04-28 08:46:04.505011354 +0200
-+++ include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
+--- a/include/dos_inc.h.old	2011-04-28 08:46:04.505011354 +0200
++++ b/include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
 @@ -21,6 +21,7 @@
  #ifndef DOSBOX_DOS_INC_H
  #define DOSBOX_DOS_INC_H

diff --git a/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch b/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch
new file mode 100644
index 0000000..848d3e7
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch
@@ -0,0 +1,151 @@
+From Debian (which backported the patch):
+https://packages.debian.org/sid/dosbox
+
+Description: Rewrite mount without arguments to display volume label as well.
+ Some refactoring of the code.
+ Add mount -z X, where X is the new virtual drive for the Wine Team.
+Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3736/
+Author: Peter Veenstra <qbix79@users.sourceforge.net>
+Last-Update: 2011-07-23
+--- a/src/dos/dos_programs.cpp
++++ b/src/dos/dos_programs.cpp
+@@ -49,27 +49,55 @@
+ #endif
+ 
+ void MSCDEX_SetCDInterface(int intNr, int forceCD);
+-
++static Bitu ZDRIVE_NUM = 25;
+ 
+ class MOUNT : public Program {
+ public:
+-	void Run(void)
+-	{
++	void ListMounts(void) {
++		char name[DOS_NAMELENGTH_ASCII];Bit32u size;Bit16u date;Bit16u time;Bit8u attr;
++		/* Command uses dta so set it to our internal dta */
++		RealPt save_dta = dos.dta();
++		dos.dta(dos.tables.tempdta);
++		DOS_DTA dta(dos.dta());
++
++		WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1"));
++		WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),"Drive","Type","Label");
++		for(int p = 0;p < 8;p++) WriteOut("----------");
++
++		for (int d = 0;d < DOS_DRIVES;d++) {
++			if (!Drives[d]) continue;
++
++			char root[4] = {'A'+d,':','\\',0};
++			bool ret = DOS_FindFirst(root,DOS_ATTR_VOLUME);
++			if (ret) {
++				dta.GetResult(name,size,date,time,attr);
++				DOS_FindNext(); //Mark entry as invalid
++			} else name[0] = 0;
++
++			/* Change 8.3 to 11.0 */
++			char* dot = strchr(name,'.');
++			if(dot && (dot - name == 8) ) {
++				name[8] = name[9];name[9] = name[10];name[10] = name[11];name[11] = 0;
++			}
++
++			root[1] = 0; //This way, the format string can be reused.
++			WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),root, Drives[d]->GetInfo(),name);
++		}
++		dos.dta(save_dta);
++	}
++
++	void Run(void) {
+ 		DOS_Drive * newdrive;char drive;
+ 		std::string label;
+ 		std::string umount;
++		std::string newz;
+ 
+ 		//Hack To allow long commandlines
+ 		ChangeToLongCmd();
+ 		/* Parse the command line */
+ 		/* if the command line is empty show current mounts */
+ 		if (!cmd->GetCount()) {
+-			WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1"));
+-			for (int d=0;d<DOS_DRIVES;d++) {
+-				if (Drives[d]) {
+-					WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),d+'A',Drives[d]->GetInfo());
+-				}
+-			}
++			ListMounts();
+ 			return;
+ 		}
+ 
+@@ -84,12 +112,12 @@
+ 		if (cmd->FindString("-u",umount,false)) {
+ 			umount[0] = toupper(umount[0]);
+ 			int i_drive = umount[0]-'A';
+-				if(i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) {
++				if (i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) {
+ 					switch (DriveManager::UnmountDrive(i_drive)) {
+ 					case 0:
+ 						Drives[i_drive] = 0;
+ 						if(i_drive == DOS_GetDefaultDrive()) 
+-							DOS_SetDrive(toupper('Z') - 'A');
++							DOS_SetDrive(ZDRIVE_NUM);
+ 						WriteOut(MSG_Get("PROGRAM_MOUNT_UMOUNT_SUCCESS"),umount[0]);
+ 						break;
+ 					case 1:
+@@ -104,8 +132,46 @@
+ 				}
+ 			return;
+ 		}
+-	   
+-		// Show list of cdroms
++
++		/* Check for moving Z: */
++		/* Only allowing moving it once. It is merely a convenience added for the wine team */
++		if (ZDRIVE_NUM == 25 && cmd->FindString("-z", newz,false)) {
++			newz[0] = toupper(newz[0]);
++			int i_newz = newz[0] - 'A';
++			if (i_newz >= 0 && i_newz < DOS_DRIVES-1 && !Drives[i_newz]) {
++				ZDRIVE_NUM = i_newz;
++				/* remap drives */
++				Drives[i_newz] = Drives[25];
++				Drives[25] = 0;
++				DOS_Shell *fs = static_cast<DOS_Shell *>(first_shell); //dynamic ?
++				/* Update environment */
++				std::string line = "";
++				char ppp[2] = {newz[0],0};
++				std::string tempenv = ppp; tempenv += ":\\";
++				if (fs->GetEnvStr("PATH",line)){
++					std::string::size_type idx = line.find('=');
++					std::string value = line.substr(idx +1 , std::string::npos);
++					while ( (idx = value.find("Z:\\")) != std::string::npos ||
++					        (idx = value.find("z:\\")) != std::string::npos  )
++						value.replace(idx,3,tempenv);
++					line = value;
++				}
++				if (!line.size()) line = tempenv;
++				fs->SetEnv("PATH",line.c_str());
++				tempenv += "COMMAND.COM";
++				fs->SetEnv("COMSPEC",tempenv.c_str());
++
++				/* Update batch file if running from Z: (very likely: autoexec) */
++				if(fs->bf) {
++					std::string &name = fs->bf->filename;
++					if(name.length() >2 &&  name[0] == 'Z' && name[1] == ':') name[0] = newz[0];
++				}
++				/* Change the active drive */
++				if (DOS_GetDefaultDrive() == 25) DOS_SetDrive(i_newz);
++			}
++			return;
++		}
++		/* Show list of cdroms */
+ 		if (cmd->FindExist("-cd",false)) {
+ 			int num = SDL_CDNumDrives();
+    			WriteOut(MSG_Get("PROGRAM_MOUNT_CDROMS_FOUND"),num);
+@@ -1347,8 +1413,9 @@
+ 	/*Add Messages */
+ 
+ 	MSG_Add("PROGRAM_MOUNT_CDROMS_FOUND","CDROMs found: %d\n");
++	MSG_Add("PROGRAM_MOUNT_STATUS_FORMAT","%-5s  %-58s %-12s\n");
+ 	MSG_Add("PROGRAM_MOUNT_STATUS_2","Drive %c is mounted as %s\n");
+-	MSG_Add("PROGRAM_MOUNT_STATUS_1","Current mounted drives are:\n");
++	MSG_Add("PROGRAM_MOUNT_STATUS_1","The currently mounted drives are:\n");
+ 	MSG_Add("PROGRAM_MOUNT_ERROR_1","Directory %s doesn't exist.\n");
+ 	MSG_Add("PROGRAM_MOUNT_ERROR_2","%s isn't a directory\n");
+ 	MSG_Add("PROGRAM_MOUNT_ILL_TYPE","Illegal type %s\n");

diff --git a/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch b/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch
new file mode 100644
index 0000000..89e2433
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch
@@ -0,0 +1,89 @@
+Description: Be friendly for other open source projects: work with WINE style namemangling.
+ Patch 3382938 from Andre_H (modified).
+Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3743/
+Author: Peter Veenstra <qbix79@users.sourceforge.net>
+Last-Update: 2011-08-30
+--- a/src/dos/drive_cache.cpp
++++ b/src/dos/drive_cache.cpp
+@@ -370,6 +370,60 @@
+ 	return false;
+ }
+ 
++#define WINE_DRIVE_SUPPORT 1
++#if WINE_DRIVE_SUPPORT
++//Changes to interact with WINE by supporting their namemangling.
++//The code is rather slow, because orglist is unordered, so it needs to be avoided if possible.
++//Hence the tests in GetLongFileName
++
++
++// From the Wine project
++static Bits wine_hash_short_file_name( char* name, char* buffer )
++{
++	static const char hash_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345";
++	static const char invalid_chars[] = { '*','?','<','>','|','"','+','=',',',';','[',']',' ','\345','~','.',0 };
++	char* p;
++	char* ext;
++	char* end = name + strlen(name);
++	char* dst;
++	unsigned short hash;
++	int i;
++
++	// Compute the hash code of the file name
++	for (p = name, hash = 0xbeef; p < end - 1; p++)
++		hash = (hash<<3) ^ (hash>>5) ^ tolower(*p) ^ (tolower(p[1]) << 8);
++	hash = (hash<<3) ^ (hash>>5) ^ tolower(*p); // Last character
++
++
++	// Find last dot for start of the extension
++	for (p = name + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p;
++
++	// Copy first 4 chars, replacing invalid chars with '_'
++	for (i = 4, p = name, dst = buffer; i > 0; i--, p++)
++	{
++		if (p == end || p == ext) break;
++		*dst++ = (*p < 0 || strchr( invalid_chars, *p ) != NULL) ? '_' : toupper(*p);
++	}
++	// Pad to 5 chars with '~'
++	while (i-- >= 0) *dst++ = '~';
++
++	// Insert hash code converted to 3 ASCII chars
++	*dst++ = hash_chars[(hash >> 10) & 0x1f];
++	*dst++ = hash_chars[(hash >> 5) & 0x1f];
++	*dst++ = hash_chars[hash & 0x1f];
++
++	// Copy the first 3 chars of the extension (if any)
++	if (ext)
++	{
++		*dst++ = '.';
++		for (i = 3, ext++; (i > 0) && ext < end; i--, ext++)
++			*dst++ = (*ext < 0 || strchr( invalid_chars, *ext ) != NULL) ? '_' : toupper(*ext);
++	}
++
++	return dst - buffer;
++}
++#endif
++
+ Bits DOS_Drive_Cache::GetLongName(CFileInfo* curDir, char* shortName) {
+ 	std::vector<CFileInfo*>::size_type filelist_size = curDir->fileList.size();
+ 	if (GCC_UNLIKELY(filelist_size<=0)) return -1;
+@@ -390,6 +444,20 @@
+ 			return mid;
+ 		};
+ 	}
++#ifdef WINE_DRIVE_SUPPORT
++	if (strlen(shortName) < 8 || shortName[4] != '~' || shortName[5] == '.' || shortName[6] == '.' || shortName[7] == '.') return -1; // not available
++	// else it's most likely a Wine style short name ABCD~###, # = not dot  (length at least 8)
++	// The above test is rather strict as the following loop can be really slow if filelist_size is large.
++	char buff[CROSS_LEN];
++	for (Bits i = 0; i < filelist_size; i++) {
++		res = wine_hash_short_file_name(curDir->fileList[i]->orgname,buff);
++		if (!strncmp(shortName,buff,res))
++		{	// Found
++			strcpy(shortName,curDir->fileList[i]->orgname);
++			return i;
++		};
++	}
++#endif
+ 	// not available
+ 	return -1;
+ }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2016-06-28 14:51 Michael Sterrett
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Sterrett @ 2016-06-28 14:51 UTC (permalink / raw
  To: gentoo-commits

commit:     a87623b1beff702e5f50319a28b3a7cbf5eca2b6
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 14:49:48 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 14:49:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a87623b1

Revert "games-emulation/dosbox: fix compiling with clang (#449060)"

This reverts commit 143e036505e2b27b1aa5037d52a5f999391b4168.

 games-emulation/dosbox/dosbox-0.74-r1.ebuild       |  51 -------
 .../dosbox/files/dosbox-0.74-clang.patch           |  48 -------
 .../dosbox/files/dosbox-0.74-gcc46.patch           |   4 +-
 .../dosbox/files/dosbox-0.74-wine-drive-z.patch    | 151 ---------------------
 .../dosbox/files/dosbox-0.74-wine-filenames.patch  |  89 ------------
 5 files changed, 2 insertions(+), 341 deletions(-)

diff --git a/games-emulation/dosbox/dosbox-0.74-r1.ebuild b/games-emulation/dosbox/dosbox-0.74-r1.ebuild
deleted file mode 100644
index 80989ea..0000000
--- a/games-emulation/dosbox/dosbox-0.74-r1.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils games
-
-DESCRIPTION="DOS emulator"
-HOMEPAGE="http://dosbox.sourceforge.net/"
-SRC_URI="mirror://sourceforge/dosbox/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
-IUSE="alsa debug hardened opengl"
-
-DEPEND="alsa? ( media-libs/alsa-lib )
-	debug? ( sys-libs/ncurses:0 )
-	opengl? ( virtual/glu virtual/opengl )
-	media-libs/libpng:0
-	media-libs/libsdl[joystick,video,X]
-	media-libs/sdl-net
-	media-libs/sdl-sound"
-RDEPEND=${DEPEND}
-
-PATCHES=(
-	"${FILESDIR}"/${P}-clang.patch
-	"${FILESDIR}"/${P}-gcc46.patch
-	"${FILESDIR}"/${P}-wine-drive-z.patch
-	"${FILESDIR}"/${P}-wine-filenames.patch
-)
-
-src_prepare() {
-	epatch -p1 "${PATCHES[@]}"
-}
-
-src_configure() {
-	egamesconf \
-		$(use_enable alsa alsa-midi) \
-		$(use_enable !hardened dynamic-core) \
-		$(use_enable !hardened dynamic-x86) \
-		$(use_enable debug) \
-		$(use_enable opengl)
-}
-
-src_install() {
-	default
-	make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
-	doicon src/dosbox.ico
-	prepgamesdirs
-}

diff --git a/games-emulation/dosbox/files/dosbox-0.74-clang.patch b/games-emulation/dosbox/files/dosbox-0.74-clang.patch
deleted file mode 100644
index df2923f..0000000
--- a/games-emulation/dosbox/files/dosbox-0.74-clang.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=449060
-
-Two backports from Dosbox SVN needed for clang support:
-src/fpu/fpu_instructions_x86.h changes are revision 3841
-src/cpu/core_dynrec/risc_x64.h changes are revision 3894
-
-Index: src/fpu/fpu_instructions_x86.h
-===================================================================
---- a/src/fpu/fpu_instructions_x86.h	(revision 3840)
-+++ b/src/fpu/fpu_instructions_x86.h	(revision 3841)
-@@ -1161,12 +1161,12 @@
- 
- static void FPU_FLD_I16(PhysPt addr,Bitu store_to) {
- 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
--	FPUD_LOAD(fild,WORD,)
-+	FPUD_LOAD(fild,WORD,s)
- }
- 
- static void FPU_FLD_I16_EA(PhysPt addr) {
- 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
--	FPUD_LOAD_EA(fild,WORD,)
-+	FPUD_LOAD_EA(fild,WORD,s)
- }
- 
- static void FPU_FLD_I32(PhysPt addr,Bitu store_to) {
-@@ -1211,7 +1211,7 @@
- }
- 
- static void FPU_FST_I16(PhysPt addr) {
--	FPUD_STORE(fistp,WORD,)
-+	FPUD_STORE(fistp,WORD,s)
- 	mem_writew(addr,(Bit16u)fpu.p_regs[8].m1);
- }
- 
-Index: src/cpu/core_dynrec/risc_x64.h
-===================================================================
---- a/src/cpu/core_dynrec/risc_x64.h	(revision 3893)
-+++ b/src/cpu/core_dynrec/risc_x64.h	(revision 3894)
-@@ -85,7 +85,8 @@
- 
- static INLINE void gen_reg_memaddr(HostReg reg,void* data) {
- 	Bit64s diff = (Bit64s)data-((Bit64s)cache.pos+5);
--	if ((diff<0x80000000LL) && (diff>-0x80000000LL)) {
-+//	if ((diff<0x80000000LL) && (diff>-0x80000000LL)) { //clang messes itself up on this...
-+	if ( (diff>>63) == (diff>>31) ) { //signed bit extend, test to see if value fits in a Bit32s
- 		cache_addb(0x05+(reg<<3));
- 		// RIP-relative addressing is offset after the instruction 
- 		cache_addd((Bit32u)(((Bit64u)diff)&0xffffffffLL)); 

diff --git a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
index 54cd51b..16811d4 100644
--- a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
+++ b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
@@ -1,5 +1,5 @@
---- a/include/dos_inc.h.old	2011-04-28 08:46:04.505011354 +0200
-+++ b/include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
+--- include/dos_inc.h.old	2011-04-28 08:46:04.505011354 +0200
++++ include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
 @@ -21,6 +21,7 @@
  #ifndef DOSBOX_DOS_INC_H
  #define DOSBOX_DOS_INC_H

diff --git a/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch b/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch
deleted file mode 100644
index 848d3e7..0000000
--- a/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From Debian (which backported the patch):
-https://packages.debian.org/sid/dosbox
-
-Description: Rewrite mount without arguments to display volume label as well.
- Some refactoring of the code.
- Add mount -z X, where X is the new virtual drive for the Wine Team.
-Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3736/
-Author: Peter Veenstra <qbix79@users.sourceforge.net>
-Last-Update: 2011-07-23
---- a/src/dos/dos_programs.cpp
-+++ b/src/dos/dos_programs.cpp
-@@ -49,27 +49,55 @@
- #endif
- 
- void MSCDEX_SetCDInterface(int intNr, int forceCD);
--
-+static Bitu ZDRIVE_NUM = 25;
- 
- class MOUNT : public Program {
- public:
--	void Run(void)
--	{
-+	void ListMounts(void) {
-+		char name[DOS_NAMELENGTH_ASCII];Bit32u size;Bit16u date;Bit16u time;Bit8u attr;
-+		/* Command uses dta so set it to our internal dta */
-+		RealPt save_dta = dos.dta();
-+		dos.dta(dos.tables.tempdta);
-+		DOS_DTA dta(dos.dta());
-+
-+		WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1"));
-+		WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),"Drive","Type","Label");
-+		for(int p = 0;p < 8;p++) WriteOut("----------");
-+
-+		for (int d = 0;d < DOS_DRIVES;d++) {
-+			if (!Drives[d]) continue;
-+
-+			char root[4] = {'A'+d,':','\\',0};
-+			bool ret = DOS_FindFirst(root,DOS_ATTR_VOLUME);
-+			if (ret) {
-+				dta.GetResult(name,size,date,time,attr);
-+				DOS_FindNext(); //Mark entry as invalid
-+			} else name[0] = 0;
-+
-+			/* Change 8.3 to 11.0 */
-+			char* dot = strchr(name,'.');
-+			if(dot && (dot - name == 8) ) {
-+				name[8] = name[9];name[9] = name[10];name[10] = name[11];name[11] = 0;
-+			}
-+
-+			root[1] = 0; //This way, the format string can be reused.
-+			WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),root, Drives[d]->GetInfo(),name);
-+		}
-+		dos.dta(save_dta);
-+	}
-+
-+	void Run(void) {
- 		DOS_Drive * newdrive;char drive;
- 		std::string label;
- 		std::string umount;
-+		std::string newz;
- 
- 		//Hack To allow long commandlines
- 		ChangeToLongCmd();
- 		/* Parse the command line */
- 		/* if the command line is empty show current mounts */
- 		if (!cmd->GetCount()) {
--			WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1"));
--			for (int d=0;d<DOS_DRIVES;d++) {
--				if (Drives[d]) {
--					WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),d+'A',Drives[d]->GetInfo());
--				}
--			}
-+			ListMounts();
- 			return;
- 		}
- 
-@@ -84,12 +112,12 @@
- 		if (cmd->FindString("-u",umount,false)) {
- 			umount[0] = toupper(umount[0]);
- 			int i_drive = umount[0]-'A';
--				if(i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) {
-+				if (i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) {
- 					switch (DriveManager::UnmountDrive(i_drive)) {
- 					case 0:
- 						Drives[i_drive] = 0;
- 						if(i_drive == DOS_GetDefaultDrive()) 
--							DOS_SetDrive(toupper('Z') - 'A');
-+							DOS_SetDrive(ZDRIVE_NUM);
- 						WriteOut(MSG_Get("PROGRAM_MOUNT_UMOUNT_SUCCESS"),umount[0]);
- 						break;
- 					case 1:
-@@ -104,8 +132,46 @@
- 				}
- 			return;
- 		}
--	   
--		// Show list of cdroms
-+
-+		/* Check for moving Z: */
-+		/* Only allowing moving it once. It is merely a convenience added for the wine team */
-+		if (ZDRIVE_NUM == 25 && cmd->FindString("-z", newz,false)) {
-+			newz[0] = toupper(newz[0]);
-+			int i_newz = newz[0] - 'A';
-+			if (i_newz >= 0 && i_newz < DOS_DRIVES-1 && !Drives[i_newz]) {
-+				ZDRIVE_NUM = i_newz;
-+				/* remap drives */
-+				Drives[i_newz] = Drives[25];
-+				Drives[25] = 0;
-+				DOS_Shell *fs = static_cast<DOS_Shell *>(first_shell); //dynamic ?
-+				/* Update environment */
-+				std::string line = "";
-+				char ppp[2] = {newz[0],0};
-+				std::string tempenv = ppp; tempenv += ":\\";
-+				if (fs->GetEnvStr("PATH",line)){
-+					std::string::size_type idx = line.find('=');
-+					std::string value = line.substr(idx +1 , std::string::npos);
-+					while ( (idx = value.find("Z:\\")) != std::string::npos ||
-+					        (idx = value.find("z:\\")) != std::string::npos  )
-+						value.replace(idx,3,tempenv);
-+					line = value;
-+				}
-+				if (!line.size()) line = tempenv;
-+				fs->SetEnv("PATH",line.c_str());
-+				tempenv += "COMMAND.COM";
-+				fs->SetEnv("COMSPEC",tempenv.c_str());
-+
-+				/* Update batch file if running from Z: (very likely: autoexec) */
-+				if(fs->bf) {
-+					std::string &name = fs->bf->filename;
-+					if(name.length() >2 &&  name[0] == 'Z' && name[1] == ':') name[0] = newz[0];
-+				}
-+				/* Change the active drive */
-+				if (DOS_GetDefaultDrive() == 25) DOS_SetDrive(i_newz);
-+			}
-+			return;
-+		}
-+		/* Show list of cdroms */
- 		if (cmd->FindExist("-cd",false)) {
- 			int num = SDL_CDNumDrives();
-    			WriteOut(MSG_Get("PROGRAM_MOUNT_CDROMS_FOUND"),num);
-@@ -1347,8 +1413,9 @@
- 	/*Add Messages */
- 
- 	MSG_Add("PROGRAM_MOUNT_CDROMS_FOUND","CDROMs found: %d\n");
-+	MSG_Add("PROGRAM_MOUNT_STATUS_FORMAT","%-5s  %-58s %-12s\n");
- 	MSG_Add("PROGRAM_MOUNT_STATUS_2","Drive %c is mounted as %s\n");
--	MSG_Add("PROGRAM_MOUNT_STATUS_1","Current mounted drives are:\n");
-+	MSG_Add("PROGRAM_MOUNT_STATUS_1","The currently mounted drives are:\n");
- 	MSG_Add("PROGRAM_MOUNT_ERROR_1","Directory %s doesn't exist.\n");
- 	MSG_Add("PROGRAM_MOUNT_ERROR_2","%s isn't a directory\n");
- 	MSG_Add("PROGRAM_MOUNT_ILL_TYPE","Illegal type %s\n");

diff --git a/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch b/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch
deleted file mode 100644
index 89e2433..0000000
--- a/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Description: Be friendly for other open source projects: work with WINE style namemangling.
- Patch 3382938 from Andre_H (modified).
-Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3743/
-Author: Peter Veenstra <qbix79@users.sourceforge.net>
-Last-Update: 2011-08-30
---- a/src/dos/drive_cache.cpp
-+++ b/src/dos/drive_cache.cpp
-@@ -370,6 +370,60 @@
- 	return false;
- }
- 
-+#define WINE_DRIVE_SUPPORT 1
-+#if WINE_DRIVE_SUPPORT
-+//Changes to interact with WINE by supporting their namemangling.
-+//The code is rather slow, because orglist is unordered, so it needs to be avoided if possible.
-+//Hence the tests in GetLongFileName
-+
-+
-+// From the Wine project
-+static Bits wine_hash_short_file_name( char* name, char* buffer )
-+{
-+	static const char hash_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345";
-+	static const char invalid_chars[] = { '*','?','<','>','|','"','+','=',',',';','[',']',' ','\345','~','.',0 };
-+	char* p;
-+	char* ext;
-+	char* end = name + strlen(name);
-+	char* dst;
-+	unsigned short hash;
-+	int i;
-+
-+	// Compute the hash code of the file name
-+	for (p = name, hash = 0xbeef; p < end - 1; p++)
-+		hash = (hash<<3) ^ (hash>>5) ^ tolower(*p) ^ (tolower(p[1]) << 8);
-+	hash = (hash<<3) ^ (hash>>5) ^ tolower(*p); // Last character
-+
-+
-+	// Find last dot for start of the extension
-+	for (p = name + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p;
-+
-+	// Copy first 4 chars, replacing invalid chars with '_'
-+	for (i = 4, p = name, dst = buffer; i > 0; i--, p++)
-+	{
-+		if (p == end || p == ext) break;
-+		*dst++ = (*p < 0 || strchr( invalid_chars, *p ) != NULL) ? '_' : toupper(*p);
-+	}
-+	// Pad to 5 chars with '~'
-+	while (i-- >= 0) *dst++ = '~';
-+
-+	// Insert hash code converted to 3 ASCII chars
-+	*dst++ = hash_chars[(hash >> 10) & 0x1f];
-+	*dst++ = hash_chars[(hash >> 5) & 0x1f];
-+	*dst++ = hash_chars[hash & 0x1f];
-+
-+	// Copy the first 3 chars of the extension (if any)
-+	if (ext)
-+	{
-+		*dst++ = '.';
-+		for (i = 3, ext++; (i > 0) && ext < end; i--, ext++)
-+			*dst++ = (*ext < 0 || strchr( invalid_chars, *ext ) != NULL) ? '_' : toupper(*ext);
-+	}
-+
-+	return dst - buffer;
-+}
-+#endif
-+
- Bits DOS_Drive_Cache::GetLongName(CFileInfo* curDir, char* shortName) {
- 	std::vector<CFileInfo*>::size_type filelist_size = curDir->fileList.size();
- 	if (GCC_UNLIKELY(filelist_size<=0)) return -1;
-@@ -390,6 +444,20 @@
- 			return mid;
- 		};
- 	}
-+#ifdef WINE_DRIVE_SUPPORT
-+	if (strlen(shortName) < 8 || shortName[4] != '~' || shortName[5] == '.' || shortName[6] == '.' || shortName[7] == '.') return -1; // not available
-+	// else it's most likely a Wine style short name ABCD~###, # = not dot  (length at least 8)
-+	// The above test is rather strict as the following loop can be really slow if filelist_size is large.
-+	char buff[CROSS_LEN];
-+	for (Bits i = 0; i < filelist_size; i++) {
-+		res = wine_hash_short_file_name(curDir->fileList[i]->orgname,buff);
-+		if (!strncmp(shortName,buff,res))
-+		{	// Found
-+			strcpy(shortName,curDir->fileList[i]->orgname);
-+			return i;
-+		};
-+	}
-+#endif
- 	// not available
- 	return -1;
- }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2016-06-29 20:14 William Hubbs
  0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2016-06-29 20:14 UTC (permalink / raw
  To: gentoo-commits

commit:     5edb412a63031c0372093d5e5fb038e5da4f52f1
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 29 19:41:26 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 20:05:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5edb412a

games-emulation/dosbox: [qa]: create a snapshot release to fix multiple bugs

This snapshot release fixes the following bugs:

https://bugs.gentoo.org/show_bug.cgi?id=449060
https://bugs.gentoo.org/show_bug.cgi?id=586650
https://bugs.gentoo.org/show_bug.cgi?id=587382

Package-Manager: portage-2.2.28

 .../{dosbox-3989.ebuild => dosbox-0.74_p20160629.ebuild}   | 14 +++++++++-----
 games-emulation/dosbox/files/dosbox-0.74-gcc46.patch       |  4 ++--
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/games-emulation/dosbox/dosbox-3989.ebuild b/games-emulation/dosbox/dosbox-0.74_p20160629.ebuild
similarity index 86%
rename from games-emulation/dosbox/dosbox-3989.ebuild
rename to games-emulation/dosbox/dosbox-0.74_p20160629.ebuild
index 50488ee..f638a1e 100644
--- a/games-emulation/dosbox/dosbox-3989.ebuild
+++ b/games-emulation/dosbox/dosbox-0.74_p20160629.ebuild
@@ -2,8 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
-inherit autotools eutils games
+EAPI=6
+inherit autotools eutils
 
 PATCH=3989
 DESCRIPTION="DOS emulator"
@@ -12,7 +12,7 @@ SRC_URI="mirror://gentoo/dosbox-code-0-${PATCH}-dosbox-trunk.zip"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
 IUSE="alsa debug hardened opengl"
 
 RDEPEND="alsa? ( media-libs/alsa-lib )
@@ -27,12 +27,17 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${PN}-code-0-${PATCH}-dosbox-trunk
 
+PATCHES=(
+"${FILESDIR}"/dosbox-0.74-gcc46.patch
+)
+
 src_prepare() {
+	default
 	eautoreconf
 }
 
 src_configure() {
-	egamesconf \
+	econf \
 		$(use_enable alsa alsa-midi) \
 		$(use_enable !hardened dynamic-core) \
 		$(use_enable !hardened dynamic-x86) \
@@ -44,5 +49,4 @@ src_install() {
 	default
 	make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
 	doicon src/dosbox.ico
-	prepgamesdirs
 }

diff --git a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
index 16811d4..98b4508 100644
--- a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
+++ b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
@@ -1,5 +1,5 @@
---- include/dos_inc.h.old	2011-04-28 08:46:04.505011354 +0200
-+++ include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
+--- a/include/dos_inc.h	2011-04-28 08:46:04.505011354 +0200
++++ b/include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
 @@ -21,6 +21,7 @@
  #ifndef DOSBOX_DOS_INC_H
  #define DOSBOX_DOS_INC_H


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2020-01-01 22:56 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2020-01-01 22:56 UTC (permalink / raw
  To: gentoo-commits

commit:     26934bf2b1ca06f45df3f6f51c05f6bd2196dfbe
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  1 22:36:25 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Jan  1 22:56:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26934bf2

games-emulation/dosbox: Drop old and vulnerable 0.74_p20160629-r3

Bug: https://bugs.gentoo.org/704414
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/dosbox/Manifest                    |  1 -
 .../dosbox/dosbox-0.74_p20160629-r3.ebuild         | 75 ----------------------
 .../dosbox/files/dosbox-0.74.2_events.patch        | 37 -----------
 3 files changed, 113 deletions(-)

diff --git a/games-emulation/dosbox/Manifest b/games-emulation/dosbox/Manifest
index 0d2c34d52aa..2287035a699 100644
--- a/games-emulation/dosbox/Manifest
+++ b/games-emulation/dosbox/Manifest
@@ -1,5 +1,4 @@
 DIST dosbox-0.74-3.tar.gz 1326339 BLAKE2B bc25e6aba29747d4060269809d729904d8d187527c59953125c8591c0a91cf4583223c1bcf1224a041d44bfe5efcfe9034d6572954cf26870a290ff1b27e7d9d SHA512 3770f1578e71730168fba01809585f2a05cf8c4d420524687ba28791d242faad294401bb9cd268bba725798e1db853551f274dc00a4024331f5dcef9f87f8f5f
 DIST dosbox-code-0-3989-dosbox-trunk.zip 1327592 BLAKE2B 7a9eccd381c1ce7a08d6e650d94de9e82aa5fb1b63abd23b0f42d10d95df4ca2ba4b2c319f3375e030c1578f032ee7bde528f9c4bbc27b665733f7d035865376 SHA512 625eacc1a1190d87d56713f7af54e6a7886e7666ba9f7f0b1d553c96a2eb02ec7810ac2da73d014d5ea3b69f2a7658bdd445532abe030e7f6ef85a3c20bdd3c7
 DIST dosbox-code-0-r4302-dosbox-trunk.zip 1443140 BLAKE2B 91e7c5ceb90baa09fd30cf0d8799d900d6bcd94f2b1eead8493ee276b1ee038e093fde56874c58d379218b60e1b510f1d493d72fc275f206912304312ce58d0b SHA512 57758950fd3f0440f4e4d59191a059387a0c7c4559376a2ba826537423ac63d266defe2da37be81450bfece3e0d1caa79b7097ea7fcd3cf96cd04d8899123c69
-DIST dosbox_glide-3722fc563b737d2d7933df6a771651c2154e6f7b.diff 96346 BLAKE2B c22d8897b3767b3351aec4d7bd64d201c32e2191c0520478f33973b0b36652e9770f571ea32fee6d30a4de35cae1c4d223d56af070b3f3916f6827ab47ec0585 SHA512 d2be6ee8bd1f13058c76ccae595b67f15ab87e0e36dab0d938ebbd7fc5d379f6f054d30c32ef4723b9fcdbbcea7bf0e1aa2c8b1aab1737f1d0e4d2a2df0f7714
 DIST dosbox_glide-841e1071597b64ead14dd08c25a03206b2d1d1b6.diff 96801 BLAKE2B d24d1f4262129899d807c275b1ae2d6c09056a126441665f37359302428f30576f399c4778b55f4eaec674e714d85243f576bfa3064887c5801daddc9e507aad SHA512 4cbe0ede9c4242aa346ca6c609b7a4d8e4e1d204d79d93ff741d58d3ca14e43a2e49cd696bd4bd54c13e62d1080320ee233963bac26f25bb0b4fada86e813ca2

diff --git a/games-emulation/dosbox/dosbox-0.74_p20160629-r3.ebuild b/games-emulation/dosbox/dosbox-0.74_p20160629-r3.ebuild
deleted file mode 100644
index 4223e8728e9..00000000000
--- a/games-emulation/dosbox/dosbox-0.74_p20160629-r3.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools desktop flag-o-matic
-
-PATCH=3989
-GLIDE_PATCH=3722fc563b737d2d7933df6a771651c2154e6f7b
-
-DESCRIPTION="DOS emulator"
-HOMEPAGE="https://www.dosbox.com/"
-SRC_URI="mirror://gentoo/dosbox-code-0-${PATCH}-dosbox-trunk.zip
-	glide? ( https://raw.githubusercontent.com/voyageur/openglide/${GLIDE_PATCH}/platform/dosbox/dosbox_glide.diff -> dosbox_glide-${GLIDE_PATCH}.diff )"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
-IUSE="alsa +core-inline debug glide hardened opengl X"
-
-RDEPEND="alsa? ( media-libs/alsa-lib )
-	glide? ( media-libs/openglide )
-	opengl? ( virtual/glu virtual/opengl )
-	debug? ( sys-libs/ncurses:0 )
-	X? ( x11-libs/libX11 )
-	media-libs/libpng:0=
-	media-libs/libsdl[joystick,opengl?,video,X?]
-	media-libs/sdl-net
-	media-libs/sdl-sound
-	sys-libs/zlib"
-DEPEND="${RDEPEND}
-	app-arch/unzip"
-
-S=${WORKDIR}/${PN}-code-0-${PATCH}-dosbox-trunk
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.74-gcc46.patch"
-	"${FILESDIR}/${PN}-0.74.2_events.patch"
-)
-
-src_prepare() {
-	use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff
-	default
-	eautoreconf
-}
-
-src_configure() {
-	use glide && append-cppflags -I"${EPREFIX}"/usr/include/openglide
-
-	ac_cv_lib_X11_main=$(usex X yes no) \
-	econf \
-		$(use_enable alsa alsa-midi) \
-		$(use_enable core-inline) \
-		$(use_enable !hardened dynamic-core) \
-		$(use_enable !hardened dynamic-x86) \
-		$(use_enable debug) \
-		$(use_enable opengl)
-}
-
-src_install() {
-	default
-	make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
-	doicon src/dosbox.ico
-}
-
-pkg_postinst() {
-	if use glide; then
-		elog "You have enabled unofficial Glide emulation. To use this, symlink"
-		elog "or copy ${EPREFIX}/usr/share/openglide/glide2x-dosbox.ovl to your game's"
-		elog "directory and add the following to your DOSBox configuration."
-		elog ""
-		elog "[glide]"
-		elog "glide=true"
-	fi
-}

diff --git a/games-emulation/dosbox/files/dosbox-0.74.2_events.patch b/games-emulation/dosbox/files/dosbox-0.74.2_events.patch
deleted file mode 100644
index fee09a65a4c..00000000000
--- a/games-emulation/dosbox/files/dosbox-0.74.2_events.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: src/gui/sdlmain.cpp
-===================================================================
---- a/src/gui/sdlmain.cpp	(revision 4177)
-+++ b/src/gui/sdlmain.cpp	(working copy)
-@@ -1426,6 +1426,12 @@
- #define DB_POLLSKIP 1
- #endif
- 
-+#if defined(LINUX)
-+#define SDL_XORG_FIX 1
-+#else
-+#define SDL_XORG_FIX 0
-+#endif
-+
- void GFX_Events() {
- 	//Don't poll too often. This can be heavy on the OS, especially Macs.
- 	//In idle mode 3000-4000 polls are done per second without this check.
-@@ -1449,6 +1455,19 @@
- 	}
- #endif
- 	while (SDL_PollEvent(&event)) {
-+#if SDL_XORG_FIX
-+		// Special code for broken SDL with Xorg 1.20.1, where pairs of inputfocus gain and loss events are generated
-+		// when locking the mouse in windowed mode.
-+		if (event.type == SDL_ACTIVEEVENT && event.active.state == SDL_APPINPUTFOCUS && event.active.gain == 0) {
-+			SDL_Event test; //Check if the next event would undo this one.
-+			if (SDL_PeepEvents(&test,1,SDL_PEEKEVENT,SDL_ACTIVEEVENTMASK) == 1 && test.active.state == SDL_APPINPUTFOCUS && test.active.gain == 1) {
-+				// Skip both events.
-+				SDL_PeepEvents(&test,1,SDL_GETEVENT,SDL_ACTIVEEVENTMASK);
-+				continue;
-+			}
-+		}
-+#endif
-+
- 		switch (event.type) {
- 		case SDL_ACTIVEEVENT:
- 			if (event.active.state & SDL_APPINPUTFOCUS) {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2020-01-05 20:58 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2020-01-05 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     5b2a38c07085789e66ef3301403ede20b02e0719
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  5 20:57:43 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 20:57:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b2a38c0

games-emulation/dosbox: Drop old and vulnerable 0.74_p20160629

Bug: https://bugs.gentoo.org/704414
Closes: https://bugs.gentoo.org/701688
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/dosbox/Manifest                    |  1 -
 .../dosbox/dosbox-0.74_p20160629.ebuild            | 52 ----------------------
 .../dosbox/files/dosbox-0.74-gcc46.patch           | 10 -----
 3 files changed, 63 deletions(-)

diff --git a/games-emulation/dosbox/Manifest b/games-emulation/dosbox/Manifest
index 2287035a699..b3d80b76ede 100644
--- a/games-emulation/dosbox/Manifest
+++ b/games-emulation/dosbox/Manifest
@@ -1,4 +1,3 @@
 DIST dosbox-0.74-3.tar.gz 1326339 BLAKE2B bc25e6aba29747d4060269809d729904d8d187527c59953125c8591c0a91cf4583223c1bcf1224a041d44bfe5efcfe9034d6572954cf26870a290ff1b27e7d9d SHA512 3770f1578e71730168fba01809585f2a05cf8c4d420524687ba28791d242faad294401bb9cd268bba725798e1db853551f274dc00a4024331f5dcef9f87f8f5f
-DIST dosbox-code-0-3989-dosbox-trunk.zip 1327592 BLAKE2B 7a9eccd381c1ce7a08d6e650d94de9e82aa5fb1b63abd23b0f42d10d95df4ca2ba4b2c319f3375e030c1578f032ee7bde528f9c4bbc27b665733f7d035865376 SHA512 625eacc1a1190d87d56713f7af54e6a7886e7666ba9f7f0b1d553c96a2eb02ec7810ac2da73d014d5ea3b69f2a7658bdd445532abe030e7f6ef85a3c20bdd3c7
 DIST dosbox-code-0-r4302-dosbox-trunk.zip 1443140 BLAKE2B 91e7c5ceb90baa09fd30cf0d8799d900d6bcd94f2b1eead8493ee276b1ee038e093fde56874c58d379218b60e1b510f1d493d72fc275f206912304312ce58d0b SHA512 57758950fd3f0440f4e4d59191a059387a0c7c4559376a2ba826537423ac63d266defe2da37be81450bfece3e0d1caa79b7097ea7fcd3cf96cd04d8899123c69
 DIST dosbox_glide-841e1071597b64ead14dd08c25a03206b2d1d1b6.diff 96801 BLAKE2B d24d1f4262129899d807c275b1ae2d6c09056a126441665f37359302428f30576f399c4778b55f4eaec674e714d85243f576bfa3064887c5801daddc9e507aad SHA512 4cbe0ede9c4242aa346ca6c609b7a4d8e4e1d204d79d93ff741d58d3ca14e43a2e49cd696bd4bd54c13e62d1080320ee233963bac26f25bb0b4fada86e813ca2

diff --git a/games-emulation/dosbox/dosbox-0.74_p20160629.ebuild b/games-emulation/dosbox/dosbox-0.74_p20160629.ebuild
deleted file mode 100644
index a7b41d8d34e..00000000000
--- a/games-emulation/dosbox/dosbox-0.74_p20160629.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools desktop
-
-PATCH=3989
-DESCRIPTION="DOS emulator"
-HOMEPAGE="http://dosbox.sourceforge.net/"
-SRC_URI="mirror://gentoo/dosbox-code-0-${PATCH}-dosbox-trunk.zip"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ppc64 x86"
-IUSE="alsa debug hardened opengl"
-
-RDEPEND="alsa? ( media-libs/alsa-lib )
-	opengl? ( virtual/glu virtual/opengl )
-	debug? ( sys-libs/ncurses:0 )
-	media-libs/libpng:0
-	media-libs/libsdl[joystick,video,X]
-	media-libs/sdl-net
-	media-libs/sdl-sound"
-DEPEND="${RDEPEND}
-	app-arch/unzip"
-
-S=${WORKDIR}/${PN}-code-0-${PATCH}-dosbox-trunk
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.74-gcc46.patch
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_enable alsa alsa-midi) \
-		$(use_enable !hardened dynamic-core) \
-		$(use_enable !hardened dynamic-x86) \
-		$(use_enable debug) \
-		$(use_enable opengl)
-}
-
-src_install() {
-	default
-	make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
-	doicon src/dosbox.ico
-}

diff --git a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
deleted file mode 100644
index 98b4508f519..00000000000
--- a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/include/dos_inc.h	2011-04-28 08:46:04.505011354 +0200
-+++ b/include/dos_inc.h	2011-04-28 08:46:27.104408178 +0200
-@@ -21,6 +21,7 @@
- #ifndef DOSBOX_DOS_INC_H
- #define DOSBOX_DOS_INC_H
- 
-+#include <cstddef>
- #ifndef DOSBOX_DOS_SYSTEM_H
- #include "dos_system.h"
- #endif


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2020-06-06  8:47 Sergei Trofimovich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei Trofimovich @ 2020-06-06  8:47 UTC (permalink / raw
  To: gentoo-commits

commit:     680f0c670f44a3ff27ae623441ab453256283725
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  6 08:46:55 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jun  6 08:47:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=680f0c67

games-emulation/dosbox: respect user's AR

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/724412
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 games-emulation/dosbox/dosbox-0.75_pre4302.ebuild        |  1 +
 games-emulation/dosbox/files/dosbox-0.75-detect-AR.patch | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild b/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
index 4a25d8ebdb4..fd00727100c 100644
--- a/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
+++ b/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
@@ -51,6 +51,7 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.74-ncurses.patch
+	"${FILESDIR}"/${PN}-0.75-detect-AR.patch
 )
 
 src_prepare() {

diff --git a/games-emulation/dosbox/files/dosbox-0.75-detect-AR.patch b/games-emulation/dosbox/files/dosbox-0.75-detect-AR.patch
new file mode 100644
index 00000000000..c403d8e8983
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.75-detect-AR.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/724412
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,6 +18,7 @@ AC_PROG_CPP
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AM_PROG_AR
+ 
+ dnl Some needed libaries for OS2
+ dnl perharps join this with the other target depended checks. move them upwards


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2021-02-14 12:21 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2021-02-14 12:21 UTC (permalink / raw
  To: gentoo-commits

commit:     da178bdead5d0db0310504d979ebeac17377f81c
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 12:21:09 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 12:21:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da178bde

games-emulation/dosbox: Update ncurses patch for latest trunk

Closes: https://bugs.gentoo.org/760642
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/dosbox/dosbox-9999.ebuild          |  4 +-
 .../dosbox/files/dosbox-0.75-ncurses.patch         | 78 ++++++++++++++++++++++
 2 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/games-emulation/dosbox/dosbox-9999.ebuild b/games-emulation/dosbox/dosbox-9999.ebuild
index 3292eebd77d..e9aadb1e2ef 100644
--- a/games-emulation/dosbox/dosbox-9999.ebuild
+++ b/games-emulation/dosbox/dosbox-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -50,7 +50,7 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-0.74-ncurses.patch
+	"${FILESDIR}"/${PN}-0.75-ncurses.patch
 )
 
 src_prepare() {

diff --git a/games-emulation/dosbox/files/dosbox-0.75-ncurses.patch b/games-emulation/dosbox/files/dosbox-0.75-ncurses.patch
new file mode 100644
index 00000000000..67c23c70532
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.75-ncurses.patch
@@ -0,0 +1,78 @@
+https://sourceforge.net/p/dosbox/patches/286/
+
+--- a/configure.ac	2019-11-12 17:55:51.000000000 +0000
++++ b/configure.ac	2020-01-02 21:26:27.551856431 +0000
+@@ -235,39 +235,41 @@
+ #Features to enable/disable
+ AH_TEMPLATE(C_DEBUG,[Define to 1 to enable internal debugger, requires libcurses])
+ AH_TEMPLATE(C_HEAVY_DEBUG,[Define to 1 to enable heavy debugging, also have to enable C_DEBUG])
+-AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[Enable debug mode]),[
+-   AC_CHECK_HEADER(curses.h,have_curses_h=yes,)
+-   AC_CHECK_LIB(curses, initscr, have_curses_lib=yes, , )
+-   AC_CHECK_LIB(ncurses, initscr, have_ncurses_lib=yes, , )
+-   AC_CHECK_LIB(pdcurses, initscr, have_pdcurses_lib=yes, , )
++AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[Enable debug mode]),,enable_debug=no)
++AC_MSG_CHECKING(whether debug will be enabled)
++  
++if test x$enable_debug = xno; then
++  AC_MSG_RESULT(no)
++else
++  AC_MSG_RESULT(yes)
+ 
+-   if test x$enable_debug = xno; then
+-     AC_MSG_RESULT([Debugger not enabled])
+-   elif test x$have_ncurses_lib = xyes -a x$have_curses_h = xyes ; then
+-     LIBS="$LIBS -lncurses"
+-     if test x$host = xi386-pc-os2-emx ; then
+-     	LIBS="$LIBS -ltinfo"
+-     fi
+-     AC_DEFINE(C_DEBUG,1)
+-     if test x$enable_debug = xheavy ; then 
+-       AC_DEFINE(C_HEAVY_DEBUG,1)
+-     fi
+-   elif test x$have_curses_lib = xyes -a x$have_curses_h = xyes ; then
+-     LIBS="$LIBS -lcurses"
+-     AC_DEFINE(C_DEBUG,1)
+-     if test x$enable_debug = xheavy ; then 
+-       AC_DEFINE(C_HEAVY_DEBUG,1)
+-     fi
+-   elif test x$have_pdcurses_lib = xyes -a x$have_curses_h = xyes ; then
+-     LIBS="$LIBS -lpdcurses"
+-     AC_DEFINE(C_DEBUG,1)
+-     if test x$enable_debug = xheavy ; then 
+-       AC_DEFINE(C_HEAVY_DEBUG,1)
+-     fi
+-   else 
+-     AC_MSG_ERROR([Can't find curses, which is required for debug mode])
+-   fi
+-],)
++  PKG_CHECK_MODULES(NCURSES, ncurses, [
++    LIBS="$LIBS $NCURSES_LIBS"; CFLAGS="$CFLAGS $NCURSES_CFLAGS"
++  ], [
++    AC_CHECK_HEADER(curses.h,have_curses_h=yes,)
++    AC_CHECK_LIB(curses, initscr, have_curses_lib=yes, , )
++    AC_CHECK_LIB(ncurses, initscr, have_ncurses_lib=yes, , )
++    AC_CHECK_LIB(pdcurses, initscr, have_pdcurses_lib=yes, , )
++
++    if test x$have_ncurses_lib = xyes -a x$have_curses_h = xyes ; then
++      LIBS="$LIBS -lncurses"
++      if test x$host = xi386-pc-os2-emx ; then
++        LIBS="$LIBS -ltinfo"
++      fi
++    elif test x$have_curses_lib = xyes -a x$have_curses_h = xyes ; then
++      LIBS="$LIBS -lcurses"
++    elif test x$have_pdcurses_lib = xyes -a x$have_curses_h = xyes ; then
++      LIBS="$LIBS -lpdcurses"
++    else 
++      AC_MSG_ERROR([Can't find curses, which is required for debug mode])
++    fi
++  ])
++
++  AC_DEFINE(C_DEBUG,1)
++  if test x$enable_debug = xheavy; then 
++    AC_DEFINE(C_HEAVY_DEBUG,1)
++  fi
++fi
+ 
+ AH_TEMPLATE(C_CORE_INLINE,[Define to 1 to use inlined memory functions in cpu core])
+ AC_ARG_ENABLE(core-inline,AC_HELP_STRING([--disable-core-inline],[Disable inlined memory handling in CPU Core]),,enable_core_inline=yes)


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/
@ 2021-10-26 12:12 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2021-10-26 12:12 UTC (permalink / raw
  To: gentoo-commits

commit:     1fb68a666be96f0ceaedd843d4c5437fab14e1a5
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 26 12:11:29 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 26 12:11:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fb68a66

games-emulation/dosbox: Fix 0.75_pre4302 with USE="-alsa glide"

Closes: https://bugs.gentoo.org/780015
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/dosbox/dosbox-0.75_pre4302.ebuild      |  2 +-
 .../dosbox/files/dosbox-0.75-glide-libdl.patch         | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild b/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
index 8ae6d980d50..4cf2a4a4d98 100644
--- a/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
+++ b/games-emulation/dosbox/dosbox-0.75_pre4302.ebuild
@@ -54,7 +54,7 @@ PATCHES=(
 )
 
 src_prepare() {
-	use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff
+	use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff "${FILESDIR}"/${PN}-0.75-glide-libdl.patch
 	default
 	eautoreconf
 }

diff --git a/games-emulation/dosbox/files/dosbox-0.75-glide-libdl.patch b/games-emulation/dosbox/files/dosbox-0.75-glide-libdl.patch
new file mode 100644
index 00000000000..524c5839672
--- /dev/null
+++ b/games-emulation/dosbox/files/dosbox-0.75-glide-libdl.patch
@@ -0,0 +1,18 @@
+https://github.com/voyageur/openglide/pull/25
+
+diff -Naur dosbox.orig/configure.ac dosbox/configure.ac
+--- dosbox.orig/configure.ac	2021-10-26 13:06:35.585761330 +0100
++++ dosbox/configure.ac	2021-10-26 13:07:31.641323631 +0100
+@@ -20,6 +20,12 @@
+ AC_PROG_RANLIB
+ AM_PROG_AR
+
++dnl The dlopen() function is in the C library for *BSD and in
++dnl libdl on GLIBC-based systems
++AC_SEARCH_LIBS([dlopen], [dl dld], [], [
++  AC_MSG_ERROR([unable to find the dlopen() function])
++])
++
+ dnl Some needed libaries for OS2
+ dnl perharps join this with the other target depended checks. move them upwards
+ if test x$host = xi386-pc-os2-emx ; then


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-26 12:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-05 20:58 [gentoo-commits] repo/gentoo:master commit in: games-emulation/dosbox/files/, games-emulation/dosbox/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26 12:12 James Le Cuirot
2021-02-14 12:21 James Le Cuirot
2020-06-06  8:47 Sergei Trofimovich
2020-01-01 22:56 James Le Cuirot
2016-06-29 20:14 William Hubbs
2016-06-28 14:51 Michael Sterrett
2016-06-28  8:22 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox