[SCM] pd-zexy/master: Backported upstream fix for reproducible builds

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Sun Jan 24 19:06:44 UTC 2016


The following commit has been merged in the master branch:
commit 44c43b6131aee2977f525f972275384f3be4dc59
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Sun Jan 24 20:02:44 2016 +0100

    Backported upstream fix for reproducible builds

diff --git a/debian/patches/reproducible.patch b/debian/patches/reproducible.patch
new file mode 100644
index 0000000..19ca1e2
--- /dev/null
+++ b/debian/patches/reproducible.patch
@@ -0,0 +1,73 @@
+Description: make build reproducible
+ [multireceive] uses __DATE__/__TIME__ to create a unique send/receive label.
+ this obviously break reproducibility.
+ instead we now use a unique id generated at runtime.
+Author: IOhannes m zmölnig
+Origin: upstream
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- pd-zexy.orig/src/multireceive.c
++++ pd-zexy/src/multireceive.c
+@@ -21,6 +21,12 @@
+ 
+ #include "zexy.h"
+ 
++#ifdef _WIN32
++# include <sys/timeb.h>
++#else
++# include <sys/time.h>
++#endif
++
+ /* -------------------------- multireceive ------------------------------ */
+ 
+ static t_class *multireceive_class=NULL;
+@@ -43,6 +49,26 @@
+   t_outlet *x_out;
+ } t_multireceive;
+ 
++
++static unsigned long long unique(void) {
++  unsigned long long uid = 0;
++#ifdef _WIN32
++  struct _timeb tb;
++  _ftime(&tb);
++  uid=(((unsigned long long)tb.time)<<(4*sizeof(uid))) | (unsigned long long)(tb.millitm);
++#else
++  struct timeval tv;
++  struct timezone tz;
++
++  gettimeofday(&tv, 0);
++
++  /* First get the seconds right */
++  uid=((unsigned long)tv.tv_sec)<<(4*sizeof(uid)) | tv.tv_usec;
++#endif
++  return uid;
++}
++
++
+ static void multireceive_any(t_multireceive_proxy *x, t_symbol*s, int argc,
+                              t_atom*argv)
+ {
+@@ -133,6 +159,9 @@
+ 
+ void multireceive_setup(void)
+ {
++  char uniqsym[MAXPDSTRING];
++  unsigned long long uid=unique();
++
+   multireceive_class = class_new(gensym("multireceive"),
+                                  (t_newmethod)multireceive_new,
+                                  (t_method)multireceive_free,
+@@ -148,9 +177,10 @@
+                   (t_method)multireceive_add,
+                   gensym("add"),
+                   A_SYMBOL, 0);
+-
++  snprintf(uniqsym, MAXPDSTRING-2, "multireceive proxy %0llx", uid);
++  uniqsym[MAXPDSTRING-1]=0;
+   multireceive_proxy_class = class_new(
+-                               gensym("multireceive proxy "__DATE__""__TIME__""),
++                               gensym(uniqsym),
+                                0, 0,
+                                sizeof(t_multireceive_proxy),
+                                CLASS_PD | CLASS_NOINLET, 0);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..038ee28
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible.patch

-- 
pd-zexy packaging



More information about the pkg-multimedia-commits mailing list