738cefe700
The host-swig package installs the swig binary as 'swig' and adds a swig<major> symlink (E.G. swig4.0). This causes issues for older software which may not know about the 4.0 version of swig, E.G. CMake 3.10.x contains the following swig detection logic: find_program(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig) If the host has a 3.x or 2.x variant of swig installed, then that will be used instead of our host-swig. As a workaround, also add a swig3.0 symlink so our host-swig will be used. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> [Peter: reworded] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
38 lines
1.3 KiB
Makefile
38 lines
1.3 KiB
Makefile
################################################################################
|
|
#
|
|
# swig
|
|
#
|
|
################################################################################
|
|
|
|
SWIG_VERSION_MAJOR = 4.0
|
|
SWIG_VERSION = $(SWIG_VERSION_MAJOR).1
|
|
SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION)
|
|
HOST_SWIG_DEPENDENCIES = host-bison host-pcre
|
|
HOST_SWIG_CONF_OPTS = \
|
|
--with-pcre \
|
|
--disable-ccache \
|
|
--without-octave
|
|
SWIG_LICENSE = GPL-3.0+, BSD-2-Clause, BSD-3-Clause
|
|
SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
|
|
|
|
# CMake looks first at swig3.0, then swig2.0 and then swig. However,
|
|
# when doing the search, it will look into the PATH for swig2.0 first,
|
|
# and then for swig.
|
|
# While the PATH contains first our $(HOST_DIR)/bin, it also contains
|
|
# /usr/bin and other system directories. Therefore, if there is an
|
|
# installed swig3.0 on the system, it will get the preference over the
|
|
# swig installed in $(HOST_DIR)/bin, which isn't nice. To prevent
|
|
# this from happening we create a symbolic link swig3.0 -> swig, so that
|
|
# our swig always gets used.
|
|
|
|
define HOST_SWIG_INSTALL_SYMLINK
|
|
ln -fs swig $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR)
|
|
ln -fs swig $(HOST_DIR)/bin/swig3.0
|
|
endef
|
|
|
|
HOST_SWIG_POST_INSTALL_HOOKS += HOST_SWIG_INSTALL_SYMLINK
|
|
|
|
$(eval $(host-autotools-package))
|
|
|
|
SWIG = $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR)
|