File: oggenc-reproducibly.patch

package info (click to toggle)
colobot 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 415,532 kB
  • sloc: cpp: 129,246; ansic: 8,872; python: 2,158; sh: 672; awk: 91; xml: 35; makefile: 31
file content (23 lines) | stat: -rw-r--r-- 1,151 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: pass the original flac file's bytesize as serial integer to oggenc
 to avoid picking unreproducibilty from current time and process id
Author: Didier Raboud <odyx@debian.org>
Thanks-To: Chris Lamb <lamby@debian.org>
Thanks-To: Clint Adams <clint@debian.org>
Bug-Debian: https://bugs.debian.org/846976
Last-Update: 2016-12-05

--- a/data/music/CMakeLists.txt
+++ b/data/music/CMakeLists.txt
@@ -91,9 +91,11 @@ if(MUSIC)
                 install(FILES ${DOWNLOAD_FILE_LOC} DESTINATION ${COLOBOT_INSTALL_MUSIC_DIR})
             else()
                 message(STATUS "Adding OGG convert target for ${FILE}")
+                find_program(STAT stat)
+                execute_process(COMMAND ${STAT} --printf="%s" "${DOWNLOAD_FILE_LOC}" OUTPUT_VARIABLE FILENAME_INT)
 
                 execute_process(
-                    COMMAND ${OGGENC} -q ${MUSIC_QUALITY} -o "${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.ogg" "${DOWNLOAD_FILE_LOC}"
+                    COMMAND ${OGGENC} --serial ${FILENAME_INT} -q ${MUSIC_QUALITY} -o "${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.ogg" "${DOWNLOAD_FILE_LOC}"
                 )
 
                 install(FILES