Compare commits

..

No commits in common. "rawhide" and "f27" have entirely different histories.

8 changed files with 34 additions and 261 deletions

View file

@ -1,21 +0,0 @@
diff -up Zasx/Makefile~ Zasx/Makefile
--- Zasx/Makefile~ 2025-08-07 23:05:43.000000000 +0200
+++ Zasx/Makefile 2025-08-08 16:18:49.071125278 +0200
@@ -1,7 +1,7 @@
PREFIX = /usr/local
DATADIR = $(PREFIX)/share/$(TARGET)
CFLAGS = -g -Wall -Wno-deprecated-declarations -O2 -fsigned-char
-LDFLAGS = `allegro-config --libs` -ldumb -laldmb -lm -lpthread
+LIBS = `allegro-config --libs` -ldumb -laldmb -lm -lpthread
DEFINES = -DDATADIR=\"$(DATADIR)/\" -Iinclude
OBJS = obj/anim.o obj/dataload.o obj/gamemenu.o obj/input.o obj/log.o \
obj/particle.o obj/scorer.o obj/asteroid.o obj/drs.o obj/gametimer.o \
@@ -10,7 +10,7 @@ OBJS = obj/anim.o obj/dataload.o obj/
TARGET = zasx
$(TARGET): $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $^
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
obj/%.o: src/%.c
$(CC) $(CFLAGS) $(DEFINES) -o $@ -c $<

View file

