[sr-dev] git:master:1569f911: app_ruby: Makefile - updated how to detect ruby version

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 13 10:42:55 CET 2018


Module: kamailio
Branch: master
Commit: 1569f91121a1ec00a0d59becbba587c923a21c63
URL: https://github.com/kamailio/kamailio/commit/1569f91121a1ec00a0d59becbba587c923a21c63

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-12-13T10:41:29+01:00

app_ruby: Makefile - updated how to detect ruby version

- GH #1762

---

Modified: src/modules/app_ruby/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/1569f91121a1ec00a0d59becbba587c923a21c63.diff
Patch: https://github.com/kamailio/kamailio/commit/1569f91121a1ec00a0d59becbba587c923a21c63.patch

---

diff --git a/src/modules/app_ruby/Makefile b/src/modules/app_ruby/Makefile
index 9198714c2a..45a7b11535 100644
--- a/src/modules/app_ruby/Makefile
+++ b/src/modules/app_ruby/Makefile
@@ -7,20 +7,22 @@ include ../../Makefile.defs
 auto_gen=
 NAME=app_ruby.so
 
-RUBYVER=$(shell pkg-config --list-all | grep ruby-2 | tail -1 | cut -f 1 -d " ")
-ifeq ($(RUBYVER),)
-RUBYVER=ruby-2.3
-endif
+PKGLIBRUBY=1
+
 ifeq ($(CROSS_COMPILE),)
 	BUILDER = $(shell which pkg-config)
 ifneq ($(BUILDER),)
+	RUBYVER = $(shell $(BUILDER) --list-all | grep ruby | tail -1 | cut -f 1 -d " ")
+ifneq ($(RUBYVER),)
 	PKGLIBRUBY = $(shell $(BUILDER) --exists $(RUBYVER) > /dev/null 2>&1 ; echo $$? )
-ifneq ($(PKGLIBRUBY),0)
-	BUILDER =
 endif
 endif
 endif
 
+ifneq ($(PKGLIBRUBY),0)
+	BUILDER =
+endif
+
 ifneq ($(BUILDER),)
 	DEFS += $(shell $(BUILDER) --cflags $(RUBYVER))
 	LIBS = $(shell $(BUILDER) --libs $(RUBYVER))




More information about the sr-dev mailing list