-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from rgov/master
Improve formulae
- Loading branch information
Showing
6 changed files
with
112 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
install: | ||
|
||
strategy: | ||
matrix: | ||
os: [ macos-10.15 ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Copy formulae | ||
run: cp *.rb $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ | ||
- name: Install | ||
# We install the IIO Oscilloscope package, which builds the others | ||
# through dependency resolution. | ||
run: brew install --verbose --build-from-source iio-oscilloscope | ||
- name: Test | ||
run: | | ||
for formula in *.rb; do | ||
brew test "${formula%.rb}" | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,42 @@ | ||
class IioOscilloscope < Formula | ||
desc "GTK+ based oscilloscope application for interfacing with various IIO devices" | ||
homepage "https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope" | ||
url "https://github.com/analogdevicesinc/iio-oscilloscope/archive/v0.11-master.tar.gz" | ||
sha256 "df31ae208f806f8291c3d4fd53d57d2e54acff4ab65c5ae52c18730fc76c6e64" | ||
license "GPL-2.0" | ||
head "https://github.com/analogdevicesinc/iio-oscilloscope.git" | ||
|
||
depends_on "cmake" => :build | ||
depends_on "pkg-config" => :build | ||
|
||
depends_on "atk" | ||
depends_on "cairo" | ||
depends_on "curl" | ||
depends_on "fftw" | ||
depends_on "gdk-pixbuf" | ||
depends_on "gettext" | ||
depends_on "glib" | ||
depends_on "gtk+" | ||
depends_on "gtkdatabox" | ||
depends_on "harfbuzz" | ||
depends_on "jansson" | ||
depends_on "libad9361-iio" | ||
depends_on "libiio" | ||
depends_on "libmatio" | ||
depends_on "libserialport" | ||
depends_on "pango" | ||
|
||
uses_from_macos "libxml2" | ||
|
||
def install | ||
mkdir "build" do | ||
system "cmake", "..", *std_cmake_args | ||
system "make", "install" | ||
end | ||
end | ||
|
||
test do | ||
assert_match "osc: the IIO visualization and control tool", | ||
shell_output("#{bin}/osc --help", 255) | ||
end | ||
end |
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 |
---|---|---|
@@ -1,19 +1,32 @@ | ||
class Libad9361Iio < Formula | ||
desc "" | ||
homepage "" | ||
desc "IIO AD9361 library for filter design and handling, multi-chip sync, etc." | ||
homepage "https://analogdevicesinc.github.io/libad9361-iio/" | ||
url "https://github.com/analogdevicesinc/libad9361-iio/archive/v0.2.tar.gz" | ||
sha256 "f0d935eb7f70fde8596d98e9eb1f311b408b87662fc1fff45ae3ed455697b747" | ||
license "LGPL-2.1" | ||
head "https://github.com/analogdevicesinc/libad9361-iio.git" | ||
|
||
depends_on "cmake" => :build | ||
depends_on "pkg-config" => :build | ||
|
||
depends_on "libiio" | ||
|
||
def install | ||
# ENV.deparallelize # if your formula fails when building in parallel | ||
system "cmake ./CMakeLists.txt -DCMAKE_INSTALL_PREFIX='#{prefix}'" | ||
system "make", "install" # if this fails, try separate make/make install steps | ||
mkdir "build" do | ||
cmake_args = [ | ||
"-DOSX_PACKAGE=OFF", | ||
] | ||
system "cmake", "..", *cmake_args, *std_cmake_args | ||
system "make" | ||
system "make", "install" | ||
end | ||
|
||
# For some reason they install a framework in lib/ | ||
frameworks.install_symlink lib/"ad9361.framework" | ||
end | ||
|
||
test do | ||
system "false" | ||
assert_match "ad9361_fmcomms5_phase_sync", | ||
shell_output("nm #{frameworks}/ad9361.framework/ad9361") | ||
end | ||
end |
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 |
---|---|---|
@@ -1,32 +1,35 @@ | ||
|
||
class Libiio < Formula | ||
desc "libIIO" | ||
homepage "https://github.com/analogdevicesinc/iio-oscilloscope/wiki" | ||
# head "https://github.com/analogdevicesinc/libiio.git" | ||
url "https://github.com/analogdevicesinc/libiio/archive/v0.17.tar.gz" | ||
desc "Library for interfacing with local and remote Linux IIO devices" | ||
homepage "https://analogdevicesinc.github.io/libiio/" | ||
url "https://github.com/analogdevicesinc/libiio/archive/v0.21.tar.gz" | ||
sha256 "03d13165cbeb83b036743cbd9a10e336c728da162714f39d13250a3d94305cac" | ||
license "LGPL-2.1" | ||
head "https://github.com/analogdevicesinc/libiio.git" | ||
|
||
# libusb libxml2 | ||
depends_on "cmake" => :build | ||
# depends_on "gtk+" => :build | ||
# depends_on "glib" => :build | ||
# depends_on "libcdk5-dev" => :build | ||
# depends_on "bison" => :build | ||
# depends_on "flex" => :build | ||
depends_on "doxygen" => build | ||
depends_on "libxml2" => :build | ||
depends_on "libusb" => :build | ||
|
||
depends_on "libserialport" | ||
depends_on "libusb" | ||
|
||
uses_from_macos "libxml2" | ||
|
||
def install | ||
ENV.deparallelize # if your formula fails when building in parallel | ||
system "mkdir build" | ||
system "cd build" | ||
system "pwd" | ||
system "cmake .." | ||
system "make" | ||
#system "make","DESTDIR=#{prefix}","install-common-files" | ||
mkdir "build" do | ||
cmake_args = [ | ||
"-DOSX_INSTALL_FRAMEWORKSDIR=#{frameworks}", | ||
"-DOSX_PACKAGE=OFF", | ||
] | ||
system "cmake", "..", *cmake_args, *std_cmake_args | ||
system "make" | ||
system "make", "install" | ||
end | ||
|
||
Dir.glob("#{frameworks}/iio.framework/Tools/*").each do |exec| | ||
bin.install_symlink exec if File.executable?(exec) | ||
end | ||
end | ||
|
||
test do | ||
system "false" | ||
system "#{bin}/iio_info", "--help" | ||
end | ||
end |