* [PATCH 0/3] ruby: build cleanups
@ 2025-01-02 1:39 Felipe Contreras
2025-01-02 1:39 ` [PATCH 1/3] ruby: simplify build Felipe Contreras
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Felipe Contreras @ 2025-01-02 1:39 UTC (permalink / raw)
To: notmuch; +Cc: Michal Sapka
These resulted from the discussion about talloc being in a non-standard
location in MacOS with brew.
Felipe Contreras (3):
ruby: simplify build
ruby: use proper talloc flags
ruby: trivial build cleanup
bindings/Makefile.local | 4 ++--
bindings/ruby/extconf.rb | 13 +++----------
2 files changed, 5 insertions(+), 12 deletions(-)
--
0.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] ruby: simplify build
2025-01-02 1:39 [PATCH 0/3] ruby: build cleanups Felipe Contreras
@ 2025-01-02 1:39 ` Felipe Contreras
2025-01-02 1:39 ` [PATCH 2/3] ruby: use proper talloc flags Felipe Contreras
2025-01-02 1:39 ` [PATCH 3/3] ruby: trivial build cleanup Felipe Contreras
2 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2025-01-02 1:39 UTC (permalink / raw)
To: notmuch; +Cc: Michal Sapka
We can just always add EXTRA_INCFLAGS and EXTRA_LDFLAGS.
---
bindings/Makefile.local | 2 +-
bindings/ruby/extconf.rb | 10 ++--------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/bindings/Makefile.local b/bindings/Makefile.local
index 9875123a..eb932613 100644
--- a/bindings/Makefile.local
+++ b/bindings/Makefile.local
@@ -9,8 +9,8 @@ $(dir)/ruby.stamp: lib/$(LINKER_NAME)
ifeq ($(HAVE_RUBY_DEV),1)
cd $(dir)/ruby && \
EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
+ EXTRA_INCFLAGS="-I$(NOTMUCH_SRCDIR)/lib" \
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
- NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
$(RUBY) extconf.rb --vendor
$(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" && touch $@
endif
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index d914537c..7cec711f 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -5,14 +5,8 @@
require 'mkmf'
-dir = File.join(ENV['NOTMUCH_SRCDIR'], 'lib')
-
-# includes
-$INCFLAGS = "-I#{dir} #{$INCFLAGS}"
-
-if ENV['EXTRA_LDFLAGS']
- $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']
-end
+$INCFLAGS = "#{ENV['EXTRA_INCFLAGS']} #{$INCFLAGS}"
+$LDFLAGS = "#{ENV['EXTRA_LDFLAGS']} #{$LDFLAGS}"
if not ENV['LIBNOTMUCH']
exit 1
--
0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ruby: use proper talloc flags
2025-01-02 1:39 [PATCH 0/3] ruby: build cleanups Felipe Contreras
2025-01-02 1:39 ` [PATCH 1/3] ruby: simplify build Felipe Contreras
@ 2025-01-02 1:39 ` Felipe Contreras
2025-01-02 1:39 ` [PATCH 3/3] ruby: trivial build cleanup Felipe Contreras
2 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2025-01-02 1:39 UTC (permalink / raw)
To: notmuch; +Cc: Michal Sapka
This way talloc doesn't need to be installed in /usr.
---
bindings/Makefile.local | 4 ++--
bindings/ruby/extconf.rb | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/bindings/Makefile.local b/bindings/Makefile.local
index eb932613..72fe9850 100644
--- a/bindings/Makefile.local
+++ b/bindings/Makefile.local
@@ -8,8 +8,8 @@ ruby-bindings: $(dir)/ruby.stamp
$(dir)/ruby.stamp: lib/$(LINKER_NAME)
ifeq ($(HAVE_RUBY_DEV),1)
cd $(dir)/ruby && \
- EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
- EXTRA_INCFLAGS="-I$(NOTMUCH_SRCDIR)/lib" \
+ EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS) $(TALLOC_LDFLAGS)" \
+ EXTRA_INCFLAGS="-I$(NOTMUCH_SRCDIR)/lib $(TALLOC_CFLAGS)" \
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
$(RUBY) extconf.rb --vendor
$(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" && touch $@
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index 7cec711f..b6115688 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -13,7 +13,6 @@ if not ENV['LIBNOTMUCH']
end
$LOCAL_LIBS += ENV['LIBNOTMUCH']
-$LIBS += " -ltalloc"
# Create Makefile
dir_config('notmuch')
--
0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ruby: trivial build cleanup
2025-01-02 1:39 [PATCH 0/3] ruby: build cleanups Felipe Contreras
2025-01-02 1:39 ` [PATCH 1/3] ruby: simplify build Felipe Contreras
2025-01-02 1:39 ` [PATCH 2/3] ruby: use proper talloc flags Felipe Contreras
@ 2025-01-02 1:39 ` Felipe Contreras
2 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2025-01-02 1:39 UTC (permalink / raw)
To: notmuch; +Cc: Michal Sapka
---
bindings/ruby/extconf.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index b6115688..ba97670f 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -12,7 +12,7 @@ if not ENV['LIBNOTMUCH']
exit 1
end
-$LOCAL_LIBS += ENV['LIBNOTMUCH']
+$LOCAL_LIBS = ENV['LIBNOTMUCH']
# Create Makefile
dir_config('notmuch')
--
0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-02 1:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 1:39 [PATCH 0/3] ruby: build cleanups Felipe Contreras
2025-01-02 1:39 ` [PATCH 1/3] ruby: simplify build Felipe Contreras
2025-01-02 1:39 ` [PATCH 2/3] ruby: use proper talloc flags Felipe Contreras
2025-01-02 1:39 ` [PATCH 3/3] ruby: trivial build cleanup Felipe Contreras
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).