Source: libimage-imlib2-perl
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/lib/x86_64-linux-gnu/perl5/5.34/auto/Image/Imlib2/Imlib2.so:

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

  /build/1st/libimage-imlib2-perl-2.03/lib/Image/Imlib2.c:2662
  vs.
  /build/2/libimage-imlib2-perl-2.03/2nd/lib/Image/Imlib2.c:2662

The attached patch fixes this by adjusting Build.PL to add
-ffile-prefix-map to $cflags.

With this patch applied libimage-imlib2-perl should build reproducibly on
tests.reproducible-builds.org!

Thanks for maintaining libimage-imlib2-perl!

live well,
  vagrant
From 8501e64292073c5bf6e37c11cc2dd9225a135475 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sat, 24 Sep 2022 23:45:33 +0000
Subject: [PATCH 1/2] Build.PL: Pass -ffile-prefix-map via $cflags to avoid
 embedding build path.

https://reproducible-builds.org/docs/build-path/
---
 Build.PL | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Build.PL b/Build.PL
index ab7cd99..d31e58d 100644
--- a/Build.PL
+++ b/Build.PL
@@ -1,5 +1,6 @@
 use Module::Build;
 use strict;
+use Cwd;
 
 # We need to find imlib2-config
 my $CONFIG = "imlib2-config";
@@ -20,7 +21,7 @@ point to the imlib2-config program that provides.
 }
 
 my $libs = `$CONFIG --libs`;
-my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG --cflags`;
+my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG --cflags` . "-ffile-prefix-map=" . getcwd() . "=." ;
 
 my $build = Module::Build->new(
   c_source     => './lib/Image',
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to