[PATCH 1/2] cli: S/MIME verification/decryption support
[notmuch-archives.git] / c5 / 5979f12cc25c9593ee875ec086029bcca62495
1 Return-Path: <felipe.contreras@gmail.com>\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 0E572431FC2\r
6         for <notmuch@notmuchmail.org>; Mon, 20 May 2013 05:26:10 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id W2bDspfQdy-e for <notmuch@notmuchmail.org>;\r
17         Mon, 20 May 2013 05:26:02 -0700 (PDT)\r
18 Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com\r
19         [209.85.214.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B7F86431FC0\r
22         for <notmuch@notmuchmail.org>; Mon, 20 May 2013 05:26:02 -0700 (PDT)\r
23 Received: by mail-ob0-f171.google.com with SMTP id ef5so6947731obb.2\r
24         for <notmuch@notmuchmail.org>; Mon, 20 May 2013 05:26:00 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
27         :references; bh=PeDYr2ns1fhDb+mYm0+8R2RNCyowSih5RC8fe5LC4TI=;\r
28         b=c3F3Z+WzN+y81DeeKiC1ynuVTD6D5CJT7DRhgja/qkht5qrNokcwVIWSCJI5l+NM+q\r
29         jJDXOsjlwrLD+ledSbUobcBYn3f4LoNjAyFKGjGuBT7vhkSd29XevzGrO4mYC7235zJk\r
30         CMmUTrmlKgl1sLDst22hqDSnWi9Lu2/1aVkVCKvVJTaLmb3yohPc28keSt2G/GMCl0Pp\r
31         1bXrNAtJc2IwjFnRLH4QrDGTBTXZB40sZU56PnyOXUPTfAtYZd2tsdIHTfIm2dO80EIO\r
32         XmOSp3o+hF1vRfmpy+6PmVmjuVCOF+ESBE8UFjAvc8DFjgLRVtcSBz22+41lk1igGw43\r
33         /OLw==\r
34 X-Received: by 10.60.60.10 with SMTP id d10mr28447630oer.6.1369052760396;\r
35         Mon, 20 May 2013 05:26:00 -0700 (PDT)\r
36 Received: from localhost (187-163-100-70.static.axtel.net. [187.163.100.70])\r
37         by mx.google.com with ESMTPSA id\r
38         yx4sm19918411obb.11.2013.05.20.05.25.58 for <multiple recipients>\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Mon, 20 May 2013 05:25:59 -0700 (PDT)\r
41 From: Felipe Contreras <felipe.contreras@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH 1/2] ruby: use in-tree notmuch library\r
44 Date: Mon, 20 May 2013 07:24:23 -0500\r
45 Message-Id: <1369052664-17869-2-git-send-email-felipe.contreras@gmail.com>\r
46 X-Mailer: git-send-email 1.8.3.rc3.286.g3d43083\r
47 In-Reply-To: <1369052664-17869-1-git-send-email-felipe.contreras@gmail.com>\r
48 References: <1369052664-17869-1-git-send-email-felipe.contreras@gmail.com>\r
49 Cc: Ali Polatel <alip@exherbo.org>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Mon, 20 May 2013 12:26:10 -0000\r
63 \r
64 Currently it simply finds any library available, and if notmuch is\r
65 installed in the system, it would give priority to that library.\r
66 \r
67 Let's implement our own helper functions to link directly to the local\r
68 library, and give priority to the local header file.\r
69 \r
70 Also, add an option to properly check if there are missing symbols.\r
71 \r
72 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
73 ---\r
74  bindings/ruby/extconf.rb | 23 ++++++++++++++++++++---\r
75  1 file changed, 20 insertions(+), 3 deletions(-)\r
76 \r
77 diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb\r
78 index 7b9750f..ddd4e48 100644\r
79 --- a/bindings/ruby/extconf.rb\r
80 +++ b/bindings/ruby/extconf.rb\r
81 @@ -5,9 +5,26 @@\r
82  \r
83  require 'mkmf'\r
84  \r
85 -# Notmuch Library\r
86 -find_header('notmuch.h', '../../lib')\r
87 -find_library('notmuch', 'notmuch_database_create', '../../lib')\r
88 +dir = File.join('..', '..', 'lib')\r
89 +\r
90 +# includes\r
91 +$INCFLAGS = "-I#{dir} #{$INCFLAGS}"\r
92 +\r
93 +# make sure there are no undefined symbols\r
94 +$LDFLAGS += ' -Wl,--no-undefined'\r
95 +\r
96 +def have_local_library(lib, path, func, headers = nil)\r
97 +  checking_for checking_message(func.funcall_style, lib) do\r
98 +    lib = File.join(path, lib)\r
99 +    if try_func(func, lib, headers)\r
100 +      $LOCAL_LIBS += lib\r
101 +    end\r
102 +  end\r
103 +end\r
104 +\r
105 +if not have_local_library('libnotmuch.so', dir, 'notmuch_database_create', 'notmuch.h')\r
106 +  exit 1\r
107 +end\r
108  \r
109  # Create Makefile\r
110  dir_config('notmuch')\r
111 -- \r
112 1.8.3.rc3.286.g3d43083\r
113 \r