aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Dunn2015-04-23 13:21:16 -0700
committerMike McQuaid2015-04-24 18:23:10 +0100
commitbc722d2a091214c2b7a6fd1c6503b80b74a5eaf3 (patch)
tree719b14d0263aa3dc945980905fdbbdbb21234751
parent7793978867af4e18461ec557bd79ec61f27fc948 (diff)
downloadhomebrew-bc722d2a091214c2b7a6fd1c6503b80b74a5eaf3.tar.bz2
goffice 0.10.22
Closes #38986. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/goffice.rb87
1 files changed, 56 insertions, 31 deletions
diff --git a/Library/Formula/goffice.rb b/Library/Formula/goffice.rb
index 007117002..28c708f6b 100644
--- a/Library/Formula/goffice.rb
+++ b/Library/Formula/goffice.rb
@@ -1,38 +1,63 @@
-require 'formula'
-
class Goffice < Formula
- homepage 'http://projects.gnome.org/gnumeric/'
- url 'http://ftp.gnome.org/pub/GNOME/sources/goffice/0.8/goffice-0.8.17.tar.bz2'
- sha256 'dd8caef5fefffbc53938fa619de9f58e7c4dc71a1803de134065d42138a68c06'
+ homepage "https://developer.gnome.org/goffice/"
+ url "http://ftp.gnome.org/pub/GNOME/sources/goffice/0.10/goffice-0.10.22.tar.xz"
+ sha256 "0206a87a323b52a874dc54491374245f9e1c5f62e93a2ce4a02fb444a26b0e28"
- depends_on 'pkg-config' => :build
- depends_on 'intltool' => :build
- depends_on 'gettext'
- depends_on 'libgsf'
- depends_on 'gtk+'
- depends_on 'pcre'
- depends_on :x11
+ head do
+ url "https://github.com/GNOME/goffice.git"
+ depends_on "automake" => :build
+ depends_on "autoconf" => :build
+ depends_on "gnome-common" => :build
+ depends_on "gtk-doc" => :build
+ depends_on "libtool" => :build
+ end
- # Fix for goffice trying to use a retired pcre api. Reported/source = Macports
- # https://github.com/Homebrew/homebrew/issues/15171
- patch :DATA
+ depends_on "intltool" => :build
+ depends_on "pkg-config" => :build
+ depends_on "atk"
+ depends_on "cairo"
+ depends_on "gettext"
+ depends_on "gdk-pixbuf"
+ depends_on "gtk+3"
+ depends_on "libgsf"
+ depends_on "librsvg"
+ depends_on "pango"
+ depends_on "pcre"
+ depends_on :x11
def install
- system "./configure", "--disable-dependency-tracking",
- "--prefix=#{prefix}"
- system "make install"
+ args = %W[--disable-dependency-tracking --prefix=#{prefix}]
+ if build.head?
+ system "./autogen.sh", *args
+ else
+ system "./configure", *args
+ end
+ system "make", "install"
end
-end
-__END__
---- a/goffice/utils/regutf8.c 2009-09-05 16:52:09.000000000 -0700
-+++ b/goffice/utils/regutf8.c 2012-09-28 20:53:51.000000000 -0700
-@@ -155,7 +155,7 @@
- default: return GO_REG_BADPAT;
- }
- } else {
-- gor->re_nsub = pcre_info (r, NULL, NULL);
-+ gor->re_nsub = pcre_fullinfo (r, NULL, 0, NULL);
- gor->nosub = (cflags & GO_REG_NOSUB) != 0;
- return 0;
- }
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <goffice/goffice.h>
+ int main()
+ {
+ void
+ libgoffice_init (void);
+ void
+ libgoffice_shutdown (void);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "-I#{include}/libgoffice-0.10",
+ "-I#{Formula["glib"].opt_include}/glib-2.0",
+ "-I#{Formula["glib"].opt_lib}/glib-2.0/include",
+ "-I#{Formula["libgsf"].opt_include}/libgsf-1",
+ "-I/usr/include/libxml2",
+ "-I#{Formula["gtk+3"].opt_include}/gtk-3.0",
+ "-I#{Formula["pango"].opt_include}/pango-1.0",
+ "-I#{Formula["cairo"].opt_include}/cairo",
+ "-I#{Formula["gdk-pixbuf"].opt_include}/gdk-pixbuf-2.0",
+ "-I#{Formula["atk"].opt_include}/atk-1.0",
+ testpath/"test.c", "-o", testpath/"test"
+ system "./test"
+ end
+end