packages/libs/libftdi/Makefile
Rosen Penev 6c40424879 libftdi: Fix compilation with most recent CMake
Description from Amol Bhave:

This package fails to compile with boost 1.70 when the boost cmake
config gets used.
As far as I can tell, Boost 1.70 introduced
BoostConfigVersion.cmake. In that file, the value of PACKAGE_VERSION is
set to 1.70. This makes CMake auto set the variable Boost_VERSION to
1.70. Historically, Boost_VERSION has been using the format like 170000,
and not 1.70. Some package cmake files still depend on this behavior
and make assertions such as Boost_VERSION > 168000. This is incompatible
with the new scheme.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-05-15 17:27:02 -07:00

66 lines
2 KiB
Makefile

#
# Copyright (C) 2011-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libftdi
PKG_VERSION:=0.20
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
PKG_HASH:=3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=LGPL-2.0
PKG_LICENSE_FILES:=COPYING.LIB
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libftdi
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libusb-compat
TITLE:=Library to talk to FTDI chips
URL:=http://www.intra2net.com/en/developer/libftdi/
endef
define Package/libftdi/description
libFTDI - FTDI USB driver with bitbang mode
libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
The library is linked with your program in userspace, no kernel driver required.
endef
CMAKE_OPTIONS += -DBoost_NO_BOOST_CMAKE=ON
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc
$(SED) \
's,/usr/include,$$$${prefix}/include,g' \
$(1)/usr/lib/pkgconfig/libftdi.pc
$(SED) \
's,/usr/lib,$$$${prefix}/lib,g' \
$(1)/usr/lib/pkgconfig/libftdi.pc
endef
define Package/libftdi/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libftdi-config $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libftdi))