Package: libticables3
Severity: important
Tags: patch
Hi,
libticables3 fails to build on GNU/KFreeBSD fails to build for various
reasons:
- tidev-modules-source is linux only
- some minor things in the C code. They have been solved by using the
patches availables in the FreeBSD ports.
You will find attached a patch to fix that. Could you please apply it in
the next upload.
Thanks in advance,
Aurelien
-- System Information:
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.3-1
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
diff -u libticables3-3.9.2/debian/rules libticables3-3.9.2/debian/rules
--- libticables3-3.9.2/debian/rules
+++ libticables3-3.9.2/debian/rules
@@ -9,7 +9,7 @@
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
@@ -84,7 +84,6 @@
# install the HTML documentation
cp -a docs/html debian/libticables3-dev/usr/share/doc/libticables3-dev/
-
dh_installman
dh_installinfo
dh_installchangelogs ChangeLog
@@ -95,7 +94,11 @@
dh_makeshlibs
dh_installdeb
dh_shlibdeps
+ifeq (linux,$(DEB_HOST_ARCH_OS))
+ dh_gencontrol -- -Vtidev-modules-source="tidev-modules-source (>= 1.4)"
+else
dh_gencontrol
+endif
dh_md5sums
dh_builddeb
diff -u libticables3-3.9.2/debian/control libticables3-3.9.2/debian/control
--- libticables3-3.9.2/debian/control
+++ libticables3-3.9.2/debian/control
@@ -3,12 +3,12 @@
Priority: optional
Maintainer: Julien BLACHE <[EMAIL PROTECTED]>
Standards-Version: 3.6.2
-Build-Depends: debhelper (>> 4.0.0), tidev-modules-source (>= 1.4), libusb-dev (>= 1:0.1.5-2), pkg-config, autotools-dev, gettext
+Build-Depends: debhelper (>> 4.0.0), tidev-modules-source (>= 1.4) [!hurd-i386 !kfreebsd-i386], libusb-dev (>= 1:0.1.5-2), pkg-config, autotools-dev, gettext
Package: libticables3-dev
Section: libdevel
Architecture: any
-Depends: libticables3 (= ${Source-Version}), libusb-dev (>= 1:0.1.5-2), tidev-modules-source (>= 1.4), libc6-dev, pkg-config
+Depends: libticables3 (= ${Source-Version}), libusb-dev (>= 1:0.1.5-2), ${tidev-modules-source}, libc6-dev | libc-dev, pkg-config
Conflicts: libticables-dev, libticables2-dev
Description: support library for Texas Instruments link cables [development files]
This library provides functions to use Texas Instruments link cables for TI
only in patch2:
unchanged:
--- libticables3-3.9.2.orig/src/bsd/bsd_mapping.c
+++ libticables3-3.9.2/src/bsd/bsd_mapping.c
@@ -74,9 +74,7 @@
break;
case LINK_AVR:
- if(resources & IO_API) {
- *method |= IOM_API | IOM_OK;
- }
+ printl1(2, "AVR link support has been removed !\n");
break;
case LINK_SER:
@@ -114,6 +112,7 @@
case LINK_TIE:
case LINK_VTI:
+ case LINK_VTL:
*method |= IOM_API | IOM_OK;
break;
@@ -212,7 +211,10 @@
ret = bsd_map_io((TicableMethod)method, port);
if(ret)
return ret;
-
+
+ // set fields to default values
+ nul_register_cable(lc);
+
// set the link cable
printl1(0, _("registering cable...\n"));
switch (type) {
@@ -244,16 +246,6 @@
ser_register_cable_2(lc);
break;
- case LINK_AVR:
- if ((port != SERIAL_PORT_1) &&
- (port != SERIAL_PORT_2) &&
- (port != SERIAL_PORT_3) &&
- (port != SERIAL_PORT_4) && (port != USER_PORT))
- return ERR_INVALID_PORT;
-
- avr_register_cable(lc);
- break;
-
case LINK_VTL:
if ((port != VIRTUAL_PORT_1) && (port != VIRTUAL_PORT_2))
return ERR_INVALID_PORT;
only in patch2:
unchanged:
--- libticables3-3.9.2.orig/src/linux/slv_link2.c
+++ libticables3-3.9.2/src/linux/slv_link2.c
@@ -111,7 +111,7 @@
{}
};
-//static int max_ps = 32; // max packet size (32 ot 64)
+static int max_ps = 32; // max packet size (32 ot 64)
static int nBytesWrite2 = 0;
static uint8_t *wBuf2 = NULL;