Re: bug report: Emacs notmuch-mode fails attachments with spaces
[notmuch-archives.git] / 02 / c3d26e75846781e55271055213fdb0202e0438
1 Return-Path: <bremner@tesseract.cs.unb.ca>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 80AB1431FBC\r
6         for <notmuch@notmuchmail.org>; Fri,  6 Mar 2015 13:59:20 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id bpSRaYYFulie for <notmuch@notmuchmail.org>;\r
16         Fri,  6 Mar 2015 13:59:20 -0800 (PST)\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
18         [87.98.215.224])\r
19         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id DFA9D431FAE\r
22         for <notmuch@notmuchmail.org>; Fri,  6 Mar 2015 13:59:19 -0800 (PST)\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
24         4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
25         id 1YU0GT-0000RN-0u; Fri, 06 Mar 2015 21:58:37 +0000\r
26 Received: (nullmailer pid 30535 invoked by uid 1000); Fri, 06 Mar 2015\r
27         21:57:57 -0000\r
28 From: David Bremner <david@tethera.net>\r
29 To: notmuch@notmuchmail.org\r
30 Subject: [Patch v2 1/4] build: integrate building ruby bindings into notmuch\r
31         build process\r
32 Date: Fri,  6 Mar 2015 22:57:50 +0100\r
33 Message-Id: <1425679073-30439-2-git-send-email-david@tethera.net>\r
34 X-Mailer: git-send-email 2.1.4\r
35 In-Reply-To: <1425679073-30439-1-git-send-email-david@tethera.net>\r
36 References: <1420114600-28396-6-git-send-email-david@tethera.net>\r
37         <1425679073-30439-1-git-send-email-david@tethera.net>\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Fri, 06 Mar 2015 21:59:20 -0000\r
51 \r
52 Because ruby generates a Makefile, we have to use recursive make.\r
53 Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}\r
54 in the parent directory.\r
55 ---\r
56  Makefile.local          |  2 +-\r
57  bindings/Makefile       |  7 +++++++\r
58  bindings/Makefile.local | 18 ++++++++++++++++++\r
59  bindings/ruby/README    |  8 ++++++++\r
60  configure               | 18 ++++++++++++++++++\r
61  debian/rules            |  1 -\r
62  6 files changed, 52 insertions(+), 2 deletions(-)\r
63  create mode 100644 bindings/Makefile\r
64  create mode 100644 bindings/Makefile.local\r
65  create mode 100644 bindings/ruby/README\r
66 \r
67 diff --git a/Makefile.local b/Makefile.local\r
68 index 81ee347..7204267 100644\r
69 --- a/Makefile.local\r
70 +++ b/Makefile.local\r
71 @@ -59,7 +59,7 @@ endif\r
72  FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)\r
73  \r
74  .PHONY: all\r
75 -all: notmuch notmuch-shared build-man\r
76 +all: notmuch notmuch-shared build-man ruby-bindings\r
77  ifeq ($(MAKECMDGOALS),)\r
78  ifeq ($(shell cat .first-build-message 2>/dev/null),)\r
79         @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all\r
80 diff --git a/bindings/Makefile b/bindings/Makefile\r
81 new file mode 100644\r
82 index 0000000..de492a7\r
83 --- /dev/null\r
84 +++ b/bindings/Makefile\r
85 @@ -0,0 +1,7 @@\r
86 +# See Makefile.local for the list of files to be compiled in this\r
87 +# directory.\r
88 +all:\r
89 +       $(MAKE) -C .. all\r
90 +\r
91 +.DEFAULT:\r
92 +       $(MAKE) -C .. $@\r
93 diff --git a/bindings/Makefile.local b/bindings/Makefile.local\r
94 new file mode 100644\r
95 index 0000000..6ed1344\r
96 --- /dev/null\r
97 +++ b/bindings/Makefile.local\r
98 @@ -0,0 +1,18 @@\r
99 +# -*- makefile -*-\r
100 +\r
101 +dir := bindings\r
102 +\r
103 +# force the shared library to be build\r
104 +ruby-bindings: lib/libnotmuch.so\r
105 +ifeq ($(HAVE_RUBY_DEV),1)\r
106 +       cd $(dir)/ruby && ruby extconf.rb --vendor\r
107 +       $(MAKE) -C $(dir)/ruby\r
108 +else\r
109 +       @echo Missing dependency, skipping ruby bindings\r
110 +endif\r
111 +\r
112 +CLEAN += $(patsubst %,$(dir)/ruby/%, \\r
113 +       Makefile database.o directory.o filenames.o\\r
114 +       init.o message.o messages.o mkmf.log notmuch.so query.o \\r
115 +       status.o tags.o thread.o threads.o)\r
116 +\r
117 diff --git a/bindings/ruby/README b/bindings/ruby/README\r
118 new file mode 100644\r
119 index 0000000..fe4ff89\r
120 --- /dev/null\r
121 +++ b/bindings/ruby/README\r
122 @@ -0,0 +1,8 @@\r
123 +To build the the notmuch ruby extension, run the following commands\r
124 +from the *top level* notmuch source directory:\r
125 +\r
126 +% ./configure\r
127 +% make ruby-bindings\r
128 +\r
129 +The generic documentation about building notmuch also applies.\r
130 +\r
131 diff --git a/configure b/configure\r
132 index 4af7ba9..3ca9bed 100755\r
133 --- a/configure\r
134 +++ b/configure\r
135 @@ -21,6 +21,7 @@ srcdir=$(dirname "$0")\r
136  \r
137  subdirs="util compat lib parse-time-string completion doc emacs"\r
138  subdirs="${subdirs} performance-test test test/test-databases"\r
139 +subdirs="${subdirs} bindings"\r
140  \r
141  # For a non-srcdir configure invocation (such as ../configure), create\r
142  # the directory structure and copy Makefiles.\r
143 @@ -443,6 +444,15 @@ else\r
144      have_doxygen=0\r
145  fi\r
146  \r
147 +printf "Checking for ruby development files... "\r
148 +if ruby -e "require 'mkmf'"> /dev/null 2>&1; then\r
149 +    printf "Yes.\n"\r
150 +    have_ruby_dev=1\r
151 +else\r
152 +    printf "No (skipping ruby bindings)\n"\r
153 +    have_ruby_dev=0\r
154 +fi\r
155 +\r
156  printf "Checking if sphinx is available and supports nroff output... "\r
157  if command -v sphinx-build > /dev/null && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then\r
158      printf "Yes.\n"\r
159 @@ -858,6 +868,10 @@ HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name}\r
160  # build its own version)\r
161  HAVE_GETLINE = ${have_getline}\r
162  \r
163 +# Are the ruby development files (and ruby) available? If not skip\r
164 +# building/testing ruby bindings.\r
165 +HAVE_RUBY_DEV = ${have_ruby_dev}\r
166 +\r
167  # Whether the strcasestr function is available (if not, then notmuch will\r
168  # build its own version)\r
169  HAVE_STRCASESTR = ${have_strcasestr}\r
170 @@ -970,6 +984,10 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))\r
171  \r
172  # Name of python interpreter\r
173  NOTMUCH_PYTHON=${python}\r
174 +\r
175 +# Are the ruby development files (and ruby) available? If not skip\r
176 +# building/testing ruby bindings.\r
177 +NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}\r
178  EOF\r
179  \r
180  # Finally, after everything configured, inform the user how to continue.\r
181 diff --git a/debian/rules b/debian/rules\r
182 index 7a19445..ca85bc7 100755\r
183 --- a/debian/rules\r
184 +++ b/debian/rules\r
185 @@ -12,7 +12,6 @@ override_dh_auto_build:\r
186         dh_auto_build -- V=1\r
187         dh_auto_build --sourcedirectory bindings/python\r
188         cd bindings/python && $(python3_all) setup.py build\r
189 -       cd bindings/ruby && ruby extconf.rb --vendor && make\r
190         $(MAKE) -C contrib/notmuch-mutt\r
191  \r
192  override_dh_auto_clean:\r
193 -- \r
194 2.1.4\r
195 \r