usbmuxd: Pass path to libusb headers to CMake

CMake fails to find this info on it's own.

Fixes Homebrew/homebrew#7293.
master
Charlie Sharpsteen 2012-05-04 11:09:33 -07:00
parent cea9127232
commit 0ccaf8ccfd
1 changed files with 16 additions and 2 deletions

View File

@ -8,12 +8,26 @@ class Usbmuxd < Formula
head 'http://cgit.sukimashita.com/usbmuxd.git'
depends_on 'cmake' => :build
depends_on 'pkg-config' => :build
depends_on 'libusb'
depends_on 'libplist'
def install
libusb = Formula.factory 'libusb'
inreplace 'Modules/VersionTag.cmake', '"sh"', '"bash"'
system "cmake #{std_cmake_parameters} -DLIB_SUFFIX='' ."
system "make install"
# The CMake scripts responsible for locating libusb headers are broken. So,
# we explicitly point the build script at the proper directory.
args = std_cmake_parameters.split.concat %W[
-DLIB_SUFFIX=''
-DUSB_INCLUDE_DIR='#{libusb.include.children.first}'
]
mkdir 'build'
chdir 'build' do
system 'cmake', '..', *args
system 'make install'
end
end
end