Module: kamailio Branch: master Commit: 1569f91121a1ec00a0d59becbba587c923a21c63 URL: https://github.com/kamailio/kamailio/commit/1569f91121a1ec00a0d59becbba587c9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/1569f91121a1ec00a0d59becbba587c9... Patch: https://github.com/kamailio/kamailio/commit/1569f91121a1ec00a0d59becbba587c9...
---
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))