forked from pool/libselinux
b41ac15d94
Add python3.8-compat.patch which makes build possible even with Python 3.8, which doesn’t automatically adds -lpython<ver> OBS-URL: https://build.opensuse.org/request/show/744322 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=117
15 lines
761 B
Diff
15 lines
761 B
Diff
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -13,7 +13,11 @@ LIBDIR ?= $(PREFIX)/lib
|
|
SHLIBDIR ?= /lib
|
|
INCLUDEDIR ?= $(PREFIX)/include
|
|
PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
|
|
+ifeq ($(shell $(PKG_CONFIG) --exists $(PYPREFIX)-embed && echo true), true)
|
|
+PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)-embed)
|
|
+else
|
|
PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
|
|
+endif
|
|
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")
|
|
PYCEXT ?= $(shell $(PYTHON) -c 'import imp;print([s for s,m,t in imp.get_suffixes() if t == imp.C_EXTENSION][0])')
|
|
RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]')
|