]> git.pld-linux.org Git - packages/Atari800.git/commitdiff
- added romdir patch (don't scan PWD and /usr/bin, just /usr/share/atari800 and ...
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 13 Jan 2021 20:31:05 +0000 (21:31 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 13 Jan 2021 20:31:05 +0000 (21:31 +0100)
- BR: libpng-devel, readline-devel

Atari800-romdir.patch [new file with mode: 0644]
Atari800.spec

diff --git a/Atari800-romdir.patch b/Atari800-romdir.patch
new file mode 100644 (file)
index 0000000..a894a2d
--- /dev/null
@@ -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 */
index 33757c21e647323d7b7379a199790719957501c5..5912731c0127574ba55fe3a7eba452f12b20bb68 100644 (file)
@@ -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 .
This page took 0.039748 seconds and 4 git commands to generate.