Browse Source

libftdi1: add new package.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Álvaro Fernández Rojas 10 years ago
parent
commit
3db70e01a8
2 changed files with 67 additions and 0 deletions
  1. 56
    0
      libs/libftdi1/Makefile
  2. 11
    0
      libs/libftdi1/patches/100-fix-x86_64-build.patch

+ 56
- 0
libs/libftdi1/Makefile View File

@@ -0,0 +1,56 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libftdi1
11
+PKG_VERSION:=1.1
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
16
+PKG_MD5SUM:=b79a6356978aa8e69f8eecc3a720ff79
17
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
18
+
19
+PKG_LICENSE:=LGPL-2.0
20
+PKG_LICENSE_FILES:=COPYING.LIB
21
+
22
+PKG_INSTALL:=1
23
+
24
+include $(INCLUDE_DIR)/package.mk
25
+include $(INCLUDE_DIR)/cmake.mk
26
+
27
+define Package/libftdi1
28
+  SECTION:=libs
29
+  CATEGORY:=Libraries
30
+  DEPENDS:=+libusb-1.0
31
+  TITLE:=Library to talk to FTDI chips
32
+  URL:=http://www.intra2net.com/en/developer/libftdi/
33
+endef
34
+
35
+define Package/libftdi1/description
36
+  libFTDI - FTDI USB driver with bitbang mode
37
+  libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode. 
38
+  The library is linked with your program in userspace, no kernel driver required.
39
+endef
40
+
41
+define Build/InstallDev
42
+	$(INSTALL_DIR) $(1)/usr/include/libftdi1/
43
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/
44
+	$(INSTALL_DIR) $(1)/usr/lib
45
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so} $(1)/usr/lib/
46
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.so* $(1)/usr/lib/
47
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
48
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi1.pc $(1)/usr/lib/pkgconfig/libftdi1.pc
49
+endef
50
+
51
+define Package/libftdi1/install
52
+	$(INSTALL_DIR) $(1)/usr/lib
53
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.so.* $(1)/usr/lib/
54
+endef
55
+
56
+$(eval $(call BuildPackage,libftdi1))

+ 11
- 0
libs/libftdi1/patches/100-fix-x86_64-build.patch View File

@@ -0,0 +1,11 @@
1
+--- a/CMakeLists.txt
2
++++ b/CMakeLists.txt
3
+@@ -43,7 +43,7 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
4
+       AND NOT EXISTS "/etc/debian_version"
5
+       AND NOT EXISTS "/etc/arch-release" )
6
+     if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
7
+-      set ( LIB_SUFFIX 64 )
8
++      set ( LIB_SUFFIX "" )
9
+     endif ()
10
+   endif ()
11
+ endif ()