[pkg-d-commits] [gir-to-d] 03/06: optional-git.patch: Make Git optional during build
Matthias Klumpp
mak at moszumanska.debian.org
Thu Nov 9 02:16:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to branch master
in repository gir-to-d.
commit 907f13b6e32df696f4b9f0cd1156253e1bcc3385
Author: Matthias Klumpp <mak at debian.org>
Date: Thu Nov 9 03:11:30 2017 +0100
optional-git.patch: Make Git optional during build
---
debian/patches/01_optional-git.patch | 46 ++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 47 insertions(+)
diff --git a/debian/patches/01_optional-git.patch b/debian/patches/01_optional-git.patch
new file mode 100644
index 0000000..21e220e
--- /dev/null
+++ b/debian/patches/01_optional-git.patch
@@ -0,0 +1,46 @@
+From 7f79cfc388aff12f50d5eff6070d578451cc2643 Mon Sep 17 00:00:00 2001
+From: Mike Wey <mike at mikewey.eu>
+Date: Sat, 21 Oct 2017 22:47:24 +0200
+Subject: [PATCH] Make sure git is optional during build.
+
+---
+ GNUmakefile | 4 +++-
+ meson.build | 3 +--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/GNUmakefile b/GNUmakefile
+index f789edc..6a30606 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -2,6 +2,8 @@ SHELL=/bin/sh
+ OS=$(shell uname || uname -s)
+ ARCH=$(shell arch || uname -m)
+
++GIR_TO_D_VERSION=v0.13.0
++
+ ifndef DC
+ ifneq ($(strip $(shell which dmd 2>/dev/null)),)
+ DC=dmd
+@@ -41,7 +43,7 @@ $(BINNAME): VERSION $(SOURCES)
+ rm -f *.o
+
+ VERSION: VERSION.in
+- sed 's/@VCS_TAG@/$(shell git describe --dirty=+ --tags)/g' $< > $@
++ sed 's/@VCS_TAG@/$(shell git describe --dirty=+ --tags || echo $(GIR_TO_D_VERSION))/g' $< > $@
+
+ clean:
+ -rm -f $(BINNAME)
+diff --git a/meson.build b/meson.build
+index 51d76b5..70abc9f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,8 +23,7 @@ source = [
+
+ sources_dir = include_directories('source/')
+
+-git = find_program('git')
+-version = vcs_tag(command: [git.path(), 'describe', '--dirty=+', '--tags'], input: 'VERSION.in', output: 'VERSION')
++version = vcs_tag(command: ['git', 'describe', '--dirty=+', '--tags'], input: 'VERSION.in', output: 'VERSION')
+ # d_import_dirs was added in meson 0.43 for now add -J manually.
+ add_project_arguments('-J'+meson.build_root(), language: 'd')
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9ea4071
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_optional-git.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/gir-to-d.git
More information about the pkg-d-commits
mailing list