apache-arrow-glib 0.9.0 (new formula)
Closes #25505. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
84de217fbb
commit
460069a6aa
1 changed files with 50 additions and 0 deletions
50
Formula/apache-arrow-glib.rb
Normal file
50
Formula/apache-arrow-glib.rb
Normal file
|
@ -0,0 +1,50 @@
|
|||
class ApacheArrowGlib < Formula
|
||||
desc "GObject Introspection files of Apache Arrow"
|
||||
homepage "https://arrow.apache.org/"
|
||||
url "https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-0.9.0/apache-arrow-0.9.0.tar.gz"
|
||||
sha256 "beb1c684b2f7737f64407a7b19eb7a12061eec8de3b06ef6e8af95d5a30b899a"
|
||||
head "https://github.com/apache/arrow.git"
|
||||
|
||||
depends_on "gobject-introspection" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "apache-arrow"
|
||||
depends_on "gettext"
|
||||
depends_on "glib"
|
||||
|
||||
def install
|
||||
cd "c_glib" do
|
||||
system "./configure", "--prefix=#{prefix}"
|
||||
system "make"
|
||||
system "make", "install"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <arrow-glib/arrow-glib.h>
|
||||
int main(void){
|
||||
GArrowNullArray *array = garrow_null_array_new(10);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
apache_arrow = Formula["apache-arrow"]
|
||||
glib = Formula["glib"]
|
||||
flags = %W[
|
||||
-I#{include}
|
||||
-I#{apache_arrow.opt_include}
|
||||
-I#{glib.opt_include}/glib-2.0
|
||||
-I#{glib.opt_lib}/glib-2.0/include
|
||||
-L#{lib}
|
||||
-L#{apache_arrow.opt_lib}
|
||||
-L#{glib.opt_lib}
|
||||
-DNDEBUG
|
||||
-larrow-glib
|
||||
-larrow
|
||||
-lglib-2.0
|
||||
-lgobject-2.0
|
||||
-lgio-2.0
|
||||
]
|
||||
system ENV.cc, "test.c", "-o", "test", *flags
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue