open-plc-utils: new package
[buildroot-gz.git] / package / swig / swig.mk
blob3ef56d63e9d775114f96a2f3c5c957416b642900
1 ################################################################################
3 # swig
5 ################################################################################
7 SWIG_MAJOR = 2.0
8 SWIG_VERSION = $(SWIG_MAJOR).12
9 SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION)
10 SWIG_DEPENDENCIES = host-bison
11 HOST_SWIG_CONF_OPTS = \
12 --without-pcre \
13 --disable-ccache \
14 --without-octave
15 SWIG_LICENSE = GPLv3+ BSD-2c BSD-3c
16 SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
18 # CMake looks first at swig2.0 and then swig. However, when doing the
19 # search, it will look into the PATH for swig2.0 first, and then for
20 # swig. While the PATH contains first our $(HOST_DIR)/usr/bin, it also
21 # contains /usr/bin and other system directories. Therefore, if there
22 # is an installed swig2.0 on the system, it will get the preference
23 # over the swig installed in $(HOST_DIR)/usr/bin, which isn't nice. To
24 # prevent this from happening we create a symbolic link swig2.0 ->
25 # swig, so that our swig always gets used.
27 define HOST_SWIG_INSTALL_SYMLINK
28 ln -fs $(HOST_DIR)/usr/bin/swig $(HOST_DIR)/usr/bin/swig$(SWIG_MAJOR)
29 endef
31 HOST_SWIG_POST_INSTALL_HOOKS += HOST_SWIG_INSTALL_SYMLINK
33 $(eval $(host-autotools-package))
35 SWIG = $(HOST_DIR)/usr/bin/swig$(SWIG_MAJOR)