[packages/Atari800] - added romdir patch (don't scan PWD and /usr/bin, just /usr/share/atari800 and ~/.atari800) - BR: l

qboosh qboosh at pld-linux.org
Wed Jan 13 21:31:00 CET 2021


commit b5c8cf13e555bf2cefd9a0ba51935d7e6f3d0731
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jan 13 21:31:05 2021 +0100

    - added romdir patch (don't scan PWD and /usr/bin, just /usr/share/atari800 and ~/.atari800)
    - BR: libpng-devel, readline-devel

 Atari800-romdir.patch | 37 +++++++++++++++++++++++++++++++++++++
 Atari800.spec         |  6 +++++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/Atari800.spec b/Atari800.spec
index 33757c2..5912731 100644
--- a/Atari800.spec
+++ b/Atari800.spec
@@ -9,9 +9,12 @@ Group:		Applications/Emulators
 Source0:	https://github.com/atari800/atari800/releases/download/ATARI800_4_2_0/atari800-%{version}-src.tgz
 # Source0-md5:	695031b9bc3461cd18ec9090779d984b
 Source1:	%{name}-chooser
+Patch0:		%{name}-romdir.patch
 URL:		https://atari800.github.io/
-BuildRequires:	SDL-devel
+BuildRequires:	SDL-devel >= 1.2
 BuildRequires:	automake
+BuildRequires:	libpng-devel
+BuildRequires:	readline-devel
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXext-devel
 BuildRequires:	zlib-devel
@@ -85,6 +88,7 @@ obsługą dźwięku i joysticka.
 
 %prep
 %setup -q -n atari800-%{version}
+%patch0 -p1
 
 %build
 cp -f /usr/share/automake/config.sub .
diff --git a/Atari800-romdir.patch b/Atari800-romdir.patch
new file mode 100644
index 0000000..a894a2d
--- /dev/null
+++ b/Atari800-romdir.patch
@@ -0,0 +1,37 @@
+--- atari800-4.2.0/src/atari.c.orig	2019-12-28 18:00:29.000000000 +0100
++++ atari800-4.2.0/src/atari.c	2021-01-13 19:52:18.770209441 +0100
+@@ -423,24 +423,19 @@
+ 	/* try to find ROM images if the configuration file is not found
+ 	   or it does not specify some ROM paths (blank paths count as specified) */
+ #ifndef ANDROID
+-	SYSROM_FindInDir(".", TRUE); /* current directory */
+ #if defined(unix) || defined(__unix__) || defined(__linux__)
+ 	SYSROM_FindInDir("/usr/share/atari800", TRUE);
++#else
++	SYSROM_FindInDir(".", TRUE); /* current directory */
+ #endif
+-	if (*argc > 0 && argv[0] != NULL) {
+-		char atari800_exe_dir[FILENAME_MAX];
+-		char atari800_exe_rom_dir[FILENAME_MAX];
+-		/* the directory of the Atari800 program */
+-		Util_splitpath(argv[0], atari800_exe_dir, NULL);
+-		SYSROM_FindInDir(atari800_exe_dir, TRUE);
+-		/* "rom" and "ROM" subdirectories of this directory */
+-		Util_catpath(atari800_exe_rom_dir, atari800_exe_dir, "rom");
+-		SYSROM_FindInDir(atari800_exe_rom_dir, TRUE);
+-/* skip "ROM" on systems that are known to be case-insensitive */
+-#if !defined(DJGPP) && !defined(HAVE_WINDOWS_H)
+-		Util_catpath(atari800_exe_rom_dir, atari800_exe_dir, "ROM");
+-		SYSROM_FindInDir(atari800_exe_rom_dir, TRUE);
+-#endif
++	{
++		char rom_dir[FILENAME_MAX];
++		char *home = getenv("HOME");
++		if (home != NULL)
++			Util_catpath(rom_dir, home, ".atari800");
++		else
++			strcpy(rom_dir, ".atari800");
++		SYSROM_FindInDir(rom_dir, TRUE);
+ 	}
+ #endif /* ANDROID */
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Atari800.git/commitdiff/b5c8cf13e555bf2cefd9a0ba51935d7e6f3d0731



More information about the pld-cvs-commit mailing list