@ -4,7 +4,7 @@ diff -urN Zasx.org/Makefile Zasx/Makefile
@@ -0,0 +1,25 @@
+PREFIX = /usr/local
+DATADIR = $(PREFIX)/share/$(TARGET)
+CFLAGS = -g -Wall -Wno-deprecated-declarations -O2 -fsigned-char -DALLEGRO_FIX_ALIASES
+CFLAGS = -g -Wall -Wno-deprecated-declarations -O2 -fsigned-char
+LDFLAGS = `allegro-config --libs` -ldumb -laldmb -lm -lpthread
+DEFINES = -DDATADIR=\"$(DATADIR)/\" -Iinclude
+OBJS = obj/anim.o obj/dataload.o obj/gamemenu.o obj/input.o obj/log.o \
@ -781,7 +781,7 @@ diff -urN Zasx.org/src/input.c Zasx/src/input.c
diff -urN Zasx.org/src/jgmod.c Zasx/src/jgmod.c
--- Zasx.org/src/jgmod.c 1970-01-01 01:00:00.000000000 +0100
+++ Zasx/src/jgmod.c 2006-04-02 20:16:58.000000000 +0200
@@ -0,0 +1,147 @@
@@ -0,0 +1,146 @@
+/* incomplete DUMB JGMOD compatibility wrapper, because JGMOD's license is
+ not opensource / GPL compatible and because there are already enough mod
+ playing libs.
@ -861,7 +861,6 @@ diff -urN Zasx.org/src/jgmod.c Zasx/src/jgmod.c
+ usleep(10000);
+ pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
+ }
+ return NULL;
+}
+
+void play_mod(JGMOD *mod, int loop)

View file

@ -1,42 +0,0 @@
diff -up Zasx/src/weapon.c~ Zasx/src/weapon.c
--- Zasx/src/weapon.c~ 2018-10-15 11:15:27.000000000 +0200
+++ Zasx/src/weapon.c 2018-10-15 11:17:02.507744263 +0200
@@ -10,6 +10,7 @@
#include <math.h>
#include <string.h>
#include <stdio.h>
+#include <locale.h>
#include "allegro.h"
#include "particle.h"
@@ -119,6 +120,7 @@ WEAPON *load_weapon(char *filename) {
PACKFILE *p;
WEAPON *w = NULL;
WEAPON_CANNON *c = NULL;
+ char *old_locale;
char buf[520];
char buf2[520];
@@ -142,6 +144,12 @@ WEAPON *load_weapon(char *filename) {
GamePal[0].r = 63; GamePal[0].g = 0; GamePal[0].b = 63;
select_palette(GamePal);
+ /*
+ * Ensure sscanf uses '.' as decimal separator, as we use this in
+ * our weapon configs.
+ */
+ old_locale = setlocale(LC_NUMERIC, "C");
+
while(pack_fgets(buf, 512, p)) {
int r, i;
float x, y;
@@ -393,6 +401,9 @@ WEAPON *load_weapon(char *filename) {
pack_fclose(p);
+ if (old_locale)
+ setlocale(LC_NUMERIC, old_locale);
+
unselect_palette();
GamePal[0].r = 0; GamePal[0].g = 0; GamePal[0].b = 0;

View file

@ -1,65 +0,0 @@
Remove the use of / need for -DALLEGRO_FIX_ALIASES
Starting with gcc 15 the default C-level is -std=gnu23 this enables
the fsub, fadd, fcos, etc function protypes in math.h causing
a conflict with the use of ALLEGRO_FIX_ALIASES which adds aliased
for allegro's fixed math functions back to the old allegro names
which conflict with the math.h prototypes.
Since zasx only uses fcos, this can be fixed by dropping the use of
ALLEGRO_FIX_ALIASES, combined with s/fcos/fixcos/
diff -up Zasx/Makefile~ Zasx/Makefile
--- Zasx/Makefile~ 2025-08-07 22:08:56.000000000 +0200
+++ Zasx/Makefile 2025-08-07 23:05:43.640169740 +0200
@@ -1,6 +1,6 @@
PREFIX = /usr/local
DATADIR = $(PREFIX)/share/$(TARGET)
-CFLAGS = -g -Wall -Wno-deprecated-declarations -O2 -fsigned-char -DALLEGRO_FIX_ALIASES
+CFLAGS = -g -Wall -Wno-deprecated-declarations -O2 -fsigned-char
LDFLAGS = `allegro-config --libs` -ldumb -laldmb -lm -lpthread
DEFINES = -DDATADIR=\"$(DATADIR)/\" -Iinclude
OBJS = obj/anim.o obj/dataload.o obj/gamemenu.o obj/input.o obj/log.o \
diff -up Zasx/src/scorer.c~ Zasx/src/scorer.c
--- Zasx/src/scorer.c~ 2025-08-07 22:08:56.000000000 +0200
+++ Zasx/src/scorer.c 2025-08-07 23:04:39.992540810 +0200
@@ -39,28 +39,28 @@ void ShowCredits() {
do {
DrawBG();
- textout(BackBuffer, font, " Programming and Design", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick) / 10)),
+ textout(BackBuffer, font, " Programming and Design", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick) / 10)),
30, makecol(255, 255, 255));
- textout(BackBuffer, font, " Robert J Ohannessian", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 50) / 10)),
+ textout(BackBuffer, font, " Robert J Ohannessian", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 50) / 10)),
40, makecol(255, 255, 255));
- textout(BackBuffer, font, " Music:", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 150) / 10)),
+ textout(BackBuffer, font, " Music:", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 150) / 10)),
60, makecol(255, 255, 255));
- textout(BackBuffer, font, " Ben Davis", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 200) / 10)),
+ textout(BackBuffer, font, " Ben Davis", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 200) / 10)),
70, makecol(255, 255, 255));
- textout(BackBuffer, font, " Graphics:", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 300) / 10)),
+ textout(BackBuffer, font, " Graphics:", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 300) / 10)),
90, makecol(255, 255, 255));
- textout(BackBuffer, font, " Robert J Ohannessian", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 350) / 10)),
+ textout(BackBuffer, font, " Robert J Ohannessian", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 350) / 10)),
100, makecol(255, 255, 255));
- textout(BackBuffer, font, " Jonathan Soulard", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 400) / 10)),
+ textout(BackBuffer, font, " Jonathan Soulard", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 400) / 10)),
110, makecol(255, 255, 255));
- textout(BackBuffer, font, " Special thanks to:", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 500) / 10)),
+ textout(BackBuffer, font, " Special thanks to:", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 500) / 10)),
130, makecol(255, 255, 255));
- textout(BackBuffer, font, " Shawn Hargreaves, (Allegro, one asteroid graphics and some sound effects)", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 550) / 10)),
+ textout(BackBuffer, font, " Shawn Hargreaves, (Allegro, one asteroid graphics and some sound effects)", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 550) / 10)),
140, makecol(255, 255, 255));
- textout(BackBuffer, font, " Ivan Baldo, (PPCol)", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 600) / 10)),
+ textout(BackBuffer, font, " Ivan Baldo, (PPCol)", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 600) / 10)),
150, makecol(255, 255, 255));
- textout(BackBuffer, font, " Jeffery Guan, (JGMOD)", 10 + fixtoi(10 * fcos(itofix(GameTime - start_tick + 650) / 10)),
+ textout(BackBuffer, font, " Jeffery Guan, (JGMOD)", 10 + fixtoi(10 * fixcos(itofix(GameTime - start_tick + 650) / 10)),
160, makecol(255, 255, 255));

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component type="desktop">
<id>zasx.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>Zasx</name>
<summary>Asteroids like game with powerups</summary>
<description>
<p>
Zasx is a retro styled shooter where you control a spaceship and must
destroy asteroids before they collide with your ship and destroy it.
</p>
<p>
Zasx also features a 2 player mode where you both co-operate using 2
ships to clear the asteroid field.
</p>
<p>
Zasx can be played using the keyboard our optionally by using 1 or 2
joysticks.
</p>
</description>
<url type="homepage">https://www.allegro.cc/depot/Zasx/</url>
<screenshots>
<screenshot type="default">https://fedorapeople.org/~jwrdegoede/screenshots/zasx1.png</screenshot>
<screenshot>https://fedorapeople.org/~jwrdegoede/screenshots/zasx2.png</screenshot>
<screenshot>https://fedorapeople.org/~jwrdegoede/screenshots/zasx3.png</screenshot>
</screenshots>
<updatecontact>jwrdegoede_at_fedoraproject.org</updatecontact>
</component>

View file

@ -1,10 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Name=Zasx
Comment=Asteroids with powerups!
Comment=Asteroid with powerups!
Exec=zasx
Icon=zasx
Icon=zasx.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;ArcadeGame;
Keywords=Game;Arcade;Asteroids;Retro;Powerups;

View file

@ -1,5 +0,0 @@
addFilter("W: invalid-url Source0")
addFilter("W: no-%check-section")
addFilter("W: no-manual-page-for-binary")
addFilter("E: spelling-error")
addFilter("E: incorrect-fsf-address")

122
zasx.spec
View file

@ -1,21 +1,16 @@
Name: zasx
Version: 1.30
Release: 44%{?dist}
Release: 23%{?dist}
Summary: Asteroid like game with powerups
License: GPL-2.0-or-later AND Giftware
URL: https://www.allegro.cc/depot/Zasx/
# Original link (down): http://www.bob.allegronetwork.com/zasx/zasx130s.zip
Source0: zasx130s.zip
Group: Amusements/Games
License: GPLv2+ and Freely redistributable without restriction
URL: http://www.bob.allegronetwork.com/zasx/index.html
Source0: http://www.bob.allegronetwork.com/zasx/zasx130s.zip
Source1: zasx.desktop
Source2: zasx.appdata.xml
Patch0: zasx-1.30-fixes.patch
Patch1: zasx-1.30-datadir.patch
Patch2: zasx-1.30-format-security.patch
Patch3: zasx-1.30-locale-fix.patch
Patch4: zasx-1.30-remove-al-fix-aliases.patch
Patch5: zasx-1.30-Makefile.patch
BuildRequires: gcc make
BuildRequires: dumb-devel ImageMagick desktop-file-utils libappstream-glib
BuildRequires: dumb-devel ImageMagick desktop-file-utils
Requires: hicolor-icon-theme
%description
@ -25,16 +20,18 @@ mode, joystick, music and sound.
%prep
%autosetup -p1 -n Zasx
%setup -q -n Zasx
%patch0 -p1 -z .fix
%patch1 -p1 -z .datadir
%patch2 -p1
sed -i 's/\r//' copying.txt readme.txt docs/index.html docs/%{name}.css
mv docs html
%build
make %{?_smp_mflags} PREFIX=%{_prefix} \
CFLAGS="$RPM_OPT_FLAGS -fsigned-char -Wno-deprecated-declarations" \
LDFLAGS="$RPM_LD_FLAGS"
convert -transparent black -resize 64x64 %{name}.ico %{name}.png
CFLAGS="$RPM_OPT_FLAGS -fsigned-char -Wno-deprecated-declarations"
convert -transparent black %{name}.ico %{name}.png
%install
@ -45,94 +42,33 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{name}.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/appdata
appstream-util validate-relax --nonet \
$RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc readme.txt html
%license copying.txt
%doc copying.txt readme.txt html
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Thu Aug 7 2025 Hans de Goede <hans@hansg.org> - 1.30-42
- Fix FTBFS with gcc15
- Resolves: rhbz#2341600
- Resolves: rhbz#2385756
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 15 2018 Hans de Goede <hdegoede@redhat.com> - 1.30-27
- Fix FTBFS (rhbz#1606782)
- Add appdata
- Fix the spaceship being unable to shoot on locales which use a comma as
decimal separator
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jan 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.30-24
- Remove obsolete scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.30-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild