[Lunar-commits] <moonbase-other> libftdi1: remove patch file and use sedit instead

v4hn me at v4hn.de
Mon Sep 1 23:16:41 CEST 2014


commit e43190b66f06557d4aad7b05ea794a466f02f2c6
Author: v4hn <me at v4hn.de>
Date: Mon, 01 Sep 2014 23:16:12 +0200
URL: https://github.com/lunar-linux/moonbase-other/commit/e43190b66f06557d4aad7b05ea794a466f02f2c6

libftdi1: remove patch file and use sedit instead
---
  devel/libftdi1/PRE_BUILD                        | +2/-1     
  devel/libftdi1/libftdi1-1.1-no-double-open.diff | +0/-21    
  2 files changed, 2 insertions(+), 22 deletions(-)

--- a/devel/libftdi1/PRE_BUILD
+++ b/devel/libftdi1/PRE_BUILD
@@ -3,4 +3,5 @@ default_pre_build &&
 # make cmake report correct C++ library
 sedit 's/ftdi1pp/ftdipp1/' CMakeLists.txt &&
 
-patch_it $SCRIPT_DIRECTORY/libftdi1-1.1-no-double-open.diff 1
+# backported commit bc3841238bac9cb6955848fd661bbf19a5ed42c6 to 1.1
+sedit '416 s@^.*$@    if (ftdi->usb_dev == NULL \&\& libusb_open(dev, \&ftdi->usb_dev) < 0)@' src/ftdi.c
--- a/devel/libftdi1/libftdi1-1.1-no-double-open.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-commit bc3841238bac9cb6955848fd661bbf19a5ed42c6
-Author: Denis Sirotkin <reg.libftdi at demitel.ru>
-Date:   Fri May 16 17:40:13 2014 +0200
-
-    ftdi_usb_get_strings(): Don't try to open an already open device
-
-diff --git a/src/ftdi.c b/src/ftdi.c
-index b6caf6c..add6dc2 100644
---- a/src/ftdi.c
-+++ b/src/ftdi.c
-@@ -413,8 +413,8 @@ int ftdi_usb_get_strings(struct ftdi_context * ftdi, struct libusb_device * dev,
-     if ((ftdi==NULL) || (dev==NULL))
-         return -1;
- 
--    if (libusb_open(dev, &ftdi->usb_dev) < 0)
--        ftdi_error_return(-4, "libusb_open() failed");
-+    if (ftdi->usb_dev == NULL && libusb_open(dev, &ftdi->usb_dev) < 0)
-+            ftdi_error_return(-4, "libusb_open() failed");
- 
-     if (libusb_get_device_descriptor(dev, &desc) < 0)
-         ftdi_error_return(-11, "libusb_get_device_descriptor() failed");




More information about the Lunar-commits mailing list