1 |
commit: a87623b1beff702e5f50319a28b3a7cbf5eca2b6 |
2 |
Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 28 14:49:48 2016 +0000 |
4 |
Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 14:49:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a87623b1 |
7 |
|
8 |
Revert "games-emulation/dosbox: fix compiling with clang (#449060)" |
9 |
|
10 |
This reverts commit 143e036505e2b27b1aa5037d52a5f999391b4168. |
11 |
|
12 |
games-emulation/dosbox/dosbox-0.74-r1.ebuild | 51 ------- |
13 |
.../dosbox/files/dosbox-0.74-clang.patch | 48 ------- |
14 |
.../dosbox/files/dosbox-0.74-gcc46.patch | 4 +- |
15 |
.../dosbox/files/dosbox-0.74-wine-drive-z.patch | 151 --------------------- |
16 |
.../dosbox/files/dosbox-0.74-wine-filenames.patch | 89 ------------ |
17 |
5 files changed, 2 insertions(+), 341 deletions(-) |
18 |
|
19 |
diff --git a/games-emulation/dosbox/dosbox-0.74-r1.ebuild b/games-emulation/dosbox/dosbox-0.74-r1.ebuild |
20 |
deleted file mode 100644 |
21 |
index 80989ea..0000000 |
22 |
--- a/games-emulation/dosbox/dosbox-0.74-r1.ebuild |
23 |
+++ /dev/null |
24 |
@@ -1,51 +0,0 @@ |
25 |
-# Copyright 1999-2016 Gentoo Foundation |
26 |
-# Distributed under the terms of the GNU General Public License v2 |
27 |
-# $Id$ |
28 |
- |
29 |
-EAPI=5 |
30 |
-inherit eutils games |
31 |
- |
32 |
-DESCRIPTION="DOS emulator" |
33 |
-HOMEPAGE="http://dosbox.sourceforge.net/" |
34 |
-SRC_URI="mirror://sourceforge/dosbox/${P}.tar.gz" |
35 |
- |
36 |
-LICENSE="GPL-2" |
37 |
-SLOT="0" |
38 |
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" |
39 |
-IUSE="alsa debug hardened opengl" |
40 |
- |
41 |
-DEPEND="alsa? ( media-libs/alsa-lib ) |
42 |
- debug? ( sys-libs/ncurses:0 ) |
43 |
- opengl? ( virtual/glu virtual/opengl ) |
44 |
- media-libs/libpng:0 |
45 |
- media-libs/libsdl[joystick,video,X] |
46 |
- media-libs/sdl-net |
47 |
- media-libs/sdl-sound" |
48 |
-RDEPEND=${DEPEND} |
49 |
- |
50 |
-PATCHES=( |
51 |
- "${FILESDIR}"/${P}-clang.patch |
52 |
- "${FILESDIR}"/${P}-gcc46.patch |
53 |
- "${FILESDIR}"/${P}-wine-drive-z.patch |
54 |
- "${FILESDIR}"/${P}-wine-filenames.patch |
55 |
-) |
56 |
- |
57 |
-src_prepare() { |
58 |
- epatch -p1 "${PATCHES[@]}" |
59 |
-} |
60 |
- |
61 |
-src_configure() { |
62 |
- egamesconf \ |
63 |
- $(use_enable alsa alsa-midi) \ |
64 |
- $(use_enable !hardened dynamic-core) \ |
65 |
- $(use_enable !hardened dynamic-x86) \ |
66 |
- $(use_enable debug) \ |
67 |
- $(use_enable opengl) |
68 |
-} |
69 |
- |
70 |
-src_install() { |
71 |
- default |
72 |
- make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico |
73 |
- doicon src/dosbox.ico |
74 |
- prepgamesdirs |
75 |
-} |
76 |
|
77 |
diff --git a/games-emulation/dosbox/files/dosbox-0.74-clang.patch b/games-emulation/dosbox/files/dosbox-0.74-clang.patch |
78 |
deleted file mode 100644 |
79 |
index df2923f..0000000 |
80 |
--- a/games-emulation/dosbox/files/dosbox-0.74-clang.patch |
81 |
+++ /dev/null |
82 |
@@ -1,48 +0,0 @@ |
83 |
-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=449060 |
84 |
- |
85 |
-Two backports from Dosbox SVN needed for clang support: |
86 |
-src/fpu/fpu_instructions_x86.h changes are revision 3841 |
87 |
-src/cpu/core_dynrec/risc_x64.h changes are revision 3894 |
88 |
- |
89 |
-Index: src/fpu/fpu_instructions_x86.h |
90 |
-=================================================================== |
91 |
---- a/src/fpu/fpu_instructions_x86.h (revision 3840) |
92 |
-+++ b/src/fpu/fpu_instructions_x86.h (revision 3841) |
93 |
-@@ -1161,12 +1161,12 @@ |
94 |
- |
95 |
- static void FPU_FLD_I16(PhysPt addr,Bitu store_to) { |
96 |
- fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr); |
97 |
-- FPUD_LOAD(fild,WORD,) |
98 |
-+ FPUD_LOAD(fild,WORD,s) |
99 |
- } |
100 |
- |
101 |
- static void FPU_FLD_I16_EA(PhysPt addr) { |
102 |
- fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr); |
103 |
-- FPUD_LOAD_EA(fild,WORD,) |
104 |
-+ FPUD_LOAD_EA(fild,WORD,s) |
105 |
- } |
106 |
- |
107 |
- static void FPU_FLD_I32(PhysPt addr,Bitu store_to) { |
108 |
-@@ -1211,7 +1211,7 @@ |
109 |
- } |
110 |
- |
111 |
- static void FPU_FST_I16(PhysPt addr) { |
112 |
-- FPUD_STORE(fistp,WORD,) |
113 |
-+ FPUD_STORE(fistp,WORD,s) |
114 |
- mem_writew(addr,(Bit16u)fpu.p_regs[8].m1); |
115 |
- } |
116 |
- |
117 |
-Index: src/cpu/core_dynrec/risc_x64.h |
118 |
-=================================================================== |
119 |
---- a/src/cpu/core_dynrec/risc_x64.h (revision 3893) |
120 |
-+++ b/src/cpu/core_dynrec/risc_x64.h (revision 3894) |
121 |
-@@ -85,7 +85,8 @@ |
122 |
- |
123 |
- static INLINE void gen_reg_memaddr(HostReg reg,void* data) { |
124 |
- Bit64s diff = (Bit64s)data-((Bit64s)cache.pos+5); |
125 |
-- if ((diff<0x80000000LL) && (diff>-0x80000000LL)) { |
126 |
-+// if ((diff<0x80000000LL) && (diff>-0x80000000LL)) { //clang messes itself up on this... |
127 |
-+ if ( (diff>>63) == (diff>>31) ) { //signed bit extend, test to see if value fits in a Bit32s |
128 |
- cache_addb(0x05+(reg<<3)); |
129 |
- // RIP-relative addressing is offset after the instruction |
130 |
- cache_addd((Bit32u)(((Bit64u)diff)&0xffffffffLL)); |
131 |
|
132 |
diff --git a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch |
133 |
index 54cd51b..16811d4 100644 |
134 |
--- a/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch |
135 |
+++ b/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch |
136 |
@@ -1,5 +1,5 @@ |
137 |
---- a/include/dos_inc.h.old 2011-04-28 08:46:04.505011354 +0200 |
138 |
-+++ b/include/dos_inc.h 2011-04-28 08:46:27.104408178 +0200 |
139 |
+--- include/dos_inc.h.old 2011-04-28 08:46:04.505011354 +0200 |
140 |
++++ include/dos_inc.h 2011-04-28 08:46:27.104408178 +0200 |
141 |
@@ -21,6 +21,7 @@ |
142 |
#ifndef DOSBOX_DOS_INC_H |
143 |
#define DOSBOX_DOS_INC_H |
144 |
|
145 |
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 |
146 |
deleted file mode 100644 |
147 |
index 848d3e7..0000000 |
148 |
--- a/games-emulation/dosbox/files/dosbox-0.74-wine-drive-z.patch |
149 |
+++ /dev/null |
150 |
@@ -1,151 +0,0 @@ |
151 |
-From Debian (which backported the patch): |
152 |
-https://packages.debian.org/sid/dosbox |
153 |
- |
154 |
-Description: Rewrite mount without arguments to display volume label as well. |
155 |
- Some refactoring of the code. |
156 |
- Add mount -z X, where X is the new virtual drive for the Wine Team. |
157 |
-Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3736/ |
158 |
-Author: Peter Veenstra <qbix79@×××××××××××××××××.net> |
159 |
-Last-Update: 2011-07-23 |
160 |
---- a/src/dos/dos_programs.cpp |
161 |
-+++ b/src/dos/dos_programs.cpp |
162 |
-@@ -49,27 +49,55 @@ |
163 |
- #endif |
164 |
- |
165 |
- void MSCDEX_SetCDInterface(int intNr, int forceCD); |
166 |
-- |
167 |
-+static Bitu ZDRIVE_NUM = 25; |
168 |
- |
169 |
- class MOUNT : public Program { |
170 |
- public: |
171 |
-- void Run(void) |
172 |
-- { |
173 |
-+ void ListMounts(void) { |
174 |
-+ char name[DOS_NAMELENGTH_ASCII];Bit32u size;Bit16u date;Bit16u time;Bit8u attr; |
175 |
-+ /* Command uses dta so set it to our internal dta */ |
176 |
-+ RealPt save_dta = dos.dta(); |
177 |
-+ dos.dta(dos.tables.tempdta); |
178 |
-+ DOS_DTA dta(dos.dta()); |
179 |
-+ |
180 |
-+ WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1")); |
181 |
-+ WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),"Drive","Type","Label"); |
182 |
-+ for(int p = 0;p < 8;p++) WriteOut("----------"); |
183 |
-+ |
184 |
-+ for (int d = 0;d < DOS_DRIVES;d++) { |
185 |
-+ if (!Drives[d]) continue; |
186 |
-+ |
187 |
-+ char root[4] = {'A'+d,':','\\',0}; |
188 |
-+ bool ret = DOS_FindFirst(root,DOS_ATTR_VOLUME); |
189 |
-+ if (ret) { |
190 |
-+ dta.GetResult(name,size,date,time,attr); |
191 |
-+ DOS_FindNext(); //Mark entry as invalid |
192 |
-+ } else name[0] = 0; |
193 |
-+ |
194 |
-+ /* Change 8.3 to 11.0 */ |
195 |
-+ char* dot = strchr(name,'.'); |
196 |
-+ if(dot && (dot - name == 8) ) { |
197 |
-+ name[8] = name[9];name[9] = name[10];name[10] = name[11];name[11] = 0; |
198 |
-+ } |
199 |
-+ |
200 |
-+ root[1] = 0; //This way, the format string can be reused. |
201 |
-+ WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),root, Drives[d]->GetInfo(),name); |
202 |
-+ } |
203 |
-+ dos.dta(save_dta); |
204 |
-+ } |
205 |
-+ |
206 |
-+ void Run(void) { |
207 |
- DOS_Drive * newdrive;char drive; |
208 |
- std::string label; |
209 |
- std::string umount; |
210 |
-+ std::string newz; |
211 |
- |
212 |
- //Hack To allow long commandlines |
213 |
- ChangeToLongCmd(); |
214 |
- /* Parse the command line */ |
215 |
- /* if the command line is empty show current mounts */ |
216 |
- if (!cmd->GetCount()) { |
217 |
-- WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1")); |
218 |
-- for (int d=0;d<DOS_DRIVES;d++) { |
219 |
-- if (Drives[d]) { |
220 |
-- WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),d+'A',Drives[d]->GetInfo()); |
221 |
-- } |
222 |
-- } |
223 |
-+ ListMounts(); |
224 |
- return; |
225 |
- } |
226 |
- |
227 |
-@@ -84,12 +112,12 @@ |
228 |
- if (cmd->FindString("-u",umount,false)) { |
229 |
- umount[0] = toupper(umount[0]); |
230 |
- int i_drive = umount[0]-'A'; |
231 |
-- if(i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) { |
232 |
-+ if (i_drive < DOS_DRIVES && i_drive >= 0 && Drives[i_drive]) { |
233 |
- switch (DriveManager::UnmountDrive(i_drive)) { |
234 |
- case 0: |
235 |
- Drives[i_drive] = 0; |
236 |
- if(i_drive == DOS_GetDefaultDrive()) |
237 |
-- DOS_SetDrive(toupper('Z') - 'A'); |
238 |
-+ DOS_SetDrive(ZDRIVE_NUM); |
239 |
- WriteOut(MSG_Get("PROGRAM_MOUNT_UMOUNT_SUCCESS"),umount[0]); |
240 |
- break; |
241 |
- case 1: |
242 |
-@@ -104,8 +132,46 @@ |
243 |
- } |
244 |
- return; |
245 |
- } |
246 |
-- |
247 |
-- // Show list of cdroms |
248 |
-+ |
249 |
-+ /* Check for moving Z: */ |
250 |
-+ /* Only allowing moving it once. It is merely a convenience added for the wine team */ |
251 |
-+ if (ZDRIVE_NUM == 25 && cmd->FindString("-z", newz,false)) { |
252 |
-+ newz[0] = toupper(newz[0]); |
253 |
-+ int i_newz = newz[0] - 'A'; |
254 |
-+ if (i_newz >= 0 && i_newz < DOS_DRIVES-1 && !Drives[i_newz]) { |
255 |
-+ ZDRIVE_NUM = i_newz; |
256 |
-+ /* remap drives */ |
257 |
-+ Drives[i_newz] = Drives[25]; |
258 |
-+ Drives[25] = 0; |
259 |
-+ DOS_Shell *fs = static_cast<DOS_Shell *>(first_shell); //dynamic ? |
260 |
-+ /* Update environment */ |
261 |
-+ std::string line = ""; |
262 |
-+ char ppp[2] = {newz[0],0}; |
263 |
-+ std::string tempenv = ppp; tempenv += ":\\"; |
264 |
-+ if (fs->GetEnvStr("PATH",line)){ |
265 |
-+ std::string::size_type idx = line.find('='); |
266 |
-+ std::string value = line.substr(idx +1 , std::string::npos); |
267 |
-+ while ( (idx = value.find("Z:\\")) != std::string::npos || |
268 |
-+ (idx = value.find("z:\\")) != std::string::npos ) |
269 |
-+ value.replace(idx,3,tempenv); |
270 |
-+ line = value; |
271 |
-+ } |
272 |
-+ if (!line.size()) line = tempenv; |
273 |
-+ fs->SetEnv("PATH",line.c_str()); |
274 |
-+ tempenv += "COMMAND.COM"; |
275 |
-+ fs->SetEnv("COMSPEC",tempenv.c_str()); |
276 |
-+ |
277 |
-+ /* Update batch file if running from Z: (very likely: autoexec) */ |
278 |
-+ if(fs->bf) { |
279 |
-+ std::string &name = fs->bf->filename; |
280 |
-+ if(name.length() >2 && name[0] == 'Z' && name[1] == ':') name[0] = newz[0]; |
281 |
-+ } |
282 |
-+ /* Change the active drive */ |
283 |
-+ if (DOS_GetDefaultDrive() == 25) DOS_SetDrive(i_newz); |
284 |
-+ } |
285 |
-+ return; |
286 |
-+ } |
287 |
-+ /* Show list of cdroms */ |
288 |
- if (cmd->FindExist("-cd",false)) { |
289 |
- int num = SDL_CDNumDrives(); |
290 |
- WriteOut(MSG_Get("PROGRAM_MOUNT_CDROMS_FOUND"),num); |
291 |
-@@ -1347,8 +1413,9 @@ |
292 |
- /*Add Messages */ |
293 |
- |
294 |
- MSG_Add("PROGRAM_MOUNT_CDROMS_FOUND","CDROMs found: %d\n"); |
295 |
-+ MSG_Add("PROGRAM_MOUNT_STATUS_FORMAT","%-5s %-58s %-12s\n"); |
296 |
- MSG_Add("PROGRAM_MOUNT_STATUS_2","Drive %c is mounted as %s\n"); |
297 |
-- MSG_Add("PROGRAM_MOUNT_STATUS_1","Current mounted drives are:\n"); |
298 |
-+ MSG_Add("PROGRAM_MOUNT_STATUS_1","The currently mounted drives are:\n"); |
299 |
- MSG_Add("PROGRAM_MOUNT_ERROR_1","Directory %s doesn't exist.\n"); |
300 |
- MSG_Add("PROGRAM_MOUNT_ERROR_2","%s isn't a directory\n"); |
301 |
- MSG_Add("PROGRAM_MOUNT_ILL_TYPE","Illegal type %s\n"); |
302 |
|
303 |
diff --git a/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch b/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch |
304 |
deleted file mode 100644 |
305 |
index 89e2433..0000000 |
306 |
--- a/games-emulation/dosbox/files/dosbox-0.74-wine-filenames.patch |
307 |
+++ /dev/null |
308 |
@@ -1,89 +0,0 @@ |
309 |
-Description: Be friendly for other open source projects: work with WINE style namemangling. |
310 |
- Patch 3382938 from Andre_H (modified). |
311 |
-Origin: upstream, http://sourceforge.net/p/dosbox/code-0/3743/ |
312 |
-Author: Peter Veenstra <qbix79@×××××××××××××××××.net> |
313 |
-Last-Update: 2011-08-30 |
314 |
---- a/src/dos/drive_cache.cpp |
315 |
-+++ b/src/dos/drive_cache.cpp |
316 |
-@@ -370,6 +370,60 @@ |
317 |
- return false; |
318 |
- } |
319 |
- |
320 |
-+#define WINE_DRIVE_SUPPORT 1 |
321 |
-+#if WINE_DRIVE_SUPPORT |
322 |
-+//Changes to interact with WINE by supporting their namemangling. |
323 |
-+//The code is rather slow, because orglist is unordered, so it needs to be avoided if possible. |
324 |
-+//Hence the tests in GetLongFileName |
325 |
-+ |
326 |
-+ |
327 |
-+// From the Wine project |
328 |
-+static Bits wine_hash_short_file_name( char* name, char* buffer ) |
329 |
-+{ |
330 |
-+ static const char hash_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"; |
331 |
-+ static const char invalid_chars[] = { '*','?','<','>','|','"','+','=',',',';','[',']',' ','\345','~','.',0 }; |
332 |
-+ char* p; |
333 |
-+ char* ext; |
334 |
-+ char* end = name + strlen(name); |
335 |
-+ char* dst; |
336 |
-+ unsigned short hash; |
337 |
-+ int i; |
338 |
-+ |
339 |
-+ // Compute the hash code of the file name |
340 |
-+ for (p = name, hash = 0xbeef; p < end - 1; p++) |
341 |
-+ hash = (hash<<3) ^ (hash>>5) ^ tolower(*p) ^ (tolower(p[1]) << 8); |
342 |
-+ hash = (hash<<3) ^ (hash>>5) ^ tolower(*p); // Last character |
343 |
-+ |
344 |
-+ |
345 |
-+ // Find last dot for start of the extension |
346 |
-+ for (p = name + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p; |
347 |
-+ |
348 |
-+ // Copy first 4 chars, replacing invalid chars with '_' |
349 |
-+ for (i = 4, p = name, dst = buffer; i > 0; i--, p++) |
350 |
-+ { |
351 |
-+ if (p == end || p == ext) break; |
352 |
-+ *dst++ = (*p < 0 || strchr( invalid_chars, *p ) != NULL) ? '_' : toupper(*p); |
353 |
-+ } |
354 |
-+ // Pad to 5 chars with '~' |
355 |
-+ while (i-- >= 0) *dst++ = '~'; |
356 |
-+ |
357 |
-+ // Insert hash code converted to 3 ASCII chars |
358 |
-+ *dst++ = hash_chars[(hash >> 10) & 0x1f]; |
359 |
-+ *dst++ = hash_chars[(hash >> 5) & 0x1f]; |
360 |
-+ *dst++ = hash_chars[hash & 0x1f]; |
361 |
-+ |
362 |
-+ // Copy the first 3 chars of the extension (if any) |
363 |
-+ if (ext) |
364 |
-+ { |
365 |
-+ *dst++ = '.'; |
366 |
-+ for (i = 3, ext++; (i > 0) && ext < end; i--, ext++) |
367 |
-+ *dst++ = (*ext < 0 || strchr( invalid_chars, *ext ) != NULL) ? '_' : toupper(*ext); |
368 |
-+ } |
369 |
-+ |
370 |
-+ return dst - buffer; |
371 |
-+} |
372 |
-+#endif |
373 |
-+ |
374 |
- Bits DOS_Drive_Cache::GetLongName(CFileInfo* curDir, char* shortName) { |
375 |
- std::vector<CFileInfo*>::size_type filelist_size = curDir->fileList.size(); |
376 |
- if (GCC_UNLIKELY(filelist_size<=0)) return -1; |
377 |
-@@ -390,6 +444,20 @@ |
378 |
- return mid; |
379 |
- }; |
380 |
- } |
381 |
-+#ifdef WINE_DRIVE_SUPPORT |
382 |
-+ if (strlen(shortName) < 8 || shortName[4] != '~' || shortName[5] == '.' || shortName[6] == '.' || shortName[7] == '.') return -1; // not available |
383 |
-+ // else it's most likely a Wine style short name ABCD~###, # = not dot (length at least 8) |
384 |
-+ // The above test is rather strict as the following loop can be really slow if filelist_size is large. |
385 |
-+ char buff[CROSS_LEN]; |
386 |
-+ for (Bits i = 0; i < filelist_size; i++) { |
387 |
-+ res = wine_hash_short_file_name(curDir->fileList[i]->orgname,buff); |
388 |
-+ if (!strncmp(shortName,buff,res)) |
389 |
-+ { // Found |
390 |
-+ strcpy(shortName,curDir->fileList[i]->orgname); |
391 |
-+ return i; |
392 |
-+ }; |
393 |
-+ } |
394 |
-+#endif |
395 |
- // not available |
396 |
- return -1; |
397 |
- } |