1 class Wordnet < Formula
2 desc "Lexical database for the English language"
3 homepage "https://wordnet.princeton.edu/"
4 url "https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.bz2"
5 # Version 3.1 is version 3.0 with the 3.1 dictionary.
7 sha256 "6c492d0c7b4a40e7674d088191d3aa11f373bb1da60762e098b8ee2dda96ef22"
8 license :cannot_represent
11 # This matches WordNet tarball versions as well as database file versions,
12 # as these may differ.
14 url "https://wordnet.princeton.edu/download/current-version"
15 regex(/href=.*?(?:WordNet|wn)[._-]?v?(\d+(?:\.\d+)+)(?:[._-]dict)?\.t/i)
19 sha256 arm64_sequoia: "13c3f71489c21a26e9ccab1c57d9021c705fe548ac756787e2641b90a1eadfb9"
20 sha256 arm64_sonoma: "3189324a36718d3838b41231d17611873cc112740c6179f1672b66a5f7f02530"
21 sha256 arm64_ventura: "2bce686ad3f16170016ca525ec1908fb76693909f86e7393650e8a411574601a"
22 sha256 sonoma: "3997310820375bfe93b6cf3512aa70993d47a2a67e54df6140ccbaf736486ada"
23 sha256 ventura: "323f706e54cc2cb19f4bde6dd703c462337f25763ff8bf9fa52498a10c2a78c7"
24 sha256 cellar: :any_skip_relocation, x86_64_linux: "b5090e0ee1251e6d13e6c77024a0d1f18e0b6d563a4ced176d3c2cd1fffb52b7"
30 url "https://wordnetcode.princeton.edu/wn3.1.dict.tar.gz"
31 sha256 "3f7d8be8ef6ecc7167d39b10d66954ec734280b5bdcd57f7d9eafe429d11c22a"
35 # Workaround for newer Clang
36 ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403
38 (prefix/"dict").install resource("dict")
40 # Disable calling deprecated fields within the Tcl_Interp during compilation.
41 # https://bugzilla.redhat.com/show_bug.cgi?id=902561
42 ENV.append_to_cflags "-DUSE_INTERP_RESULT"
43 tcltk_lib = Formula["tcl-tk@8"].opt_lib
44 system "./configure", "--disable-debug", "--disable-dependency-tracking",
47 "--with-tcl=#{tcltk_lib}",
48 "--with-tk=#{tcltk_lib}"
50 system "make", "install"
54 output = pipe_output("#{bin}/wn homebrew -synsn")
55 assert_match "alcoholic beverage", output