[PATCH] build/ruby: use notmuch configure script values for shared lib
authorDavid Bremner <david@tethera.net>
Sun, 14 Jun 2015 06:26:31 +0000 (08:26 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:04 +0000 (14:49 -0700)
33/0f8f7607b250ca14f8e3853d9180290a27359e [new file with mode: 0644]

diff --git a/33/0f8f7607b250ca14f8e3853d9180290a27359e b/33/0f8f7607b250ca14f8e3853d9180290a27359e
new file mode 100644 (file)
index 0000000..e1c60e4
--- /dev/null
@@ -0,0 +1,103 @@
+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 arlo.cworth.org (Postfix) with ESMTP id C57746DE0948\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 23:27:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.195\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.195 tagged_above=-999 required=5 tests=[AWL=0.185, \r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id uSFKLDFKMw_r for <notmuch@notmuchmail.org>;\r
+ Sat, 13 Jun 2015 23:27:44 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+ [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 186706DE0350\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 23:27:44 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+ 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1Z41Nm-0002mD-0G; Sun, 14 Jun 2015 06:27:02 +0000\r
+Received: (nullmailer pid 14219 invoked by uid 1000); Sun, 14 Jun 2015\r
+ 06:26:43 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: [PATCH] build/ruby: use notmuch configure script values for shared\r
+ lib\r
+Date: Sun, 14 Jun 2015 08:26:31 +0200\r
+Message-Id: <1434263191-14171-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1433142542-2307-4-git-send-email-david@tethera.net>\r
+References: <1433142542-2307-4-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Sun, 14 Jun 2015 06:27:45 -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  |  3 ++-\r
+ bindings/ruby/extconf.rb | 13 +++----------\r
+ 2 files changed, 5 insertions(+), 11 deletions(-)\r
+\r
+diff --git a/bindings/Makefile.local b/bindings/Makefile.local\r
+index d236f01..4ecf839 100644\r
+--- a/bindings/Makefile.local\r
++++ b/bindings/Makefile.local\r
+@@ -3,10 +3,11 @@\r
+ dir := bindings\r
\r
+ # force the shared library to be built\r
+-ruby-bindings: lib/libnotmuch.so\r
++ruby-bindings: lib/$(LINKER_NAME)\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.4\r
+\r