swig.mk: Follow changes swig 4.0 -> 4.2

- There's no -php8 option in swig, so stay with -php7, which
    supports "8 and above" according to the documentation

  - No <module>.php stub is generated anylonger, so don't try to
    install it

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2024-04-30 08:00:37 +00:00
commit 391a735972

View file

@ -13,7 +13,8 @@ ifeq ($(SWIG_TARGET),php)
endif
PHP ?= php$(PHP_MAJOR)
#PHP ?= $(firstword $(notdir $(wildcard /usr/share/php*)))
SWIG_OPTS ?= -$(PHP) -DJW_PHP_MAJOR=$(PHP_MAJOR)
# Funny: swig --help states -php7 is for PHP8 and later
SWIG_OPTS ?= -php7 -DJW_PHP_MAJOR=$(PHP_MAJOR)
SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)/usr/share/$(PHP)
#SWIG_PHP_INCLUDE_DIR = /usr/include/$(PHP)
@ -166,7 +167,9 @@ SWIG_TARGETMODE ?= 0644
SWIG_WRAPPER_DEP_MK = swig.dep.mk
SWIG_INSTALLED_SO = $(addprefix $(INSTALL_LIBDIR)/,$(SWIG_MODULE_SO))
SWIG_INSTALLED_MODULE_TARGET = $(addprefix $(SWIG_MODULE_TARGET_DIR)/,$(SWIG_MODULE_TARGET))
ifneq ($(SWIG_TARGET),php)
SWIG_INSTALLED_MODULE_TARGET = $(addprefix $(SWIG_MODULE_TARGET_DIR)/,$(SWIG_MODULE_TARGET))
endif
SWIG_DEFINES += -DNON_C_BINDING
SWIG_OPTS += $(SWIG_DEFINES)