Source: allegro4.4
Version: 2:4.4.2-8
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that allegro4.4 could not be built reproducibly.
Two lists of files are not sorted in tools/CMakeLists.txt.
One list is used for determining the order in which source files are
linked, and the other list is used for generating a header file (which
would also be unsorted).

The attached patch fixes this by sorting those two lists.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/series b/debian/patches/series
index 97b0f63..aa2284c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ asm_fixes.patch
 fix_ftbfs_nonlinux.patch
 fix_ftbfs_with_sbuild.patch
 customize_allegro-config.patch
+sort_source_files.patch
diff --git a/debian/patches/sort_source_files.patch b/debian/patches/sort_source_files.patch
new file mode 100644
index 0000000..6ce0533
--- /dev/null
+++ b/debian/patches/sort_source_files.patch
@@ -0,0 +1,15 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Sort list of source files for reproducible build
+
+--- a/tools/CMakeLists.txt
++++ b/tools/CMakeLists.txt
+@@ -4,7 +4,9 @@
+ #
+ 
+ file(GLOB PLUGIN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/plugins/*.c)
++list(SORT PLUGIN_SRCS)
+ file(GLOB PLUGIN_INCS ${CMAKE_CURRENT_SOURCE_DIR}/plugins/*.inc)
++list(SORT PLUGIN_INCS)
+ 
+ # XXX support plugin "scripts", i.e. linker arguments.
+ # With CMake it should just be the name of a target to link with.

Attachment: signature.asc
Description: PGP signature

Reply via email to