2015-09-03 15:18:27 +00:00
|
|
|
class Hspell < Formula
|
|
|
|
desc "Free Hebrew linguistic project"
|
|
|
|
homepage "http://hspell.ivrix.org.il/"
|
|
|
|
url "http://hspell.ivrix.org.il/hspell-1.3.tar.gz"
|
|
|
|
sha256 "603c25dcbaa65d171d9065da7369cfe0dc21bda8378bade13b42eda69c8b2fe7"
|
|
|
|
|
2016-05-06 17:44:32 +00:00
|
|
|
bottle do
|
|
|
|
revision 1
|
|
|
|
sha256 "1f436c171499bca023363de7841c20bafec2dcdb4e5b18bb93bbea0581696540" => :el_capitan
|
|
|
|
sha256 "ff001fc54561695a7cd84a2ecc5b68a57d4e87e351e96515ae6a406ee3425c6e" => :yosemite
|
|
|
|
sha256 "ec1840ba37ee546ac0ea48c75a0f20f1bbe0c7b96c663c1035136b0ae2adea75" => :mavericks
|
|
|
|
end
|
|
|
|
|
2015-09-03 15:18:27 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
|
|
|
|
# hspell was built for linux and compiles a .so shared library, to comply with macOS
|
|
|
|
# standards this patch creates a .dylib instead
|
|
|
|
patch :p0, :DATA
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
|
|
|
|
# autoconf needs to pick up on the patched configure.in and create a new ./configure
|
|
|
|
# script
|
|
|
|
system "autoconf"
|
|
|
|
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--enable-shared",
|
|
|
|
"--enable-linginfo"
|
|
|
|
system "make", "dolinginfo"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
File.open("test.txt", "w:ISO8859-8") do |f|
|
|
|
|
f.write "שלום"
|
|
|
|
end
|
|
|
|
system "#{bin}/hspell", "-l", "test.txt"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
__END__
|
|
|
|
diff --git Makefile.in Makefile.in
|
|
|
|
index a400ca1..fa595e8 100644
|
|
|
|
--- Makefile.in
|
|
|
|
+++ Makefile.in
|
|
|
|
@@ -98,7 +98,7 @@ clean:
|
|
|
|
hebrew.wgz.lingsizes.tmp dmask.c \
|
|
|
|
spell-he.xpi he.dic he.aff README-he.txt \
|
|
|
|
README_he_IL.txt he_IL.dic he_IL.aff he_IL.zip \
|
|
|
|
- specfilter.o specfilter he.rws libhspell.so.0 libhspell.so \
|
|
|
|
+ specfilter.o specfilter he.rws libhspell.dylib \
|
|
|
|
dict_radix.lo gimatria.lo corlist.lo libhspell.lo linginfo.lo \
|
|
|
|
he.xpi misc/dictionaries/he.dic misc/dictionaries/he.aff \
|
|
|
|
misc/dictionaries/license.txt misc/dictionaries/README-he.txt
|
|
|
|
@@ -137,9 +137,8 @@ install: all
|
|
|
|
test -d $(DESTDIR)$(INCLUDEDIR) || mkdir -m 755 -p $(DESTDIR)$(INCLUDEDIR)
|
|
|
|
cp hspell.h linginfo.h $(DESTDIR)$(INCLUDEDIR)/
|
|
|
|
chmod 644 $(DESTDIR)$(INCLUDEDIR)/hspell.h $(DESTDIR)$(INCLUDEDIR)/linginfo.h
|
|
|
|
- test -f libhspell.so.0 && cp libhspell.so.0 $(DESTDIR)$(LIBDIR)/
|
|
|
|
- test -f libhspell.so.0 && chmod 755 $(DESTDIR)$(LIBDIR)/libhspell.so.0
|
|
|
|
- test -f libhspell.so.0 && ln -sf libhspell.so.0 $(DESTDIR)$(LIBDIR)/libhspell.so
|
|
|
|
+ test -f libhspell.dylib && cp libhspell.dylib $(DESTDIR)$(LIBDIR)/
|
|
|
|
+ test -f libhspell.dylib && chmod 755 $(DESTDIR)$(LIBDIR)/libhspell.dylib
|
|
|
|
|
|
|
|
|
|
|
|
################################################
|
|
|
|
@@ -194,9 +193,8 @@ libhspell.a: $(LIBOBJS)
|
|
|
|
-ranlib $@
|
|
|
|
|
|
|
|
# For building a shared library (--enable-shared)
|
|
|
|
-libhspell.so.0: $(LIBOBJS:.o=.lo)
|
|
|
|
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared -Wl,-soname,libhspell.so.0 $^ -lz
|
|
|
|
- ln -sf libhspell.so.0 libhspell.so
|
|
|
|
+libhspell.dylib: $(LIBOBJS:.o=.lo)
|
|
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -dynamiclib $^ -lz
|
|
|
|
|
|
|
|
HSPELL_LIB = @HSPELL_LIB@
|
|
|
|
$(HSPELL_EXECUTABLE): hspell.o tclHash.o $(HSPELL_LIB)
|
|
|
|
diff --git configure.in configure.in
|
|
|
|
index 6081cff..061fa68 100644
|
|
|
|
--- configure.in
|
|
|
|
+++ configure.in
|
|
|
|
@@ -112,7 +112,7 @@ AC_ARG_ENABLE([shared],
|
|
|
|
if test x$ac_opt_shared = xyes
|
|
|
|
then
|
|
|
|
AC_MSG_NOTICE([Shared library building enabled.])
|
|
|
|
- HSPELL_LIB="libhspell.so.0"
|
|
|
|
+ HSPELL_LIB="libhspell.dylib"
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([Shared library building disabled.])
|
|
|
|
HSPELL_LIB="libhspell.a"
|