[PATCH 6/8] CLI: refactor dumping of tags.
[notmuch-archives.git] / 85 / b76e158492f7ff9ee374af7a12ec9124ec7b99
1 Return-Path: <xico@atelo.org>\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 5C5FF431FC2\r
6         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 12:47:15 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[UNPARSEABLE_RELAY=0.001] 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 oubayKaLdl25 for <notmuch@notmuchmail.org>;\r
16         Tue,  6 May 2014 12:47:08 -0700 (PDT)\r
17 X-Greylist: delayed 395 seconds by postgrey-1.32 at olra;\r
18         Tue, 06 May 2014 12:47:07 PDT\r
19 Received: from mail.atelo.org (atelo.org [192.95.27.91])\r
20         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id EE09E431FAF\r
23         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 12:47:07 -0700 (PDT)\r
24 Received: from coyotlan.Tlalpan (ovo.atelo.org [192.168.1.7]);\r
25         by mail.atelo.org (OpenSMTPD) with ESMTP id f43138bf;\r
26         for <notmuch@notmuchmail.org>; Tue, 6 May 2014 19:40:08 +0000 (UTC)\r
27 Received: from localhost (1001@localhost [local]);\r
28         by localhost (OpenSMTPD) with ESMTPA id 5c399ad2;\r
29         for <notmuch@notmuchmail.org>; Tue, 6 May 2014 12:40:25 -0700 (PDT)\r
30 Date: Tue, 6 May 2014 12:40:25 -0700\r
31 From: =?utf-8?B?WMSrY8Oy?= <xico@atelo.org>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: pkg-config zlib check in 3c13bc\r
34 Message-ID: <20140506194025.GA17097@coyotlan.Tlalpan>\r
35 MIME-Version: 1.0\r
36 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99"\r
37 Content-Disposition: inline\r
38 Content-Transfer-Encoding: 8bit\r
39 User-Agent: Mutt/1.5.23 (2014-03-12)\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Tue, 06 May 2014 19:47:15 -0000\r
53 \r
54 \r
55 --5vNYLRcllDrimb99\r
56 Content-Type: text/plain; charset=utf-8\r
57 Content-Disposition: inline\r
58 Content-Transfer-Encoding: 8bit\r
59 \r
60 Dear notmuch,\r
61 \r
62 Although notmuch was configuring fine on FreeBSD before 3c13bc, the pkg-config\r
63 check introduced for zlib does not work. Indeed, zlib is part of the\r
64 base system, and always assumed to be present.\r
65 \r
66 Proposed patch puts platform test before pkg-config checks, and add a\r
67 special case for zlib on FreeBSD. uname -U is used to get (numeric) OS version,\r
68 and compared to lowest release where at least zlib 1.2.5.2 was available\r
69 (that’s FreeBSD 9.1, with zlib 1.2.7).\r
70 \r
71 Best,\r
72 \r
73 --\r
74 Xīcò\r
75 \r
76 --5vNYLRcllDrimb99\r
77 Content-Type: text/x-diff; charset=us-ascii\r
78 Content-Disposition: attachment;\r
79  filename="0001-FreeBSD-check-for-zlib-version.patch"\r
80 \r
81 >From ca0b168ac01391b4137de504bea2845d39d0fff9 Mon Sep 17 00:00:00 2001\r
82 From: =?UTF-8?q?X=C4=ABc=C3=B2?= <xico@atelo.org>\r
83 Date: Tue, 6 May 2014 12:37:32 -0700\r
84 Subject: [PATCH 1/1] FreeBSD check for zlib version.\r
85 \r
86 ---\r
87  configure | 130 +++++++++++++++++++++++++++++++++-----------------------------\r
88  1 file changed, 69 insertions(+), 61 deletions(-)\r
89 \r
90 diff --git a/configure b/configure\r
91 index 9bde2eb..7204812 100755\r
92 --- a/configure\r
93 +++ b/configure\r
94 @@ -270,6 +270,62 @@ EOF\r
95  \r
96  errors=0\r
97  \r
98 +libdir_in_ldconfig=0\r
99 +\r
100 +printf "Checking which platform we are on... "\r
101 +uname=`uname`\r
102 +if [ $uname = "Darwin" ] ; then\r
103 +    printf "Mac OS X.\n"\r
104 +    platform=MACOSX\r
105 +    linker_resolves_library_dependencies=0\r
106 +elif [ $uname = "SunOS" ] ; then\r
107 +    printf "Solaris.\n"\r
108 +    platform=SOLARIS\r
109 +    linker_resolves_library_dependencies=0\r
110 +elif [ $uname = "FreeBSD" ] ; then\r
111 +    printf "FreeBSD.\n"\r
112 +    platform=FREEBSD\r
113 +    linker_resolves_library_dependencies=0\r
114 +elif [ $uname = "OpenBSD" ] ; then\r
115 +    printf "OpenBSD.\n"\r
116 +    platform=OPENBSD\r
117 +    linker_resolves_library_dependencies=0\r
118 +elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then\r
119 +    printf "$uname\n"\r
120 +    platform="$uname"\r
121 +    linker_resolves_library_dependencies=1\r
122 +\r
123 +    printf "Checking for $libdir_expanded in ldconfig... "\r
124 +    ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')\r
125 +    # Separate ldconfig_paths only on newline (not on any potential\r
126 +    # embedded space characters in any filenames). Note, we use a\r
127 +    # literal newline in the source here rather than something like:\r
128 +    #\r
129 +    #  IFS=$(printf '\n')\r
130 +    #\r
131 +    # because the shell's command substitution deletes any trailing newlines.\r
132 +    IFS="\r
133 +"\r
134 +    for path in $ldconfig_paths; do\r
135 +       if [ "$path" = "$libdir_expanded" ]; then\r
136 +           libdir_in_ldconfig=1\r
137 +       fi\r
138 +    done\r
139 +    IFS=$DEFAULT_IFS\r
140 +    if [ "$libdir_in_ldconfig" = '0' ]; then\r
141 +       printf "No (will set RPATH)\n"\r
142 +    else\r
143 +       printf "Yes\n"\r
144 +    fi\r
145 +else\r
146 +    printf "Unknown.\n"\r
147 +    cat <<EOF\r
148 +\r
149 +*** Warning: Unknown platform. Notmuch might or might not build correctly.\r
150 +\r
151 +EOF\r
152 +fi\r
153 +\r
154  if pkg-config --version > /dev/null 2>&1; then\r
155      have_pkg_config=1\r
156  else\r
157 @@ -342,14 +398,22 @@ fi\r
158  \r
159  printf "Checking for zlib (>= 1.2.5.2)... "\r
160  have_zlib=0\r
161 -if pkg-config --atleast-version=1.2.5.2 zlib; then\r
162 +# zlib is part of base in FreeBSD. version 9.1 included 1.2.7\r
163 +if [ $platform = FREEBSD -a `uname -U` -ge 901000 ] ; then\r
164      printf "Yes.\n"\r
165      have_zlib=1\r
166 -    zlib_cflags=$(pkg-config --cflags zlib)\r
167 -    zlib_ldflags=$(pkg-config --libs zlib)\r
168 +    zlib_cflags=\r
169 +    zlib_ldflags=-lz\r
170  else\r
171 -    printf "No.\n"\r
172 -    errors=$((errors + 1))\r
173 +    if pkg-config --atleast-version=1.2.5.2 zlib; then\r
174 +        printf "Yes.\n"\r
175 +        have_zlib=1\r
176 +        zlib_cflags=$(pkg-config --cflags zlib)\r
177 +        zlib_ldflags=$(pkg-config --libs zlib)\r
178 +    else\r
179 +        printf "No.\n"\r
180 +        errors=$((errors + 1))\r
181 +    fi\r
182  fi\r
183  \r
184  printf "Checking for talloc development files... "\r
185 @@ -427,62 +491,6 @@ else\r
186      fi\r
187  fi\r
188  \r
189 -libdir_in_ldconfig=0\r
190 -\r
191 -printf "Checking which platform we are on... "\r
192 -uname=`uname`\r
193 -if [ $uname = "Darwin" ] ; then\r
194 -    printf "Mac OS X.\n"\r
195 -    platform=MACOSX\r
196 -    linker_resolves_library_dependencies=0\r
197 -elif [ $uname = "SunOS" ] ; then\r
198 -    printf "Solaris.\n"\r
199 -    platform=SOLARIS\r
200 -    linker_resolves_library_dependencies=0\r
201 -elif [ $uname = "FreeBSD" ] ; then\r
202 -    printf "FreeBSD.\n"\r
203 -    platform=FREEBSD\r
204 -    linker_resolves_library_dependencies=0\r
205 -elif [ $uname = "OpenBSD" ] ; then\r
206 -    printf "OpenBSD.\n"\r
207 -    platform=OPENBSD\r
208 -    linker_resolves_library_dependencies=0\r
209 -elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then\r
210 -    printf "$uname\n"\r
211 -    platform="$uname"\r
212 -    linker_resolves_library_dependencies=1\r
213 -\r
214 -    printf "Checking for $libdir_expanded in ldconfig... "\r
215 -    ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')\r
216 -    # Separate ldconfig_paths only on newline (not on any potential\r
217 -    # embedded space characters in any filenames). Note, we use a\r
218 -    # literal newline in the source here rather than something like:\r
219 -    #\r
220 -    #  IFS=$(printf '\n')\r
221 -    #\r
222 -    # because the shell's command substitution deletes any trailing newlines.\r
223 -    IFS="\r
224 -"\r
225 -    for path in $ldconfig_paths; do\r
226 -       if [ "$path" = "$libdir_expanded" ]; then\r
227 -           libdir_in_ldconfig=1\r
228 -       fi\r
229 -    done\r
230 -    IFS=$DEFAULT_IFS\r
231 -    if [ "$libdir_in_ldconfig" = '0' ]; then\r
232 -       printf "No (will set RPATH)\n"\r
233 -    else\r
234 -       printf "Yes\n"\r
235 -    fi\r
236 -else\r
237 -    printf "Unknown.\n"\r
238 -    cat <<EOF\r
239 -\r
240 -*** Warning: Unknown platform. Notmuch might or might not build correctly.\r
241 -\r
242 -EOF\r
243 -fi\r
244 -\r
245  printf "Checking byte order... "\r
246  cat> _byteorder.c <<EOF\r
247  #include <stdio.h>\r
248 -- \r
249 1.9.2\r
250 \r
251 \r
252 --5vNYLRcllDrimb99--\r