-
Notifications
You must be signed in to change notification settings - Fork 17
/
libiio.rb
27 lines (23 loc) · 986 Bytes
/
libiio.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Libiio < Formula
desc "Library for interfacing with IIO devices."
homepage "https://wiki.analog.com/software/linux/docs/iio/iio"
url "https://github.com/analogdevicesinc/libiio/archive/v0.15.tar.gz"
sha256 "a729f8ff48137ad271a3e2951f322b35c1bf2ec075b488d75c8bd071c693fd19"
head "https://github.com/analogdevicesinc/libiio.git"
depends_on "cmake" => :build
depends_on "ninja" => :build
def install
mktemp do
inreplace buildpath/"CMakeLists.txt",
"FRAMEWORK DESTINATION /Library/Frameworks",
"FRAMEWORK DESTINATION #{prefix}"
inreplace buildpath/"tests/CMakeLists.txt",
"RUNTIME DESTINATION /Library/Frameworks/iio.framework/Tools",
"RUNTIME DESTINATION #{prefix}/iio.framework/Tools"
system "cmake", "-G", "Ninja", buildpath, "-DOSX_PACKAGE=OFF",
*std_cmake_args
system "ninja"
system "cmake", "--build", ".", "--target", "install"
end
end
end