[SCM] glyr/master: Add DEP-3 headers
emillon-guest at users.alioth.debian.org
emillon-guest at users.alioth.debian.org
Wed Nov 18 08:20:16 UTC 2015
The following commit has been merged in the master branch:
commit 642b51f44647a04a8a76490c21e9d3aa0b9ab431
Author: Etienne Millon <me at emillon.org>
Date: Sun Nov 15 19:06:42 2015 +0100
Add DEP-3 headers
diff --git a/debian/patches/build-date.patch b/debian/patches/build-date.patch
index e04f622..541408a 100644
--- a/debian/patches/build-date.patch
+++ b/debian/patches/build-date.patch
@@ -1,6 +1,50 @@
+From: Etienne Millon <me at emillon.org>
+Date: Sun, 15 Nov 2015 18:46:28 +0100
+Forwarded: https://github.com/sahib/glyr/pull/67
+Subject: [PATCH] Use BUILD_DATE / BUILD_TIME instead of cpp macros
+
+`glyrc --version` returns the date and time the library was built. To do that,
+it uses the standard macros `__DATE__` and `__TIME__`.
+
+The problem with this is that it makes the build not reproducible, since a
+binary produced a few seconds later will obviously be different.
+
+This adds a mechanism to bypass this: if the environment variables `BUILD_DATE`
+and `BUILD_TIME` are exported at compile-time, they will be used instead.
+
+This is part of an effort to make Debian packages reproducible, but should
+benefit other distributions. More information can be found at [1], and [2] for
+this particular issue.
+
+https://wiki.debian.org/ReproducibleBuilds/About
+https://wiki.debian.org/ReproducibleBuilds/TimestampsFromCPPMacros
+---
+ lib/CMakeLists.txt | 6 ++++++
+ lib/glyr.c | 9 ++++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 528f32e..a350440 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -6,6 +6,12 @@ configure_file (
+
+ SET(GENERIC_LIB_VERSION ${GLYR_VERSION_MAJOR}.${GLYR_VERSION_MINOR})
+ SET(GLYR_API_SOVERSION 1)
++IF(DEFINED ENV{BUILD_DATE})
++ ADD_DEFINITIONS(-DBUILD_DATE="$ENV{BUILD_DATE}")
++ENDIF()
++IF(DEFINED ENV{BUILD_TIME})
++ ADD_DEFINITIONS(-DBUILD_TIME="$ENV{BUILD_TIME}")
++ENDIF()
+
+ # Link libglyr as shared library
+ ADD_LIBRARY(glyr SHARED ${LIB_SOURCE_LOCATIONS})
+diff --git a/lib/glyr.c b/lib/glyr.c
+index aad2ce5..a1c2ce6 100644
--- a/lib/glyr.c
+++ b/lib/glyr.c
-@@ -243,10 +243,17 @@
+@@ -243,10 +243,17 @@ GlyrMemCache * glyr_cache_copy (GlyrMemCache * cache)
/////////////////////////////////
@@ -19,18 +63,6 @@
}
/////////////////////////////////
---- a/lib/CMakeLists.txt
-+++ b/lib/CMakeLists.txt
-@@ -6,6 +6,12 @@
-
- SET(GENERIC_LIB_VERSION ${GLYR_VERSION_MAJOR}.${GLYR_VERSION_MINOR})
- SET(GLYR_API_SOVERSION 1)
-+IF(DEFINED ENV{BUILD_DATE})
-+ ADD_DEFINITIONS(-DBUILD_DATE="$ENV{BUILD_DATE}")
-+ENDIF()
-+IF(DEFINED ENV{BUILD_TIME})
-+ ADD_DEFINITIONS(-DBUILD_TIME="$ENV{BUILD_TIME}")
-+ENDIF()
-
- # Link libglyr as shared library
- ADD_LIBRARY(glyr SHARED ${LIB_SOURCE_LOCATIONS})
+--
+2.1.4
+
diff --git a/debian/patches/version.patch b/debian/patches/version.patch
index 64b727f..adabb2b 100644
--- a/debian/patches/version.patch
+++ b/debian/patches/version.patch
@@ -1,3 +1,28 @@
+From: Etienne Millon <me at emillon.org>
+Date: Sun, 15 Nov 2015 19:01:24 +0100
+Subject: [PATCH] Set correct GLYR_VERSION_MICRO
+Forwarded: https://github.com/sahib/glyr/pull/68
+
+---
+ CMakeLists.txt | 2 +-
+ lib/config.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f40ad5b..d6a4868 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,7 +38,7 @@ ENDIF()
+ # ------------------------------------------------
+ SET(GLYR_VERSION_MAJOR "1")
+ SET(GLYR_VERSION_MINOR "0")
+-SET(GLYR_VERSION_MICRO "6")
++SET(GLYR_VERSION_MICRO "8")
+ SET(GLYR_VERSION_NAME "Raving Raven")
+ # ------------------------------------------------
+
+diff --git a/lib/config.h b/lib/config.h
+index c225e39..3bfa703 100644
--- a/lib/config.h
+++ b/lib/config.h
@@ -12,11 +12,11 @@
@@ -14,14 +39,6 @@
/**
* GLYR_CHECK_VERSION:
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -38,7 +38,7 @@
- # ------------------------------------------------
- SET(GLYR_VERSION_MAJOR "1")
- SET(GLYR_VERSION_MINOR "0")
--SET(GLYR_VERSION_MICRO "6")
-+SET(GLYR_VERSION_MICRO "8")
- SET(GLYR_VERSION_NAME "Raving Raven")
- # ------------------------------------------------
-
+--
+2.1.4
+
--
glyr packaging
More information about the pkg-multimedia-commits
mailing list