-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
099a94a
commit f10e886
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Formula/t/tcl-tk.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
class TclTk < Formula | ||
desc "Tool Command Language" | ||
homepage "https://www.tcl-lang.org" | ||
url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.15/tcl8.6.15-src.tar.gz" | ||
mirror "https://fossies.org/linux/misc/tcl8.6.15-src.tar.gz" | ||
sha256 "861e159753f2e2fbd6ec1484103715b0be56be3357522b858d3cbb5f893ffef1" | ||
url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.0/tcl9.0.0-src.tar.gz" | ||
mirror "https://fossies.org/linux/misc/tcl9.0.0-src.tar.gz" | ||
sha256 "3bfda6dbaee8e9b1eeacc1511b4e18a07a91dff82d9954cdb9c729d8bca4bbb7" | ||
license "TCL" | ||
|
||
livecheck do | ||
|
@@ -35,32 +35,36 @@ class TclTk < Formula | |
conflicts_with "the_platinum_searcher", because: "both install `pt` binaries" | ||
|
||
resource "critcl" do | ||
url "https://github.com/andreas-kupries/critcl/archive/refs/tags/3.2.tar.gz" | ||
sha256 "20061944e28dda4ab2098b8f77682cab77973f8961f6fa60b95bcc09a546789e" | ||
url "https://github.com/andreas-kupries/critcl/archive/refs/tags/3.3.1.tar.gz" | ||
sha256 "d970a06ae1cdee7854ca1bc571e8b5fe7189788dc5a806bce67e24bbadbe7ae2" | ||
end | ||
|
||
resource "tcllib" do | ||
url "https://downloads.sourceforge.net/project/tcllib/tcllib/1.21/tcllib-1.21.tar.xz" | ||
sha256 "10c7749e30fdd6092251930e8a1aa289b193a3b7f1abf17fee1d4fa89814762f" | ||
url "https://downloads.sourceforge.net/project/tcllib/tcllib/2.0/tcllib-2.0.tar.xz" | ||
sha256 "642c2c679c9017ab6fded03324e4ce9b5f4292473b62520e82aacebb63c0ce20" | ||
end | ||
|
||
# There is no tcltls release compatible with TCL 9 so using latest HEAD | ||
# https://core.tcl-lang.org/tcltls/info/1505883e4a18b50e | ||
# Ref: https://sourceforge.net/p/tcl/mailman/tcl-core/thread/[email protected]/ | ||
resource "tcltls" do | ||
url "https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.22.tar.gz" | ||
sha256 "e84e2b7a275ec82c4aaa9d1b1f9786dbe4358c815e917539ffe7f667ff4bc3b4" | ||
url "https://core.tcl-lang.org/tcltls/tarball/6d3664930c/tcltls-6d3664930c.tar.gz" | ||
sha256 "dfd1401f8b0bfa0f2992d480b4e8ba085a4a17dc54e6b0db080e8bd6bdda725f" | ||
end | ||
|
||
resource "tk" do | ||
url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.15/tk8.6.15-src.tar.gz" | ||
mirror "https://fossies.org/linux/misc/tk8.6.15-src.tar.gz" | ||
sha256 "550969f35379f952b3020f3ab7b9dd5bfd11c1ef7c9b7c6a75f5c49aca793fec" | ||
url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.0/tk9.0.0-src.tar.gz" | ||
mirror "https://fossies.org/linux/misc/tk9.0.0-src.tar.gz" | ||
sha256 "f166e3c20773c82243f753cef4b091d05267cb7f87da64be88cb2ca5a2ba027e" | ||
end | ||
|
||
# "https://downloads.sourceforge.net/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itk%204.1.0/itk4.1.0.tar.gz" | ||
# would cause `bad URI(is not URI?)` error on 12/13 builds | ||
# Also need a newer release than available on SourceForce for TCL 9 | ||
# so we use the GitHub mirror which is easier to access than Fossil | ||
resource "itk4" do | ||
url "https://deb.debian.org/debian/pool/main/i/itk4/itk4_4.1.0.orig.tar.gz" | ||
mirror "https://src.fedoraproject.org/lookaside/extras/itk/itk4.1.0.tar.gz/sha512/1deed09daf66ae1d0cc88550be13814edff650f3ef2ecb5ae8d28daf92e37550b0e46921eb161da8ccc3886aaf62a4a3087df0f13610839b7c2d6f4b39c9f07e/itk4.1.0.tar.gz" | ||
sha256 "da646199222efdc4d8c99593863c8d287442ea5a8687f95460d6e9e72431c9c7" | ||
url "https://github.com/tcltk/itk/archive/refs/tags/itk-4-2-3.tar.gz" | ||
sha256 "3eea66dfc57259d85ad741a01786b70ae4b3ae9774d27e24f7d0917c7451e94b" | ||
end | ||
|
||
def install | ||
|
@@ -70,6 +74,7 @@ def install | |
--prefix=#{prefix} | ||
--includedir=#{include}/tcl-tk | ||
--mandir=#{man} | ||
--disable-zipfs | ||
--enable-threads | ||
--enable-64bit | ||
] | ||
|
@@ -80,7 +85,7 @@ def install | |
system "make" | ||
system "make", "install" | ||
system "make", "install-private-headers" | ||
ln_s bin/"tclsh#{version.to_f}", bin/"tclsh" | ||
bin.install_symlink "tclsh#{version.to_f}" => "tclsh" | ||
end | ||
|
||
# Let tk finds our new tclsh | ||
|
@@ -93,7 +98,7 @@ def install | |
system "make" | ||
system "make", "install" | ||
system "make", "install-private-headers" | ||
ln_s bin/"wish#{version.to_f}", bin/"wish" | ||
bin.install_symlink "wish#{version.to_f}" => "wish" | ||
end | ||
end | ||
|
||
|
@@ -118,7 +123,11 @@ def install | |
end | ||
|
||
resource("itk4").stage do | ||
itcl_dir = Pathname.glob(lib/"itcl*").last | ||
itcl_dir = lib.glob("itcl*").last | ||
# Workaround to build non-release tarball by using TEA files from itcl | ||
odie "Update `itk4` build step!" if Pathname("tclconfig").exist? | ||
Pathname.pwd.install_symlink buildpath/"pkgs/#{itcl_dir.basename}/tclconfig" | ||
|
||
args = %W[ | ||
--prefix=#{prefix} | ||
--exec-prefix=#{prefix} | ||
|