libupm: don't set SWIG_DIR, force python 2.7
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Tue, 7 Aug 2018 11:59:12 +0000 (08:59 -0300)
committerEneas U de Queiroz <cote2004-github@yahoo.com>
Tue, 7 Aug 2018 13:31:54 +0000 (10:31 -0300)
CMake 3.0.12 uses SWIG_DIR to set SWIG_LIB, used as the library
install location, which defaults to
$(STAGING_HOSTPKG)/share/sig/(SWIGVERSION).  If it is set, then the
original installed swig library directory is ignored, and compilation
fails:
[  0%] Swig source
:1: Error: Unable to find 'swig.swg'
:3: Error: Unable to find 'python.swg'

Instead of setting it manually, let the default be used, which works
well.

Also, cmake picks up python3, while package wants 2.7, so we add
-DPython_ADDITIONAL_VERSIONS=2.7 to force use of 2.7, not 3.x.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
libs/libupm/Makefile

index 327c2f582f0c0f7a960b683f07820a60015b18fd..4ff86afc8377ede92d46f0e485d6c30ad637c88b 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=libupm
 PKG_VERSION:=0.4.0
 
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/upm.git
@@ -38,7 +38,7 @@ UPM_MODULES:= \
 
 CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
        -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
-       -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
+       -DPython_ADDITIONAL_VERSIONS=2.7
 
 define Package/libupm/Default
   SECTION:=libs