Просмотр исходного кода

libftdi: Import 0.19 from packages and update to 0.20.

Álvaro Fernández Rojas 10 лет назад
Родитель
Сommit
7ae5777b3e
2 измененных файлов: 64 добавлений и 0 удалений
  1. 53
    0
      libs/libftdi/Makefile
  2. 11
    0
      libs/libftdi/patches/100-fix-x86_64-build.patch

+ 53
- 0
libs/libftdi/Makefile Просмотреть файл

@@ -0,0 +1,53 @@
1
+#
2
+# Copyright (C) 2011-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:=libftdi
11
+PKG_VERSION:=0.20
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
16
+PKG_MD5SUM:=355d4474e3faa81b485d6a604b06951f
17
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
18
+
19
+PKG_INSTALL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+include $(INCLUDE_DIR)/cmake.mk
23
+
24
+define Package/libftdi
25
+  SECTION:=libs
26
+  CATEGORY:=Libraries
27
+  DEPENDS:=+libusb-compat
28
+  TITLE:=Library to talk to FTDI chips
29
+  URL:=http://www.intra2net.com/en/developer/libftdi/
30
+endef
31
+
32
+define Package/libftdi/description
33
+  libFTDI - FTDI USB driver with bitbang mode
34
+  libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode. 
35
+  The library is linked with your program in userspace, no kernel driver required.
36
+endef
37
+
38
+define Build/InstallDev
39
+	$(INSTALL_DIR) $(1)/usr/include/
40
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
41
+	$(INSTALL_DIR) $(1)/usr/lib
42
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so} $(1)/usr/lib/
43
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so* $(1)/usr/lib/
44
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
45
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc
46
+endef
47
+
48
+define Package/libftdi/install
49
+	$(INSTALL_DIR) $(1)/usr/lib
50
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
51
+endef
52
+
53
+$(eval $(call BuildPackage,libftdi))

+ 11
- 0
libs/libftdi/patches/100-fix-x86_64-build.patch Просмотреть файл

@@ -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
+     SET(LIB_SUFFIX "")
5
+     SET(PACK_ARCH "")
6
+   ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
7
+-    SET(LIB_SUFFIX 64)
8
++    SET(LIB_SUFFIX "")
9
+     SET(PACK_ARCH .x86_64)
10
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
11
+