Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197678 - usbutils-0.73 does not compile on FreeBSD
Summary: usbutils-0.73 does not compile on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 20:00 UTC by Joe Peterson (RETIRED)
Modified: 2007-11-14 16:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/usbutils-0.73-freebsd.patch (usbutils-0.73-freebsd.patch,503 bytes, patch)
2007-10-31 20:02 UTC, Joe Peterson (RETIRED)
Details | Diff
usbutils-0.73.ebuild (diff,405 bytes, patch)
2007-10-31 20:03 UTC, Joe Peterson (RETIRED)
Details | Diff
usbutils-0.73.ebuild (diff,1.08 KB, patch)
2007-11-01 16:10 UTC, Joe Peterson (RETIRED)
Details | Diff
files/usbutils-0.73-byteorder.patch (usbutils-0.73-byteorder.patch,1.14 KB, patch)
2007-11-01 16:12 UTC, Joe Peterson (RETIRED)
Details | Diff
files/usbutils-0.73-byteorder.patch (usbutils-0.73-byteorder.patch,1.35 KB, patch)
2007-11-13 15:29 UTC, Joe Peterson (RETIRED)
Details | Diff
files/usbutils-0.73-byteorder.patch (usbutils-0.73-byteorder.patch,1.35 KB, patch)
2007-11-13 15:31 UTC, Joe Peterson (RETIRED)
Details | Diff
files/usbutils-0.73-byteorder.patch (usbutils-0.73-byteorder.patch,1.35 KB, patch)
2007-11-13 15:37 UTC, Joe Peterson (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Peterson (RETIRED) gentoo-dev 2007-10-31 20:00:56 UTC
The new version uses asm/byteorder.h and its function __le16_to_cpu, which do not exist in FreeBSD.  I will attach a patch.

Please let me know if it is OK to check in the patch.
Comment 1 Joe Peterson (RETIRED) gentoo-dev 2007-10-31 20:02:01 UTC
Created attachment 134833 [details, diff]
files/usbutils-0.73-freebsd.patch

Patch to use an alternate method in FreeBSD
Comment 2 Joe Peterson (RETIRED) gentoo-dev 2007-10-31 20:03:27 UTC
Created attachment 134834 [details, diff]
usbutils-0.73.ebuild

The ebuild change to use this patch
Comment 3 SpanKY gentoo-dev 2007-11-01 00:20:09 UTC
usbutils uses autotools ... so should you
Comment 4 Joe Peterson (RETIRED) gentoo-dev 2007-11-01 05:08:40 UTC
Mike, can you elaborate: how would you patch this?
Comment 5 SpanKY gentoo-dev 2007-11-01 06:17:09 UTC
system related defines are not valid in autotool based systems

add proper configure checks and key off of those defines
Comment 6 Joe Peterson (RETIRED) gentoo-dev 2007-11-01 16:10:07 UTC
Created attachment 134912 [details, diff]
usbutils-0.73.ebuild

New ebuild to patch and reconf autotools instead
Comment 7 Joe Peterson (RETIRED) gentoo-dev 2007-11-01 16:12:23 UTC
Created attachment 134913 [details, diff]
files/usbutils-0.73-byteorder.patch

New patch using autotools to determine how to deal with byteorder.  Mike, let me know what you think.
Comment 8 Joe Peterson (RETIRED) gentoo-dev 2007-11-05 18:55:57 UTC
This patch has been submitted to upstream.  Please advise on how to proceed for 0.73.  Thanks, Joe
Comment 9 SpanKY gentoo-dev 2007-11-12 07:27:25 UTC
i'd indent stuff myself ...
#if moo
# include ...
# if ...
#  ....
but otherwise looks fine

did you submit this upstream ?
Comment 10 SpanKY gentoo-dev 2007-11-12 07:30:59 UTC
on second thought, dont use _BYTE_ORDER

there is an AC macro:
AC_C_BIGENDIAN

this will define "WORDS_BIGENDIAN" if targetting a big endian machine
Comment 11 Joe Peterson (RETIRED) gentoo-dev 2007-11-13 15:29:27 UTC
Created attachment 135897 [details, diff]
files/usbutils-0.73-byteorder.patch

OK, see new patch and let me know how this looks.

I did submit to upstream, but I'm sure they will accept this change as well.
Comment 12 Joe Peterson (RETIRED) gentoo-dev 2007-11-13 15:31:16 UTC
Created attachment 135899 [details, diff]
files/usbutils-0.73-byteorder.patch

Use this one instead.
Comment 13 Joe Peterson (RETIRED) gentoo-dev 2007-11-13 15:37:16 UTC
Created attachment 135900 [details, diff]
files/usbutils-0.73-byteorder.patch

This one is even more clear I think...
Comment 14 SpanKY gentoo-dev 2007-11-14 08:11:19 UTC
one space, not two ... but otherwise looks fine

side note, never use "#" comments in configure.ac files ... use "dnl"
Comment 15 Joe Peterson (RETIRED) gentoo-dev 2007-11-14 16:50:28 UTC
Fixed the indentation (using one space now) and committed.  Thanks Mike!
Submitted new AC endian macro tweak upstream.