[PATCH 4/5] build/ruby: use notmuch configure script values for shared lib
authorDavid Bremner <david@tethera.net>
Thu, 1 Jan 2015 12:16:39 +0000 (13:16 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:10 +0000 (14:47 -0700)
3f/2350c02c0b9abd648c0cd45179a27509745b5a [new file with mode: 0644]

diff --git a/3f/2350c02c0b9abd648c0cd45179a27509745b5a b/3f/2350c02c0b9abd648c0cd45179a27509745b5a
new file mode 100644 (file)
index 0000000..2dee61c
--- /dev/null
@@ -0,0 +1,99 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id A4675429E52\r
+       for <notmuch@notmuchmail.org>; Thu,  1 Jan 2015 04:17:28 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id NhtsdKzCEZS4 for <notmuch@notmuchmail.org>;\r
+       Thu,  1 Jan 2015 04:17:27 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A3150429E30\r
+       for <notmuch@notmuchmail.org>; Thu,  1 Jan 2015 04:17:22 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+       id 1Y6egs-00054Y-B7; Thu, 01 Jan 2015 08:17:22 -0400\r
+Received: (nullmailer pid 28821 invoked by uid 1000); Thu, 01 Jan 2015\r
+       12:16:50 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/5] build/ruby: use notmuch configure script values for\r
+       shared lib\r
+Date: Thu,  1 Jan 2015 13:16:39 +0100\r
+Message-Id: <1420114600-28396-5-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.3\r
+In-Reply-To: <1420114600-28396-1-git-send-email-david@tethera.net>\r
+References: <1420114600-28396-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 01 Jan 2015 12:17:29 -0000\r
+\r
+This is supposed to help build on systems like MacOS with different\r
+conventions for naming shared libraries. We have already computed the\r
+relevant names, so doing it again in ruby seems like a bad idea.\r
+---\r
+ bindings/Makefile.local  |  1 +\r
+ bindings/ruby/extconf.rb | 13 +++----------\r
+ 2 files changed, 4 insertions(+), 10 deletions(-)\r
+\r
+diff --git a/bindings/Makefile.local b/bindings/Makefile.local\r
+index 210055f..4d86e59 100644\r
+--- a/bindings/Makefile.local\r
++++ b/bindings/Makefile.local\r
+@@ -7,6 +7,7 @@ ruby-bindings: lib/libnotmuch.so\r
+ ifeq ($(HAVE_RUBY_DEV),1)\r
+       cd $(dir)/ruby && \\r
+               EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \\r
++              LIBNOTMUCH="../../lib/$(LINKER_NAME)" \\r
+               ruby extconf.rb --vendor\r
+       $(MAKE) -C $(dir)/ruby\r
+ else\r
+diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb\r
+index 6d5607e..ddaa684 100644\r
+--- a/bindings/ruby/extconf.rb\r
++++ b/bindings/ruby/extconf.rb\r
+@@ -14,19 +14,12 @@ if ENV['EXTRA_LDFLAGS']\r
+   $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']\r
+ end\r
\r
+-def have_local_library(lib, path, func, headers = nil)\r
+-  checking_for checking_message(func, lib) do\r
+-    lib = File.join(path, lib)\r
+-    if try_func(func, lib, headers)\r
+-      $LOCAL_LIBS += lib\r
+-    end\r
+-  end\r
+-end\r
+-\r
+-if not have_local_library('libnotmuch.so', dir, 'notmuch_database_create', 'notmuch.h')\r
++if not ENV['LIBNOTMUCH']\r
+   exit 1\r
+ end\r
\r
++$LOCAL_LIBS += ENV['LIBNOTMUCH']\r
++\r
+ # Create Makefile\r
+ dir_config('notmuch')\r
+ create_makefile('notmuch')\r
+-- \r
+2.1.3\r
+\r