[gmt] 01/01: Add patch to use SOURCE_DATE_EPOCH instead of current date.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sun May 15 19:41:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository gmt.
commit c6f9052864b640d20b8127cd0b5a060d68873269
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sun May 15 18:04:54 2016 +0200
Add patch to use SOURCE_DATE_EPOCH instead of current date.
---
debian/changelog | 6 ++++++
debian/patches/series | 1 +
debian/patches/source_date_epoch.patch | 39 ++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 63c73a7..8ec9cc2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gmt (5.2.1+dfsg-6) UNRELEASED; urgency=medium
+
+ * Add patch to use SOURCE_DATE_EPOCH instead of current date.
+
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 15 May 2016 18:04:37 +0200
+
gmt (5.2.1+dfsg-5) unstable; urgency=medium
* Bump Standards-Version to 3.9.8, no changes.
diff --git a/debian/patches/series b/debian/patches/series
index 19d3ed5..0878164 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ overridden-typo.patch
written-typo.patch
sparc-sighandler.patch
spelling-errors.patch
+source_date_epoch.patch
diff --git a/debian/patches/source_date_epoch.patch b/debian/patches/source_date_epoch.patch
new file mode 100644
index 0000000..000e7d5
--- /dev/null
+++ b/debian/patches/source_date_epoch.patch
@@ -0,0 +1,39 @@
+Description: Use SOURCE_DATE_EPOCH instead of current date.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: http://gmt.soest.hawaii.edu/issues/905
+
+--- a/cmake/modules/ConfigCMake.cmake
++++ b/cmake/modules/ConfigCMake.cmake
+@@ -77,16 +77,23 @@ set (GMT_VERSION_STRING "${GMT_PACKAGE_N
+ set (GMT_LONG_VERSION_STRING "${GMT_PACKAGE_NAME} - ${GMT_PACKAGE_DESCRIPTION_SUMMARY}, Version ${GMT_PACKAGE_VERSION_WITH_SVN_REVISION}")
+
+ # Get date
+-try_run (_exit_today _compiled_today
+- ${CMAKE_BINARY_DIR}/CMakeTmp
+- ${CMAKE_MODULE_PATH}/today.c
+- CMAKE_FLAGS
+- RUN_OUTPUT_VARIABLE _today)
++if(DEFINED ENV{SOURCE_DATE_EPOCH})
++ EXECUTE_PROCESS(
++ COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%Y;%m;%d;%B"
++ OUTPUT_VARIABLE _today
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++else(DEFINED ENV{SOURCE_DATE_EPOCH})
++ try_run (_exit_today _compiled_today
++ ${CMAKE_BINARY_DIR}/CMakeTmp
++ ${CMAKE_MODULE_PATH}/today.c
++ CMAKE_FLAGS
++ RUN_OUTPUT_VARIABLE _today)
+
+-if (NOT _compiled_today OR _exit_today EQUAL -1)
+- message (WARNING "Date not implemented, please file a bug report.")
+- set(_today "1313;13;13;Undecember")
+-endif (NOT _compiled_today OR _exit_today EQUAL -1)
++ if (NOT _compiled_today OR _exit_today EQUAL -1)
++ message (WARNING "Date not implemented, please file a bug report.")
++ set(_today "1313;13;13;Undecember")
++ endif (NOT _compiled_today OR _exit_today EQUAL -1)
++endif(DEFINED ENV{SOURCE_DATE_EPOCH})
+
+ list(GET _today 0 YEAR)
+ list(GET _today 1 MONTH)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gmt.git
More information about the Pkg-grass-devel
mailing list