libftdi1: Fix compilation with cmake 3.12 6633/head
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Tue, 31 Jul 2018 20:55:22 +0000 (17:55 -0300)
committerEneas U de Queiroz <cote2004-github@yahoo.com>
Tue, 31 Jul 2018 21:12:28 +0000 (18:12 -0300)
Applied a patch submitted upstream that fixes a compilation error with
cmake >= 3.12 Error: Unable to find 'swig.swg' [...] 'python.swg'

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
libs/libftdi1/Makefile
libs/libftdi1/patches/101-use-findSWIG.patch [new file with mode: 0644]

index 35c3bf006145760947cb8eedf48c6d04b0c9daad..fddf4034134c85ac7efca0a4592c5d96e6bdfd11 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libftdi1
 PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
diff --git a/libs/libftdi1/patches/101-use-findSWIG.patch b/libs/libftdi1/patches/101-use-findSWIG.patch
new file mode 100644 (file)
index 0000000..91542ca
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -3,7 +3,7 @@ option ( LINK_PYTHON_LIBRARY "Link again
+ if ( PYTHON_BINDINGS )
+   # workaround for cmake bug #0013449
+-  if ( NOT DEFINED CMAKE_FIND_ROOT_PATH )
++  if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0 )
+     find_package ( SWIG )
+   else ()
+     find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )