mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
libftdi: remove package and replace with package 'libftdi1', patch files for files using it this lib
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
ded704d1f8
commit
0e73cf3bdf
@ -1,11 +0,0 @@
|
||||
diff -Naur libftdi-0.20-old/configure.in libftdi-0.20-new/configure.in
|
||||
--- libftdi-0.20-old/configure.in 2012-03-19 04:20:56.000000000 -0700
|
||||
+++ libftdi-0.20-new/configure.in 2012-12-31 04:49:04.000000000 -0800
|
||||
@@ -1,6 +1,6 @@
|
||||
AC_INIT(libftdi, 0.20)
|
||||
AM_INIT_AUTOMAKE
|
||||
-AM_CONFIG_HEADER(config.h)
|
||||
+AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AC_LANG_C
|
||||
AC_PROG_CC
|
@ -16,35 +16,44 @@
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libftdi"
|
||||
PKG_VERSION="0.20"
|
||||
PKG_NAME="libftdi1"
|
||||
PKG_VERSION="1.2"
|
||||
PKG_REV=1""
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://www.intra2net.com/en/developer/libftdi/"
|
||||
PKG_URL="http://www.intra2net.com/en/developer/libftdi/download/libftdi-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb-compat"
|
||||
PKG_URL="http://www.intra2net.com/en/developer/libftdi/download/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SECTION="devel"
|
||||
PKG_SHORTDESC="libFTDI is an open source library to talk to FTDI chips"
|
||||
PKG_LONGDESC="libFTDI is an open source library to talk to FTDI chips"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="ac_cv_path_HAVELIBUSB=$ROOT/$TOOLCHAIN/bin/libusb-config \
|
||||
LIBS=-lusb \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--disable-libftdipp \
|
||||
--disable-python-binding \
|
||||
--without-examples \
|
||||
--without-docs"
|
||||
configure_target() {
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSTATICLIBS=ON \
|
||||
-DDOCUMENTATION=FALSE \
|
||||
-DEXAMPLES=FALSE \
|
||||
-DFTDIPP=FALSE \
|
||||
-DPYTHON_BINDINGS=FALSE \
|
||||
..
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
CFLAGS="$CFLAGS -fPIC -DPIC"
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf $INSTALL/usr/bin
|
||||
makeinstall_target() {
|
||||
mkdir -p $SYSROOT_PREFIX/usr/include/libftdi1
|
||||
cp ../src/ftdi.h $SYSROOT_PREFIX/usr/include/libftdi1
|
||||
|
||||
mkdir -p $SYSROOT_PREFIX/usr/lib
|
||||
cp src/libftdi1.a $SYSROOT_PREFIX/usr/lib
|
||||
|
||||
mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig
|
||||
cp libftdi1.pc $SYSROOT_PREFIX/usr/lib/pkgconfig
|
||||
}
|
@ -24,7 +24,7 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://lcdproc.org/"
|
||||
# PKG_URL="$SOURCEFORGE_SRC/lcdproc/lcdproc/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb libhid libftdi"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb libhid libftdi1"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="lcdproc: Software to display system information from your Linux/*BSD box on a LCD"
|
||||
|
@ -0,0 +1,65 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7c053d2..dcb0c4d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -314,7 +314,7 @@ AC_MSG_RESULT($enable_libftdi)
|
||||
|
||||
if test "$enable_libftdi" = "yes"; then
|
||||
ifdef([PKG_CHECK_MODULES],
|
||||
- [PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8,
|
||||
+ [PKG_CHECK_MODULES(LIBFTDI, libftdi1 >= 0.8,
|
||||
[AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])],
|
||||
[ enable_libftdi=no ])],
|
||||
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])])
|
||||
diff --git a/server/drivers/hd44780-low.h b/server/drivers/hd44780-low.h
|
||||
index 47acf45..6faa830 100644
|
||||
--- a/server/drivers/hd44780-low.h
|
||||
+++ b/server/drivers/hd44780-low.h
|
||||
@@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBFTDI
|
||||
-# include <ftdi.h>
|
||||
+# include <libftdi1/ftdi.h>
|
||||
#endif
|
||||
|
||||
/** \name Symbolic names for connection types
|
||||
diff --git a/server/drivers/i2500vfd.c b/server/drivers/i2500vfd.c
|
||||
index d896a69..7fe74f2 100644
|
||||
--- a/server/drivers/i2500vfd.c
|
||||
+++ b/server/drivers/i2500vfd.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
|
||||
#include "lcd.h"
|
||||
#include "i2500vfd.h"
|
||||
diff --git a/server/drivers/lis.c b/server/drivers/lis.c
|
||||
index 5d3e97a..6c26a19 100644
|
||||
--- a/server/drivers/lis.c
|
||||
+++ b/server/drivers/lis.c
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#include <usb.h>
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
|
||||
#include "lcd.h"
|
||||
#include "lis.h"
|
||||
diff --git a/server/drivers/ula200.c b/server/drivers/ula200.c
|
||||
index cbdde40..a84eb49 100644
|
||||
--- a/server/drivers/ula200.c
|
||||
+++ b/server/drivers/ula200.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <usb.h>
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
|
||||
#include "lcd.h"
|
||||
#include "ula200.h"
|
@ -23,7 +23,7 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.lirc.org"
|
||||
PKG_URL="$SOURCEFORGE_SRC/lirc/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libftdi libusb-compat libirman"
|
||||
PKG_DEPENDS_TARGET="toolchain libftdi1 libusb-compat libirman"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="sysutils/remote"
|
||||
PKG_SHORTDESC="lirc: Linux Infrared Remote Control"
|
||||
|
70
packages/sysutils/lirc/patches/lirc-0.9.0-050-libftdi1.patch
Normal file
70
packages/sysutils/lirc/patches/lirc-0.9.0-050-libftdi1.patch
Normal file
@ -0,0 +1,70 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 74ccba8..e40f51a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -318,7 +318,7 @@ AC_CHECK_HEADER(usb.h,
|
||||
AC_DEFINE(HAVE_LIBUSB)
|
||||
possible_drivers="${possible_drivers} (atilibusb) (awlibusb) (dfclibusb) (commandir) (srm7500libusb)"
|
||||
)
|
||||
-AC_CHECK_HEADER(ftdi.h,
|
||||
+AC_CHECK_HEADER(libftdi1/ftdi.h,
|
||||
AC_DEFINE(HAVE_FTDI)
|
||||
possible_drivers="${possible_drivers} (ftdi)"
|
||||
)
|
||||
@@ -533,7 +533,7 @@ if test "$driver" = "userspace" -o "$driver" = "all"; then
|
||||
;;
|
||||
ftdi)
|
||||
hw_module="${hw_module} hw_ftdi.o receive.o transmit.o"
|
||||
- ftdi_lib="-lftdi"
|
||||
+ ftdi_lib="-lftdi1"
|
||||
;;
|
||||
i2cuser)
|
||||
hw_module="${hw_module} hw_i2cuser.o receive.o"
|
||||
@@ -934,7 +934,7 @@ if test "$driver" = "ftdi"; then
|
||||
lirc_driver="none"
|
||||
hw_module="hw_ftdi.o receive.o transmit.o"
|
||||
HW_DEFAULT="hw_ftdi"
|
||||
- ftdi_lib="-lftdi"
|
||||
+ ftdi_lib="-lftdi1"
|
||||
fi
|
||||
|
||||
if test "$driver" = "gvbctv5pci"; then
|
||||
diff --git a/daemons/hw_ftdi.c b/daemons/hw_ftdi.c
|
||||
index d867bc9..e5ef563 100644
|
||||
--- a/daemons/hw_ftdi.c
|
||||
+++ b/daemons/hw_ftdi.c
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "transmit.h"
|
||||
#include "hw_default.h"
|
||||
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
|
||||
/* PID of the child process */
|
||||
static pid_t child_pid = -1;
|
||||
@@ -62,6 +62,7 @@ static pid_t child_pid = -1;
|
||||
static char *device_config = NULL;
|
||||
static int tx_baud_rate = 65536;
|
||||
static int rx_baud_rate = 9600;
|
||||
+static int rx_sample_rate = 16;
|
||||
static int input_pin = 1; /* RXD as input */
|
||||
static int output_pin = 2; /* RTS as output */
|
||||
static int usb_vendor = 0x0403; /* default for FT232 */
|
||||
@@ -94,7 +95,7 @@ static void parsesamples(unsigned char *buf, int n, int pipe_rxir_w)
|
||||
* The datasheet indicates that the sample rate in
|
||||
* bitbang mode is 16 times the baud rate but 32 seems
|
||||
* to be correct. */
|
||||
- usecs = (rxctr * 1000000LL) / (rx_baud_rate * 32);
|
||||
+ usecs = (rxctr * 1000000LL) / (rx_baud_rate * rx_sample_rate);
|
||||
|
||||
/* Clamp */
|
||||
if (usecs > PULSE_MASK) {
|
||||
@@ -142,7 +143,7 @@ static void child_process(int fd_rx2main, int fd_main2tx, int fd_tx2main)
|
||||
|
||||
/* Enable bit-bang mode, setting output & input pins
|
||||
direction */
|
||||
- if (ftdi_enable_bitbang(&ftdic, 1 << output_pin) < 0) {
|
||||
+ if (ftdi_set_bitmode(&ftdic, 1 << output_pin, BITMODE_BITBANG) < 0) {
|
||||
logprintf(LOG_ERR, "unable to enable bitbang mode (%s)", ftdi_get_error_string(&ftdic));
|
||||
goto retry;
|
||||
}
|
@ -23,7 +23,7 @@ PKG_ARCH="i386 x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.flashrom.org"
|
||||
PKG_URL="http://download.flashrom.org/releases/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib pciutils libftdi"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib pciutils libftdi1"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="tools"
|
||||
PKG_SHORTDESC="flashrom: linux BIOS programmer"
|
||||
|
35
packages/tools/flashrom/patches/flashrom-01-libftdi1.patch
Normal file
35
packages/tools/flashrom/patches/flashrom-01-libftdi1.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6b70ab8..f602b45 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -436,7 +436,7 @@ NEED_PCI := yes
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FT2232_SPI), yes)
|
||||
-FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
|
||||
+FTDILIBS := $(shell pkg-config --libs libftdi1 2>/dev/null || printf "%s" "-lftdi1 -lusb")
|
||||
# This is a totally ugly hack.
|
||||
FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_FT2232_SPI=1'")
|
||||
FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
|
||||
@@ -666,7 +666,7 @@ featuresavailable:
|
||||
endif
|
||||
|
||||
define FTDI_TEST
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
struct ftdi_context *ftdic = NULL;
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
diff --git a/ft2232_spi.c b/ft2232_spi.c
|
||||
index a5d3828..d54cf6a 100644
|
||||
--- a/ft2232_spi.c
|
||||
+++ b/ft2232_spi.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "flash.h"
|
||||
#include "programmer.h"
|
||||
#include "spi.h"
|
||||
-#include <ftdi.h>
|
||||
+#include <libftdi1/ftdi.h>
|
||||
|
||||
/* Please keep sorted by vendor ID, then device ID. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user