Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Formula/g/gensio.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Gensio < Formula
desc "Stream I/O Library"
homepage "https://github.com/cminyard/gensio"
Expand All @@ -22,8 +22,7 @@
depends_on "glib"
depends_on "openssl@3"
depends_on "[email protected]"

uses_from_macos "tcl-tk"
depends_on "tcl-tk"

on_macos do
depends_on "gettext"
Expand All @@ -42,13 +41,15 @@
end

def install
tcltk = Formula["tcl-tk"]
args = %W[
--disable-silent-rules
--with-python=#{which(python3)}
--with-pythoninstall=#{lib}/gensio-python
--with-tclcflags=-I#{tcltk.opt_include}/tcl-tk
--with-tcllibs=-ltcl#{tcltk.version.major_minor}
--sysconfdir=#{etc}
]
args << "--with-tclcflags=-I#{HOMEBREW_PREFIX}/include/tcl-tk" if OS.linux?

system "./configure", *args, *std_configure_args
system "make", "install"
Expand Down
12 changes: 3 additions & 9 deletions Formula/l/lmod.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Lmod < Formula
desc "Lua-based environment modules system to modify PATH variable"
homepage "https://lmod.readthedocs.io"
Expand All @@ -18,10 +18,10 @@
depends_on "luarocks" => :build
depends_on "pkgconf" => :build
depends_on "lua"
depends_on "tcl-tk"

uses_from_macos "bc" => :build
uses_from_macos "libxcrypt"
uses_from_macos "tcl-tk"

on_macos do
depends_on "gnu-sed" => :build
Expand Down Expand Up @@ -56,14 +56,8 @@
end
end

# pkgconf cannot find tcl-tk on Linux correctly, so we manually set the include and libs
if OS.linux?
tcltk_version = Formula["tcl-tk"].version.major_minor
ENV["TCL_INCLUDE"] = "-I#{Formula["tcl-tk"].opt_include}/tcl-tk"
ENV["TCL_LIBS"] = "-L#{Formula["tcl-tk"].opt_lib} -ltcl#{tcltk_version} -ltclstub"
# Homebrew installed tcl-tk library has major_minor version suffix
inreplace "configure", "'' tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5", "'' tcl#{tcltk_version}"
end
# configure overrides PKG_CONFIG_PATH with TCL_PKG_CONFIG_DIR value
ENV["TCL_PKG_CONFIG_DIR"] = ENV["PKG_CONFIG_PATH"]

system "./configure", "--with-siteControlPrefix=yes", "--prefix=#{prefix}"
system "make", "install"
Expand Down
16 changes: 6 additions & 10 deletions Formula/s/sqlite-analyzer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class SqliteAnalyzer < Formula
desc "Analyze how space is allocated inside an SQLite file"
homepage "https://www.sqlite.org/"
Expand All @@ -23,19 +23,15 @@
sha256 cellar: :any_skip_relocation, x86_64_linux: "84bb4ebf263f3e396a44870a6510a14688f203927f196199d81e72c00e66e0d5"
end

depends_on "tcl-tk"
uses_from_macos "sqlite" => :test
uses_from_macos "tcl-tk"

def install
tcl = if OS.mac?
MacOS.sdk_path/"System/Library/Frameworks/Tcl.framework"
else
Formula["tcl-tk"].opt_lib
end
on_macos do
depends_on "libtommath"
end

system "./configure", "--disable-debug",
"--with-tcl=#{tcl}",
"--prefix=#{prefix}"
def install
system "./configure", "--with-tcl=#{Formula["tcl-tk"].opt_lib}", *std_configure_args
system "make", "sqlite3_analyzer"
bin.install "sqlite3_analyzer"
end
Expand Down
12 changes: 6 additions & 6 deletions Formula/w/weechat.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Weechat < Formula
desc "Extensible IRC client"
homepage "https://weechat.org/"
Expand Down Expand Up @@ -29,10 +29,10 @@
depends_on "perl"
depends_on "[email protected]"
depends_on "ruby"
depends_on "tcl-tk"
depends_on "zstd"

uses_from_macos "curl"
uses_from_macos "tcl-tk"
uses_from_macos "zlib"

on_macos do
Expand All @@ -41,19 +41,19 @@
end

def install
tcltk = Formula["tcl-tk"]
args = %W[
-DENABLE_MAN=ON
-DENABLE_GUILE=OFF
-DCA_FILE=#{Formula["gnutls"].pkgetc}/cert.pem
-DENABLE_JAVASCRIPT=OFF
-DENABLE_PHP=OFF
-DTCL_INCLUDE_PATH=#{tcltk.opt_include}/tcl-tk
-DTCL_LIBRARY=#{tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}")}
-DTK_INCLUDE_PATH=#{tcltk.opt_include}/tcl-tk
-DTK_LIBRARY=#{tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major}tk#{tcltk.version.major_minor}")}
]

if OS.linux?
args << "-DTCL_INCLUDE_PATH=#{Formula["tcl-tk"].opt_include}/tcl-tk"
args << "-DTK_INCLUDE_PATH=#{Formula["tcl-tk"].opt_include}/tcl-tk"
end

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
Expand Down
7 changes: 2 additions & 5 deletions Formula/y/yosys.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Yosys < Formula
desc "Framework for Verilog RTL synthesis"
homepage "https://yosyshq.net/yosys/"
Expand All @@ -18,18 +18,15 @@

depends_on "bison" => :build
depends_on "pkgconf" => :build
depends_on "libtommath"
depends_on "readline"
depends_on "tcl-tk"

uses_from_macos "flex"
uses_from_macos "libffi", since: :catalina
uses_from_macos "python"
uses_from_macos "tcl-tk"
uses_from_macos "zlib"

on_linux do
depends_on "libtommath"
end

def install
ENV.append "LINKFLAGS", "-L#{Formula["readline"].opt_lib}"
system "make", "install", "PREFIX=#{prefix}", "PRETTY=0"
Expand Down
Loading