Skip to content

Commit

Permalink
ykpers: fix build (#13023)
Browse files Browse the repository at this point in the history
- I tried to install `ykman`, and installing its dependency `ykpers`
  failed with the error:
  ```
  ykcore_osx.c:36:32: fatal error: IOKit/hid/IOHIDLib.h: No such file or directory
  compilation terminated.
  Makefile:461: recipe for target 'ykcore_osx.lo' failed
  make[1]: *** [ykcore_osx.lo] Error 1
  ```
- The [ykpers configure
  script](https://github.com/Yubico/yubikey-personalization/blob/master/configure.ac#L71)
  states that possible values for the `--with-backend` option on
  `./configure` are "windows", "osx", "libusb" and "libusb-1.0".
- I set this to `libusb-1.0` because it's the value that fixes the
  problem for me. Worth testing on some other setups, probably!
  • Loading branch information
issyl0 authored and iMichka committed May 20, 2019
1 parent af9de14 commit c826f2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Formula/ykpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ class Ykpers < Formula
depends_on "pkg-config" => :build
depends_on "json-c"
depends_on "libyubikey"
depends_on "libusb" unless OS.mac?

def install
backend = OS.mac? ? "osx" : "libusb-1.0"
libyubikey_prefix = Formula["libyubikey"].opt_prefix
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-libyubikey-prefix=#{libyubikey_prefix}",
"--with-backend=osx"
"--with-backend=#{backend}"
system "make", "check"
system "make", "install"
end
Expand Down

0 comments on commit c826f2d

Please sign in to comment.