Source: gigalomania
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build path is embedded in /usr/games/gigalomania:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/gigalomania.html

  /build/1st/gigalomania-1.0+ds1/game.cpp:448
  vs.
  /build/2/gigalomania-1.0+ds1/2nd/game.cpp:448

The attached patch fixes this in debian/rules by passing
-ffile-prefix-map in CCFLAGS.

Alternately, adapting this packge to use the default flags passed via
dpkg-buildflags should solve this issue as well.

With this patch applied gigalomania should build reproducibly on
tests.reproducible-builds.org!

Thanks for maintaining gigalomania!

live well,
  vagrant
From 55ed148b652bbb21d6e88c5123fb1892f7b020d8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 25 Sep 2022 22:47:18 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CCFLAGS to avoid
 embedding the build path.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index c886a60..21c470b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 override_dh_auto_build:
 	$(MAKE) DATADIR="/usr/share/gigalomania" \
-	CCFLAGS="-g -O2 -Wall $(CPPFLAGS)" \
+	CCFLAGS="-g -O2 -Wall $(CPPFLAGS) -ffile-prefix-map=$(CURDIR)=." \
 	LINKPATH="$(LDFLAGS) `sdl2-config --libs` -L/usr/X11R6/lib/ -L/usr/lib" \
 	LIBS="-lSDL2_image -lSDL2_mixer `pkg-config --libs tinyxml`" all
 
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to