mirror of
https://github.com/mvp/uhubctl.git
synced 2026-05-17 00:16:13 +03:00
Fix FreeBSD build, update docs regarding pkg-config
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,3 +10,6 @@ uhubctl
|
|||||||
# Patches
|
# Patches
|
||||||
*.patch
|
*.patch
|
||||||
*.diff
|
*.diff
|
||||||
|
|
||||||
|
# IDE config dirs
|
||||||
|
.*/
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -164,17 +164,19 @@ is using `winusb.sys` driver, which according to Microsoft does not support
|
|||||||
[necessary USB control requests](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f680b63f-ca4f-4e52-baa9-9e64f8eee101).
|
[necessary USB control requests](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f680b63f-ca4f-4e52-baa9-9e64f8eee101).
|
||||||
This may be fixed if `libusb` starts supporting different driver on Windows.
|
This may be fixed if `libusb` starts supporting different driver on Windows.
|
||||||
|
|
||||||
Note that it is highly recommended to have `pkg-config` installed (many platforms provide it by default).
|
Note that it is highly recommended to have utility `pkg-config` installed
|
||||||
|
(many platforms provide it in package `pkg-config` or `pkgconf`,
|
||||||
|
often it is installed by default).
|
||||||
|
|
||||||
First, you need to install library libusb-1.0 (version 1.0.13 or later is required,
|
First, you need to install library libusb-1.0 (version 1.0.13 or later is required,
|
||||||
1.0.23 or later is recommended):
|
1.0.23 or later is recommended):
|
||||||
|
|
||||||
* Ubuntu: `sudo apt-get install libusb-1.0-0-dev`
|
* Ubuntu: `sudo apt-get install libusb-1.0-0-dev pkgconf`
|
||||||
* Redhat: `sudo yum install libusb1-devel`
|
* Redhat: `sudo yum install libusb1-devel pkgconf`
|
||||||
* OpenSUSE: `sudo zypper install libusb-1_0-devel`
|
* OpenSUSE: `sudo zypper install libusb-1_0-devel pkgconf`
|
||||||
* MacOS: `brew install libusb`, or `sudo port install libusb-devel`
|
* MacOS: `brew install libusb pkgconf`, or `sudo port install libusb-devel pkgconf`
|
||||||
* FreeBSD: libusb is included by default
|
* FreeBSD: `pkg install gmake pkgconf` (libusb is included by default)
|
||||||
* NetBSD: `sudo pkgin install libusb1 gmake pkg-config`
|
* NetBSD: `sudo pkgin install libusb1 gmake pkgconf`
|
||||||
* Windows: TBD?
|
* Windows: TBD?
|
||||||
|
|
||||||
To fetch uhubctl source and compile it:
|
To fetch uhubctl source and compile it:
|
||||||
|
|||||||
@@ -38,6 +38,11 @@
|
|||||||
#define LIBUSB_API_VERSION LIBUSBX_API_VERSION
|
#define LIBUSB_API_VERSION LIBUSBX_API_VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* FreeBSD's libusb does not define LIBUSB_DT_SUPERSPEED_HUB */
|
||||||
|
#if !defined(LIBUSB_DT_SUPERSPEED_HUB)
|
||||||
|
#define LIBUSB_DT_SUPERSPEED_HUB 0x2a
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBUSB_API_VERSION)
|
#if !defined(LIBUSB_API_VERSION)
|
||||||
#error "libusb-1.0 is required!"
|
#error "libusb-1.0 is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user