134 lines
3.8 KiB
Ruby
134 lines
3.8 KiB
Ruby
class Gspell < Formula
|
|
desc "Flexible API to implement spellchecking in GTK+ applications"
|
|
homepage "https://wiki.gnome.org/Projects/gspell"
|
|
url "https://download.gnome.org/sources/gspell/1.8/gspell-1.8.2.tar.xz"
|
|
sha256 "bb9195c3a95bacf556d0203e9691f7489e0d3bc5ae1e5a440c89b2f2435d3ed6"
|
|
revision 2
|
|
|
|
bottle do
|
|
sha256 "deba67191c1c4825ab89bade5bf15dd9d66abbc01973c75b74b3e2b5a6f01d92" => :catalina
|
|
sha256 "e6ec433b39fea3fa6ac56ed5ca2b935d298df7497c917997f25258fd3904bcc6" => :mojave
|
|
sha256 "b284a4fb840f0ee9077d02d54b88f8ca3e4fb64205e1a8ff3631cc0751b41891" => :high_sierra
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "gtk-doc" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "enchant"
|
|
depends_on "gtk+3"
|
|
depends_on "gtk-mac-integration"
|
|
depends_on "iso-codes"
|
|
depends_on "vala"
|
|
|
|
patch :DATA
|
|
|
|
def install
|
|
system "autoreconf", "-if"
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <gspell/gspell.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
const GList *list = gspell_language_get_available();
|
|
return 0;
|
|
}
|
|
EOS
|
|
atk = Formula["atk"]
|
|
cairo = Formula["cairo"]
|
|
enchant = Formula["enchant"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gdk_pixbuf = Formula["gdk-pixbuf"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
gtkx3 = Formula["gtk+3"]
|
|
gtk_mac_integration = Formula["gtk-mac-integration"]
|
|
harfbuzz = Formula["harfbuzz"]
|
|
libepoxy = Formula["libepoxy"]
|
|
libpng = Formula["libpng"]
|
|
pango = Formula["pango"]
|
|
pixman = Formula["pixman"]
|
|
flags = %W[
|
|
-I#{atk.opt_include}/atk-1.0
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{enchant.opt_include}/enchant-2
|
|
-I#{fontconfig.opt_include}
|
|
-I#{freetype.opt_include}/freetype2
|
|
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/gio-unix-2.0/
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{gtk_mac_integration.opt_include}/gtkmacintegration
|
|
-I#{gtkx3.opt_include}/gtk-3.0
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/gspell-1
|
|
-I#{libepoxy.opt_include}
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{pango.opt_include}/pango-1.0
|
|
-I#{pixman.opt_include}/pixman-1
|
|
-DMAC_INTEGRATION
|
|
-D_REENTRANT
|
|
-L#{atk.opt_lib}
|
|
-L#{cairo.opt_lib}
|
|
-L#{gdk_pixbuf.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{gtkx3.opt_lib}
|
|
-L#{lib}
|
|
-L#{pango.opt_lib}
|
|
-latk-1.0
|
|
-lcairo
|
|
-lcairo-gobject
|
|
-lgdk-3
|
|
-lgdk_pixbuf-2.0
|
|
-lgio-2.0
|
|
-lglib-2.0
|
|
-lgobject-2.0
|
|
-lgspell-1
|
|
-lgtk-3
|
|
-lintl
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
ENV["G_DEBUG"] = "fatal-warnings"
|
|
system "./test" # This test will fail intentionally when iso-codes gets updated. Resolve by revbumping this formula.
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
|
|
index 076a9fd..6c67184 100644
|
|
--- a/gspell/Makefile.am
|
|
+++ b/gspell/Makefile.am
|
|
@@ -91,6 +91,7 @@ nodist_libgspell_core_la_SOURCES = \
|
|
$(BUILT_SOURCES)
|
|
|
|
libgspell_core_la_LIBADD = \
|
|
+ $(GTK_MAC_LIBS) \
|
|
$(CODE_COVERAGE_LIBS)
|
|
|
|
libgspell_core_la_CFLAGS = \
|
|
@@ -155,6 +156,12 @@ gspell_private_headers += \
|
|
gspell_private_c_files += \
|
|
gspell-osx.c
|
|
|
|
+libgspell_core_la_CFLAGS += \
|
|
+ -xobjective-c
|
|
+
|
|
+libgspell_core_la_LDFLAGS += \
|
|
+ -framework Cocoa
|
|
+
|
|
endif # OS_OSX
|
|
|
|
if HAVE_INTROSPECTION
|
|
|