homebrew-core/Formula/ola.rb
2019-10-06 15:27:16 +02:00

64 lines
2.1 KiB
Ruby

class Ola < Formula
desc "Open Lighting Architecture for lighting control information"
homepage "https://www.openlighting.org/ola/"
url "https://github.com/OpenLightingProject/ola/releases/download/0.10.7/ola-0.10.7.tar.gz"
sha256 "8a65242d95e0622a3553df498e0db323a13e99eeb1accc63a8a2ca8913ab31a0"
revision 2
bottle do
sha256 "cfd140e18776665bea8ff51d04f33db99d3925433d6c51a3dde8684bb9b408a9" => :catalina
sha256 "9b6ba39db2eac356f2811ad76f3d6dae0e7b9d0f22a0dbc919fa0e4fda9cd639" => :mojave
sha256 "949692cfbcf0408d27e523d858b38a778e812994f28f7790f09b1ceb6ec9187a" => :high_sierra
end
head do
url "https://github.com/OpenLightingProject/ola.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "liblo"
depends_on "libmicrohttpd"
depends_on "libusb"
depends_on "numpy@1.16"
depends_on "protobuf@3.1"
depends_on "python@2" # protobuf@3.1 does not support Python 3
resource "protobuf-c" do
url "https://github.com/protobuf-c/protobuf-c/releases/download/v1.2.1/protobuf-c-1.2.1.tar.gz"
sha256 "846eb4846f19598affdc349d817a8c4c0c68fd940303e6934725c889f16f00bd"
end
def install
resource("protobuf-c").stage do
system "./configure", "--disable-dependency-tracking",
"--prefix=#{buildpath}/vendor/protobuf-c"
system "make", "install"
end
ENV.prepend_path "PKG_CONFIG_PATH", buildpath/"vendor/protobuf-c/lib/pkgconfig"
protobuf_pth = Formula["protobuf@3.1"].opt_lib/"python2.7/site-packages/homebrew-protobuf.pth"
(buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages").install_symlink protobuf_pth
args = %W[
--disable-fatal-warnings
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--disable-unittests
--enable-python-libs
--enable-rdm-tests
]
system "autoreconf", "-fvi" if build.head?
system "./configure", *args
system "make", "install"
end
test do
system bin/"ola_plugin_info"
end
end