修改自 http://patchwork.ozlabs.org/patch/195057/
修改处:
仓库地址
git指纹版本
去除udev
修正拷贝库名错误
添加QTSERIALPORT_SITE_METHOD = git 虽然会自动检测使用git,但还是强制加上显式下载方式为git
diff --git a/package/Config.in b/package/Config.in
index 9e1c0ae..d61ca6f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -146,6 +146,7 @@ source "package/sdl_gfx/Config.in"
comment "other GUIs"
source "package/efl/Config.in"
source "package/qt/Config.in"
+source "package/qtserialport/Config.in"
if BR2_PACKAGE_QT
comment "QT libraries and helper libraries"
diff --git a/package/qtserialport/Config.in b/package/qtserialport/Config.in
new file mode 100644
index 0000000..f84387a
--- /dev/null
+++ b/package/qtserialport/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_QTSERIALPORT
+bool "QtSerialPort"
+depends on BR2_PACKAGE_QT
+depends on BR2_PACKAGE_UDEV
+help
+ QtSerialPort module is an add-on for the Qt library, providing
+ a single interface for both hardware and virtual serial ports.
+
+ http://qt-project.org/wiki/QtSerialPort
+
+comment "QtSerialPort requires udev support"
+ depends on !(BR2_PACKAGE_UDEV)
diff --git a/package/qtserialport/qtserialport.mk b/package/qtserialport/qtserialport.mk
new file mode 100644
index 0000000..79fa48b
--- /dev/null
+++ b/package/qtserialport/qtserialport.mk
@@ -0,0 +1,37 @@
+#############################################################
+#
+# QtSerialPort
+#
+#############################################################
+QTSERIALPORT_VERSION = 0da1b020e3a1826d81334ee1ccda840b00c7a03f
+QTSERIALPORT_SITE = git://gitorious.org/qt/qtserialport.git
+QTSERIALPORT_LICENSE = LGPLv2
+QTSERIALPORT_SITE_METHOD = git
+QTSERIALPORT_LICENSE_FILES = LICENSE.LGPL
+QTSERIALPORT_INSTALL_STAGING = YES
+
+QTSERIALPORT_DEPENDENCIES = qt
+#udev
+
+QTSERIALPORT_LDFLAGS = $(TARGET_LDFLAGS)
+
+define QTSERIALPORT_CONFIGURE_CMDS
+(cd $(@D); \
+$(QT_QMAKE) -recursive CONFIG+=release)
+endef
+
+define QTSERIALPORT_BUILD_CMDS
+$(MAKE) -C $(@D)/src
+endef
+
+define QTSERIALPORT_INSTALL_STAGING_CMDS
+$(MAKE) -C $(@D)/src DESTDIR=$(STAGING_DIR) install
+cp -r $(HOST_DIR)/usr/include/QtAddOnSerialPort $(STAGING_DIR)/usr/include/
+endef
+
+define QTSERIALPORT_INSTALL_TARGET_CMDS
+cp -dpfr $(STAGING_DIR)/usr/lib/libQtSerialPort.so.* \
+$(TARGET_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))