ola: revision for protobuf

This commit is contained in:
Jonathan Chang 2019-10-09 22:27:19 +11:00 committed by FX Coudert
parent 51fa85cea8
commit c5278f0005

View file

@ -3,7 +3,8 @@ class Ola < Formula
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
revision 3
head "https://github.com/OpenLightingProject/ola.git"
bottle do
sha256 "cfd140e18776665bea8ff51d04f33db99d3925433d6c51a3dde8684bb9b408a9" => :catalina
@ -11,37 +12,26 @@ class Ola < Formula
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 "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
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
depends_on "numpy"
depends_on "protobuf@3.6"
depends_on "python"
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"
# remove in version 0.11
patch do
url "https://raw.githubusercontent.com/macports/macports-ports/89b697d200c7112839e8f2472cd2ff8dfa6509de/net/ola/files/patch-protobuf3.diff"
sha256 "bbbcb5952b0bdcd01083cef92b72a747d3adbe7ca9e50d865a0c69ae31a8fb4a"
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
protobuf_pth = Formula["protobuf@3.6"].opt_lib/"python3.7/site-packages/homebrew-protobuf.pth"
(buildpath/".brew_home/Library/Python/3.7/lib/python/site-packages").install_symlink protobuf_pth
args = %W[
--disable-fatal-warnings
@ -53,7 +43,8 @@ class Ola < Formula
--enable-rdm-tests
]
system "autoreconf", "-fvi" if build.head?
ENV["PYTHON"] = "python3"
system "autoreconf", "-fvi"
system "./configure", *args
system "make", "install"
end