-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable cgo in hid, delete old vendored usb library
- Loading branch information
1 parent
b7e326e
commit d8b13a4
Showing
11 changed files
with
82 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
diff --git a/BUILD.bazel b/BUILD.bazel | ||
index 9be80a1..0e78457 100755 | ||
--- a/BUILD.bazel | ||
+++ b/BUILD.bazel | ||
@@ -8,58 +8,7 @@ go_library( | ||
srcs = [ | ||
"hid.go", | ||
"hid_disabled.go", | ||
- "hid_enabled.go", | ||
- "wchar.go", | ||
], | ||
- cgo = True, | ||
- clinkopts = select({ | ||
- "@io_bazel_rules_go//go/platform:darwin": [ | ||
- "-framework CoreFoundation -framework IOKit -lobjc", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:freebsd": [ | ||
- "-lusb", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:linux": [ | ||
- "-lrt", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:windows": [ | ||
- "-lsetupapi", | ||
- ], | ||
- "//conditions:default": [], | ||
- }), | ||
- copts = select({ | ||
- "@io_bazel_rules_go//go/platform:android": [ | ||
- "-DDEFAULT_VISIBILITY=", | ||
- "-DPOLL_NFDS_TYPE=int", | ||
- "-Ihidapi/hidapi", | ||
- "-Ilibusb/libusb -DOS_LINUX -D_GNU_SOURCE -DHAVE_SYS_TIME_H -DHAVE_CLOCK_GETTIME", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:darwin": [ | ||
- "-DDEFAULT_VISIBILITY=", | ||
- "-DOS_DARWIN -DHAVE_SYS_TIME_H", | ||
- "-DPOLL_NFDS_TYPE=int", | ||
- "-Ihidapi/hidapi", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:freebsd": [ | ||
- "-DDEFAULT_VISIBILITY=", | ||
- "-DOS_FREEBSD", | ||
- "-DPOLL_NFDS_TYPE=int", | ||
- "-Ihidapi/hidapi", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:linux": [ | ||
- "-DDEFAULT_VISIBILITY=", | ||
- "-DPOLL_NFDS_TYPE=int", | ||
- "-Ihidapi/hidapi", | ||
- "-Ilibusb/libusb -DOS_LINUX -D_GNU_SOURCE -DHAVE_SYS_TIME_H -DHAVE_CLOCK_GETTIME", | ||
- ], | ||
- "@io_bazel_rules_go//go/platform:windows": [ | ||
- "-DDEFAULT_VISIBILITY=", | ||
- "-DOS_WINDOWS", | ||
- "-DPOLL_NFDS_TYPE=int", | ||
- "-Ihidapi/hidapi", | ||
- ], | ||
- "//conditions:default": [], | ||
- }), | ||
importpath = "github.com/karalabe/hid", | ||
visibility = ["//visibility:public"], | ||
) | ||
diff --git a/hid_disabled.go b/hid_disabled.go | ||
index fa2c504..0091853 100644 | ||
--- a/hid_disabled.go | ||
+++ b/hid_disabled.go | ||
@@ -4,9 +4,6 @@ | ||
// This file is released under the 3-clause BSD license. Note however that Linux | ||
// support depends on libusb, released under GNU LGPL 2.1 or later. | ||
|
||
-//go:build (!freebsd && !linux && !darwin && !windows) || ios || !cgo | ||
-// +build !freebsd,!linux,!darwin,!windows ios !cgo | ||
- | ||
package hid | ||
|
||
// Supported returns whether this platform is supported by the HID library or not. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.