File reproducible.patch of Package povray

From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Mon, 22 May 2017 04:37:39 +0000
Subject: [PATCH] Make build reproducible

when linking binaries with g++, order of input files
influences ordering of functions in the output

See https://reproducible-builds.org/ for why this matters.

Index: povray-3.7.0.0/unix/prebuild.sh
===================================================================
--- povray-3.7.0.0.orig/unix/prebuild.sh
+++ povray-3.7.0.0/unix/prebuild.sh
@@ -772,7 +772,7 @@ case "$1" in
   ;;
 
   *)
-  files=`find $dir -name "*.cpp" -or -name "*.h" | sed s,"$dir/",,g`
+  files=`find $dir -name "*.cpp" -or -name "*.h" | sed s,"$dir/",,g | sort`
 
   echo "Create $makefile.am"
   cat Makefile.header > $makefile.am
@@ -1309,7 +1309,7 @@ case "$1" in
 
   *)
   # includes the vfe/unix/ files to avoid circular dependencies when linking
-  files=`find $dir $dir/unix -maxdepth 1 -name \*.cpp -or -name \*.h | sed s,"$dir/",,g`
+  files=`find $dir $dir/unix -maxdepth 1 -name \*.cpp -or -name \*.h | sed s,"$dir/",,g | sort`
 
   echo "Create $makefile.am"
   cat Makefile.header > $makefile.am
openSUSE Build Service is sponsored by