games-puzzle/icebreaker: Silence rpm not found errors with patch

Closes: https://bugs.gentoo.org/934180
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
James Le Cuirot
2024-06-15 11:13:44 +01:00
parent 4e5b276030
commit d97fe59eb7

View File

@@ -1,7 +1,7 @@
From a5950b94d56f6e35c3dca2e1ad2ff334aacaa070 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Wed, 12 Jun 2024 22:50:15 +0100
Subject: [PATCH 1/2] Don't include -Werror in CFLAGS
Subject: [PATCH 1/3] Don't include -Werror in CFLAGS
Distributions don't like -Werror because it prevents end users from
building the software using newer compilers that may raise warnings you
@@ -45,7 +45,7 @@ index 92f60c5..17dd71a 100644
From 6ee6046bf1f9893a3c4bfd239871b3296c90b047 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Wed, 12 Jun 2024 22:54:52 +0100
Subject: [PATCH 2/2] Include LDFLAGS earlier in the linking command
Subject: [PATCH 2/3] Include LDFLAGS earlier in the linking command
Some flags need to come before the inputs in order to be effective.
---
@@ -68,3 +68,31 @@ index 808b36b..45a7035 100644
--
2.45.1
From 40b865e7776962d45e082fed4904b4c2690b753f Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sat, 15 Jun 2024 11:09:45 +0100
Subject: [PATCH 3/3] Silence error when rpm command doesn't exist and add
fallback
The error can trigger QA warnings in non-RPM distros.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 45a7035..5a497ce 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ MAKENSIS=makensis
WINDLLS=SDL.dll SDL_mixer.dll libgcc_s_dw2-1.dll libvorbisfile-3.dll libvorbis-0.dll libogg-0.dll libssp-0.dll libwinpthread-1.dll
export WINARCH
-RPMARCH := $(shell rpm --eval %{_arch} )
+RPMARCH := $(shell rpm --eval %{_arch} 2>/dev/null || echo none)
RPMOPTS=
RPMCRAZYDEFINES := --define "_topdir %(pwd)/rpmbuild" --define "_sourcedir %(pwd)" --define "_specdir %(pwd)" --define "_tmppath %(pwd)/rpmbuild/tmp/" --define "_builddir %(pwd)/rpmbuild/build/" --define "_rpmdir %(pwd)" --define "_srcrpmdir %(pwd)" --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm"
--
2.45.1