xref: /OK3568_Linux_fs/buildroot/package/swig/swig.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# swig
4#
5################################################################################
6
7SWIG_VERSION_MAJOR = 4.0
8SWIG_VERSION = $(SWIG_VERSION_MAJOR).2
9SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION)
10HOST_SWIG_DEPENDENCIES = host-bison host-pcre
11HOST_SWIG_CONF_OPTS = \
12	--with-pcre \
13	--disable-ccache \
14	--without-octave
15SWIG_LICENSE = GPL-3.0+, BSD-2-Clause, BSD-3-Clause
16SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
17
18# CMake looks first at swig3.0, then swig2.0 and then swig. However,
19# when doing the search, it will look into the PATH for swig2.0 first,
20# and then for swig.
21# While the PATH contains first our $(HOST_DIR)/bin, it also contains
22# /usr/bin and other system directories. Therefore, if there is an
23# installed swig3.0 on the system, it will get the preference over the
24# swig installed in $(HOST_DIR)/bin, which isn't nice. To prevent
25# this from happening we create a symbolic link swig3.0 -> swig, so that
26# our swig always gets used.
27
28define HOST_SWIG_INSTALL_SYMLINK
29	ln -fs swig $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR)
30	ln -fs swig $(HOST_DIR)/bin/swig3.0
31endef
32
33HOST_SWIG_POST_INSTALL_HOOKS += HOST_SWIG_INSTALL_SYMLINK
34
35$(eval $(host-autotools-package))
36
37SWIG = $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR)
38