summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2007-11-14 16:46:21 +0000
committerJoe Peterson <lavajoe@gentoo.org>2007-11-14 16:46:21 +0000
commit17e892515d6eb093810d3e0c045873e9de5076ad (patch)
tree5020f2a3c2abbdc93f371c393daf1a0e907f4e6d /sys-apps
parentRun bootstrapping checks in src_test() (diff)
downloadgentoo-2-17e892515d6eb093810d3e0c045873e9de5076ad.tar.gz
gentoo-2-17e892515d6eb093810d3e0c045873e9de5076ad.tar.bz2
gentoo-2-17e892515d6eb093810d3e0c045873e9de5076ad.zip
Patched to compile on FreeBSD (bug #197678)
(Portage version: 2.1.3.19)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/usbutils/ChangeLog6
-rw-r--r--sys-apps/usbutils/files/usbutils-0.73-byteorder.patch40
-rw-r--r--sys-apps/usbutils/usbutils-0.73.ebuild7
3 files changed, 50 insertions, 3 deletions
diff --git a/sys-apps/usbutils/ChangeLog b/sys-apps/usbutils/ChangeLog
index 45dc382bb479..e102c7e63409 100644
--- a/sys-apps/usbutils/ChangeLog
+++ b/sys-apps/usbutils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/usbutils
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/ChangeLog,v 1.61 2007/10/29 22:47:04 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/ChangeLog,v 1.62 2007/11/14 16:46:21 lavajoe Exp $
+
+ 14 Nov 2007; Joe Peterson <lavajoe@gentoo.org>
+ +files/usbutils-0.73-byteorder.patch, usbutils-0.73.ebuild:
+ Patched to compile on FreeBSD (bug #197678)
*usbutils-0.73 (29 Oct 2007)
diff --git a/sys-apps/usbutils/files/usbutils-0.73-byteorder.patch b/sys-apps/usbutils/files/usbutils-0.73-byteorder.patch
new file mode 100644
index 000000000000..76cd9505e7f9
--- /dev/null
+++ b/sys-apps/usbutils/files/usbutils-0.73-byteorder.patch
@@ -0,0 +1,40 @@
+diff -ur usbutils-0.73.old/configure.in usbutils-0.73.new/configure.in
+--- usbutils-0.73.old/configure.in 2007-11-13 10:19:41 -0500
++++ usbutils-0.73.new/configure.in 2007-11-13 10:23:12 -0500
+@@ -20,10 +20,11 @@
+ AC_FUNC_ALLOCA
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h getopt.h errno.h ])
++AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h getopt.h errno.h asm/byteorder.h machine/endian.h])
+
+-# Checks for typedefs, structures, and compiler characteristics.
++# Checks for typedefs, structures, byte order, and compiler characteristics.
+ AC_C_CONST
++AC_C_BIGENDIAN
+ AC_TYPE_OFF_T
+ AC_TYPE_SIZE_T
+
+diff -ur usbutils-0.73.old/lsusb.c usbutils-0.73.new/lsusb.c
+--- usbutils-0.73.old/lsusb.c 2007-11-13 10:19:41 -0500
++++ usbutils-0.73.new/lsusb.c 2007-11-13 10:23:12 -0500
+@@ -35,8 +35,17 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+-#include <asm/byteorder.h>
+-#define le16_to_cpu __le16_to_cpu
++#if defined(HAVE_ASM_BYTEORDER_H)
++# include <asm/byteorder.h>
++# define le16_to_cpu __le16_to_cpu
++#elif defined(HAVE_MACHINE_ENDIAN_H)
++# include <machine/endian.h>
++# ifdef WORDS_BIGENDIAN
++# define le16_to_cpu __bswap16
++# else
++# define le16_to_cpu(x) (x)
++# endif
++#endif
+ #include <usb.h>
+
+ /* NOTE: that should be <libusb.h> and it should include
diff --git a/sys-apps/usbutils/usbutils-0.73.ebuild b/sys-apps/usbutils/usbutils-0.73.ebuild
index daeb13aa4c1c..ad47b551ef7e 100644
--- a/sys-apps/usbutils/usbutils-0.73.ebuild
+++ b/sys-apps/usbutils/usbutils-0.73.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/usbutils-0.73.ebuild,v 1.1 2007/10/29 22:47:04 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/usbutils-0.73.ebuild,v 1.2 2007/11/14 16:46:21 lavajoe Exp $
-inherit eutils
+inherit eutils autotools
DESCRIPTION="USB enumeration utilities"
HOMEPAGE="http://linux-usb.sourceforge.net/"
@@ -21,6 +21,7 @@ src_unpack() {
cd "${S}"
cp update-usbids.sh update-usbids.sh.orig
epatch "${FILESDIR}"/${PN}-0.72-update-usbids.patch
+ epatch "${FILESDIR}"/${P}-byteorder.patch
# put usb.ids in same place as pci.ids (/usr/share/misc)
sed -i \
@@ -28,6 +29,8 @@ src_unpack() {
lsusb.8 || die "sed lsusb.8"
sed -e '/^DEST=/s:=usb.ids:=/usr/share/misc/usb.ids:' \
update-usbids.sh > update-usbids
+
+ eautoreconf
}
src_compile() {