forked from pool/libselinux
2e246b5644
Fix building of libselinux-bindings: make proper use of ruby 2.2 OBS-URL: https://build.opensuse.org/request/show/308905 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=81
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
Index: src/Makefile
|
|
===================================================================
|
|
--- src/Makefile.orig
|
|
+++ src/Makefile
|
|
@@ -16,8 +16,8 @@ PYINC ?= $(shell pkg-config --cflags $(P
|
|
PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
|
|
RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
|
|
RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
|
|
-RUBYINC ?= $(shell pkg-config --cflags ruby)
|
|
-RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
|
|
+RUBYINC ?= $(shell ruby -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir'].nil? ? '$(LIBDIR)/ruby/$(RUBYLIBVER)' : RbConfig::CONFIG['rubyhdrdir']")
|
|
+RUBYINSTALL ?= $(shell ruby -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir'].nil? ? '$(DESTDIR)'+RbConfig::CONFIG['sitearchdir'] : '$(DESTDIR)'+RbConfig::CONFIG['vendorarchdir']")
|
|
LIBBASE ?= $(shell basename $(LIBDIR))
|
|
|
|
VERSION = $(shell cat ../VERSION)
|
|
@@ -98,7 +98,7 @@ $(SWIGLOBJ): $(SWIGCOUT)
|
|
$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $<
|
|
|
|
$(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
|
|
- $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
|
|
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -I$(RUBYINC)/$(RUBYPLATFORM) -fPIC -DSHARED -c -o $@ $<
|
|
|
|
$(SWIGSO): $(SWIGLOBJ)
|
|
$(CC) $(CFLAGS) -shared -o $@ $< -L. -lselinux $(LDFLAGS) -L$(LIBDIR)
|