-
Notifications
You must be signed in to change notification settings - Fork 17
/
libad9361.rb
33 lines (28 loc) · 1.08 KB
/
libad9361.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
28
29
30
31
32
33
class Libad9361 < Formula
desc "IIO AD9361 library for filter design and handling, multi-chip sync, etc."
homepage "https://wiki.analog.com/software/linux/docs/iio/iio"
url "https://github.com/analogdevicesinc/libad9361-iio/archive/v0.1.tar.gz"
sha256 "46eeacb696e3b70873c541761af189a8ecde6ab7b3e7a5273dfc003e3ba0165d"
head "https://github.com/analogdevicesinc/libad9361-iio.git"
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "libiio"
def install
libiio = Formulary.factory 'libiio'
mktemp do
if !(build.head?)
inreplace buildpath/"CMakeLists.txt",
"include(FindGit OPTIONAL)",
"SET(FindGit)"
end
inreplace buildpath/"CMakeLists.txt",
"FRAMEWORK DESTINATION lib",
"FRAMEWORK DESTINATION ."
system "cmake", "-G", "Ninja", buildpath, "-DOSX_PACKAGE=OFF",
"-DCMAKE_FRAMEWORK_PATH=#{libiio.opt_prefix}",
*std_cmake_args
system "ninja"
system "cmake", "--build", ".", "--target", "install"
end
end
end