Description: sanitise autotools: discard git material
 Remove the git material present in `configure.ac' and the source.
 This material is counter productive: (i) sourceballs contain
 no `.git' repository (as it makes sense) so that autoreconf(1)
 can not be run; (ii) some distributions (as Debian) and some users
 may use their own repository to package or install the software,
 so the git data are in fact specific to the used git rather
 than an upstream ``stamp''. As alternative a simple machinery
 based on passing an environment variable is suggested.
 Meant to be submitted to the upstream maintainer.
Origin: vendor, Debian
Forwarded: WIP
Comment: autoconf-archive material: sanitise
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2022-03-26

--- a/configure.ac
+++ b/configure.ac
@@ -340,10 +340,6 @@
     ["Copyright (C) 2006-2025 Tiago de Paula Peixoto\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."],
         [copyright info])
 
-# git information
-AC_DEFINE([GIT_COMMIT], "esyscmd(git show | head -n 1 | sed 's/commit //' |  grep -o -e '.\{8\}' | head -n 1 |tr -d '\n')", [git HEAD commit hash])
-AC_DEFINE([GIT_COMMIT_DATE], "esyscmd(git log -1 | head -n 3 | grep 'Date:' | sed s/'Date:   '// | tr -d '\n')", [git HEAD commit date])
-
 # GCC version
 AC_DEFINE([GCC_VERSION], [(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)], [GCC version value])
 
--- a/src/graph/graph_bind.cc
+++ b/src/graph/graph_bind.cc
@@ -39,8 +39,11 @@
     string GetName()      const {return PACKAGE_NAME;}
     string GetAuthor()    const {return AUTHOR;}
     string GetCopyright() const {return COPYRIGHT;}
-    string GetVersion()   const {return VERSION " (commit " GIT_COMMIT
-                                        ", " GIT_COMMIT_DATE ")";}
+    string GetVersion()   const {return VERSION
+#ifdef VERSION_COMMENT
+      " " VERSION_COMMENT
+#endif
+			;}
     string GetLicense()   const {return "GPL version 3 or above";}
     string GetCXXFLAGS()  const {return CPPFLAGS " " MOD_CXXFLAGS " " CXXFLAGS " " LDFLAGS;}
     string GetInstallPrefix() const {return INSTALL_PREFIX;}
--- a/src/graph/graph_io_binary.hh
+++ b/src/graph/graph_io_binary.hh
@@ -450,7 +450,11 @@
     uint8_t big_end = is_bigendian();
     write(s, big_end);
     string comment = "graph-tool binary file (http:://graph-tool.skewed.de)"
-        " generated by version " VERSION " (commit " GIT_COMMIT ", " GIT_COMMIT_DATE ")";
+        " generated by version " VERSION
+#ifdef VERSION_COMMENT
+        " " VERSION_COMMENT
+#endif
+				;
     comment += " stats: " + lexical_cast<std::string>(N) + " vertices, " +
         lexical_cast<std::string>(num_edges(g)) + " edges, " +
         std::string((directed) ? "directed, " : "undirected, ") +
