Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua 5.3.4, rename from lua@5.3 and lua@5.1: add unversioned pkg-config file #21300

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
441738f
lua 5.3.4, rename from lua@5.3
ilovezfs Dec 5, 2017
de9ac72
lua@5.1: add unversioned pkg-config file
ilovezfs Dec 5, 2017
322fb0c
corsixth: revision for lua
ilovezfs Dec 5, 2017
602c62f
dnsdist: revision for lua
ilovezfs Dec 5, 2017
405f8c7
freeswitch: revision for lua
ilovezfs Dec 5, 2017
8e3ce87
gnuplot: revision for lua
ilovezfs Dec 5, 2017
9fffcd1
gnuplot@4: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
47cac07
highlight: revision for lua
ilovezfs Dec 5, 2017
2ccdc57
httest: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
1daae43
imapfilter: revision for lua
ilovezfs Dec 5, 2017
ca34dd2
instead: revision for lua
ilovezfs Dec 5, 2017
67919d1
kyoto-tycoon: revision for lua
ilovezfs Dec 5, 2017
49c2603
kyua: revision for lua
ilovezfs Dec 5, 2017
d82bbe0
libquvi: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
8d15b90
libswiften: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
a636310
lsyncd: revision for lua
ilovezfs Dec 5, 2017
a1496ab
lutok: revision for lua
ilovezfs Dec 5, 2017
d6ccbd2
monotone: revision for lua
ilovezfs Dec 5, 2017
4c80c07
mpv: revision for lua
ilovezfs Dec 5, 2017
fe4c157
onscripter: revision for lua
ilovezfs Dec 5, 2017
3764d07
osm2pgsql: revision for lua
ilovezfs Dec 5, 2017
1fb8bcf
osrm-backend: revision for lua
ilovezfs Dec 5, 2017
6a85681
pdns: revision for lua
ilovezfs Dec 5, 2017
1eea86b
pdnsrec: revision for lua
ilovezfs Dec 5, 2017
981b14c
pioneer: remove lua dependency
ilovezfs Dec 5, 2017
04291fa
radare2: revision for lua
ilovezfs Dec 5, 2017
4f4f09a
rpm: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
8d2bcc2
sile: revision for lua
ilovezfs Dec 5, 2017
5f71f2a
tracebox: revision for lua
ilovezfs Dec 5, 2017
6d830e9
wireshark: revision for lua
ilovezfs Dec 5, 2017
f52bbec
xmoto: depend on lua@5.1 instead of lua
ilovezfs Dec 5, 2017
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
File renamed without changes.
20 changes: 8 additions & 12 deletions Formula/corsixth.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Corsixth < Formula
desc "Open source clone of Theme Hospital"
homepage "https://github.com/CorsixTH/CorsixTH"
revision 1
revision 2
head "https://github.com/CorsixTH/CorsixTH.git"

stable do
Expand Down Expand Up @@ -46,23 +46,19 @@ def install
ENV["FULL_PRODUCT_NAME"] = "CorsixTH.app"

luapath = libexec/"vendor"
ENV["LUA_PATH"] = "#{luapath}/share/lua/5.2/?.lua"
ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.2/?.so"
ENV["LUA_PATH"] = "#{luapath}/share/lua/5.3/?.lua"
ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so"

resources.each do |r|
r.stage do
system "luarocks", "build", r.name, "--tree=#{luapath}"
end
end

# Ensures it uses the intended Lua (5.2) rather than 5.1/5.3 or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this double checked locally on a system that has multiple versions of Lua installed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(CMake being CMake has the tendency to do whatever the hell it likes, even when passed direct variables in some cases, because life is fun 🙃)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.

# attempting to use a combination of two Luas, which can happen.
inreplace "CMake/FindLua.cmake" do |s|
s.gsub! "lua53 lua5.3 lua-5.3 liblua.5.3.dylib", ""
s.gsub! "include/lua53 include/lua5.3 include/lua-5.3", "include"
end

system "cmake", ".", *std_cmake_args
system "cmake", ".", "-DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}",
"-DLUA_LIBRARY=#{Formula["lua"].opt_lib}/liblua.dylib",
"-DLUA_PROGRAM_PATH=#{Formula["lua"].opt_bin}/lua",
*std_cmake_args
system "make"
prefix.install "CorsixTH/CorsixTH.app"

Expand All @@ -73,6 +69,6 @@ def install
test do
app = prefix/"CorsixTH.app/Contents/MacOS/CorsixTH"
assert_includes MachO::Tools.dylibs(app),
"#{Formula["lua"].opt_lib}/liblua.5.2.dylib"
"#{Formula["lua"].opt_lib}/liblua.5.3.dylib"
end
end
1 change: 1 addition & 0 deletions Formula/dnsdist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Dnsdist < Formula
homepage "https://www.dnsdist.org/"
url "https://downloads.powerdns.com/releases/dnsdist-1.2.0.tar.bz2"
sha256 "9885c9ee8ac7076aede586ea58d4642eb877e7b2d76c902254494e2a5a5faa78"
revision 1

bottle do
sha256 "07ea5e4fa31f31987799ce7bbeaaab54cd729fb3f8dc60ad23e586f2b1787167" => :high_sierra
Expand Down
1 change: 1 addition & 0 deletions Formula/freeswitch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Freeswitch < Formula
url "https://freeswitch.org/stash/scm/fs/freeswitch.git",
:tag => "v1.6.19",
:revision => "7a77e0bb2ca875cb977b1e698a1783e575d96563"
revision 1
head "https://freeswitch.org/stash/scm/fs/freeswitch.git"

bottle do
Expand Down
1 change: 1 addition & 0 deletions Formula/gnuplot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Gnuplot < Formula
homepage "http://www.gnuplot.info"
url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.2/gnuplot-5.2.2.tar.gz"
sha256 "a416d22f02bdf3873ef82c5eb7f8e94146795811ef808e12b035ada88ef7b1a1"
revision 1

bottle do
sha256 "3b2620d5fbb8f935b5339b56baddf78667f72ef297f085e273a240b3fc5e801c" => :high_sierra
Expand Down
12 changes: 8 additions & 4 deletions Formula/gnuplot@4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class GnuplotAT4 < Formula
homepage "http://www.gnuplot.info"
url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/4.6.7/gnuplot-4.6.7.tar.gz"
sha256 "26d4d17a00e9dcf77a4e64a28a3b2922645b8bbfe114c0afd2b701ac91235980"
revision 1
revision 2

bottle do
sha256 "858c52906786fc159c6990adac2a3fb871a9c477145aa2b5d063fbe9016943d4" => :high_sierra
Expand All @@ -17,14 +17,16 @@ class GnuplotAT4 < Formula
option "with-pdflib-lite", "Build the PDF terminal using pdflib-lite"
option "with-wxmac", "Build the wxWidgets terminal using pango"
option "with-cairo", "Build the Cairo based terminals"
option "without-lua", "Build without the lua/TikZ terminal"
option "without-lua@5.1", "Build without the lua/TikZ terminal"
option "with-test", "Verify the build with make check (1 min)"
option "without-emacs", "Do not build Emacs lisp files"
option "with-aquaterm", "Build with AquaTerm support"
option "with-x11", "Build with X11 support"

deprecated_option "without-lua" => "without-lua@5.1"

depends_on "pkg-config" => :build
depends_on "lua" => :recommended
depends_on "lua@5.1" => :recommended
depends_on "gd" => :recommended
depends_on "readline"
depends_on "libpng"
Expand All @@ -37,6 +39,8 @@ class GnuplotAT4 < Formula
depends_on :x11 => :optional

def install
ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua@5.1"].opt_libexec/"lib/pkgconfig"

if build.with? "aquaterm"
# Add "/Library/Frameworks" to the default framework search path, so that an
# installed AquaTerm framework can be found. Brew does not add this path
Expand Down Expand Up @@ -68,7 +72,7 @@ def install
args << "--without-cairo" if build.without? "cairo"
end

args << "--without-lua" if build.without? "lua"
args << "--without-lua" if build.without? "lua@5.1"
args << (build.with?("emacs") ? "--with-lispdir=#{elisp}" : "--without-lisp-files")
args << (build.with?("aquaterm") ? "--with-aquaterm" : "--without-aquaterm")
args << (build.with?("x11") ? "--with-x" : "--without-x")
Expand Down
1 change: 1 addition & 0 deletions Formula/highlight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Highlight < Formula
homepage "http://www.andre-simon.de/doku/highlight/en/highlight.html"
url "http://www.andre-simon.de/zip/highlight-3.41.tar.bz2"
sha256 "3909986041d40b1d0d3e00cb3b6043b0fbff6fd6a452696fb4eec495b6536722"
revision 1
head "https://github.com/andre-simon/highlight.git"

bottle do
Expand Down
12 changes: 10 additions & 2 deletions Formula/httest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Httest < Formula
homepage "https://htt.sourceforge.io/"
url "https://downloads.sourceforge.net/project/htt/htt2.4/httest-2.4.23/httest-2.4.23.tar.gz"
sha256 "52a90c9719b35226ed1e26a5262df0d14aeb63b258187656bf1eb30ace53232c"
revision 1

bottle do
cellar :any
Expand All @@ -15,11 +16,17 @@ class Httest < Formula
depends_on "apr-util"
depends_on "openssl"
depends_on "pcre"
depends_on "lua" => :recommended
depends_on "lua@5.1" => :recommended
depends_on "nghttp2" => :recommended
depends_on "spidermonkey" => :recommended

deprecated_option "without-lua" => "without-lua@5.1"

def install
inreplace "configure",
"else LUA_LIB_PATH=\"-L${withval}\"; LUA_INCLUDES=\"-I${withval}\"; LUA_LIB=\"-llua\"; fi",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They've hardcoded expecting a vanilla liblua? 🤦‍♂️.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's gibberish. Notice they expect to find the library and the includes in the exact same directory without taking into account include vs. lib subdirectories.

Here's how it searches:

# Check whether --with-lua was given.
if test "${with_lua+set}" = set; then
  withval=$with_lua; if test ! -d $withval; then { { $as_echo "$as_me:$LINENO: error: $withval is not a directory" >&5
$as_echo "$as_me: error: $withval is not a directory" >&2;}
   { (exit 1); exit 1; }; }; else LUA_LIB_PATH="-L${withval}"; LUA_INCLUDES="-I${withval}"; LUA_LIB="-llua"; fi
else
  LUA_LIB_PATH=""; if test -d /usr/include/lua5.1; then LUA_INCLUDES="-I/usr/include/lua5.1"; else LUA_INCLUDES=""; fi; if test -f /usr/lib/liblua5.1.a -o -f /usr/lib/liblua5.1.so -o -f /usr/lib/i386-linux-gnu/liblua5.1.so -o -f /usr/lib/i386-linux-gnu/liblua5.1.a; then LUA_LIB="-llua5.1"; else LUA_LIB="-llua"; fi
fi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is... that is special.

"else LUA_LIB_PATH=\"-L${withval}/lib\"; LUA_INCLUDES=\"-I${withval}/include/lua-5.1\"; LUA_LIB=\"-llua.5.1\"; fi"

# Fix "fatal error: 'pcre/pcre.h' file not found"
# Reported 9 Mar 2017 https://sourceforge.net/p/htt/tickets/4/
(buildpath/"brew_include").install_symlink Formula["pcre"].opt_include => "pcre"
Expand All @@ -36,8 +43,9 @@ def install
"--enable-html-module",
"--enable-xml-module",
"--with-apr=#{Formula["apr"].opt_bin}",
"--with-lua=#{Formula["lua@5.1"].opt_prefix}",
]
args << "--enable-lua-module" if build.with? "lua"
args << "--enable-lua-module" if build.with? "lua@5.1"
args << "--enable-h2-module" if build.with? "nghttp2"
args << "--enable-js-module" if build.with? "spidermonkey"

Expand Down
1 change: 1 addition & 0 deletions Formula/imapfilter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Imapfilter < Formula
homepage "https://github.com/lefcha/imapfilter/"
url "https://github.com/lefcha/imapfilter/archive/v2.6.11.tar.gz"
sha256 "baea9596ed251910b176a2bdcd46d78ab68f6aa4e066f70ca0d6153e32df54fb"
revision 1

bottle do
sha256 "67f26b296a296dec1541d6d262769c4e7c6c693a2404e4cae453734737012b9d" => :high_sierra
Expand Down
1 change: 1 addition & 0 deletions Formula/instead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Instead < Formula
homepage "https://instead.syscall.ru/"
url "https://github.com/instead-hub/instead/archive/3.1.2.tar.gz"
sha256 "622c04a58fd780d8efdf0706c03596ab68672b31e97865dad6a1fc1540619754"
revision 1
head "https://github.com/instead-hub/instead.git"

bottle do
Expand Down
2 changes: 1 addition & 1 deletion Formula/kyoto-tycoon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class KyotoTycoon < Formula
homepage "http://fallabs.com/kyototycoon/"
url "http://fallabs.com/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz"
sha256 "553e4ea83237d9153cc5e17881092cefe0b224687f7ebcc406b061b2f31c75c6"
revision 1
revision 2

bottle do
sha256 "ea2abfe479faf89d5499962751fc693d9d7afce04d289ca5384b0ebd1fe934e6" => :high_sierra
Expand Down
1 change: 1 addition & 0 deletions Formula/kyua.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Kyua < Formula
homepage "https://github.com/jmmv/kyua"
url "https://github.com/jmmv/kyua/releases/download/kyua-0.13/kyua-0.13.tar.gz"
sha256 "db6e5d341d5cf7e49e50aa361243e19087a00ba33742b0855d2685c0b8e721d6"
revision 1

bottle do
sha256 "c1f8ff3010f653afa3bce2632f51193b61539be419119d93b34110a55bbe3e3d" => :high_sierra
Expand Down
6 changes: 4 additions & 2 deletions Formula/libquvi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Libquvi < Formula
homepage "https://quvi.sourceforge.io/"
url "https://downloads.sourceforge.net/project/quvi/0.4/libquvi/libquvi-0.4.1.tar.bz2"
sha256 "f5a2fb0571634483e8a957910f44e739f5a72eb9a1900bd10b453c49b8d5f49d"
revision 1
revision 2

bottle do
rebuild 2
Expand All @@ -16,14 +16,16 @@ class Libquvi < Formula
end

depends_on "pkg-config" => :build
depends_on "lua"
depends_on "lua@5.1"

resource "scripts" do
url "https://downloads.sourceforge.net/project/quvi/0.4/libquvi-scripts/libquvi-scripts-0.4.14.tar.xz"
sha256 "b8d17d53895685031cd271cf23e33b545ad38cad1c3bddcf7784571382674c65"
end

def install
ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua@5.1"].opt_libexec/"lib/pkgconfig"

scripts = prefix/"libquvi-scripts"
resource("scripts").stage do
system "./configure", "--prefix=#{scripts}", "--with-nsfw"
Expand Down
13 changes: 8 additions & 5 deletions Formula/libswiften.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Libswiften < Formula
desc "C++ library for implementing XMPP applications"
homepage "https://swift.im/swiften"
revision 1
revision 2
head "https://swift.im/git/swift"

stable do
Expand All @@ -24,7 +24,9 @@ class Libswiften < Formula
depends_on "scons" => :build
depends_on "boost"
depends_on "libidn"
depends_on "lua" => :recommended
depends_on "lua@5.1" => :recommended

deprecated_option "without-lua" => "without-lua@5.1"

def install
inreplace "Sluift/main.cpp", "#include <string>",
Expand Down Expand Up @@ -52,11 +54,12 @@ def install
openssl=no
]

if build.with? "lua"
lua = Formula["lua"]
if build.with? "lua@5.1"
lua = Formula["lua@5.1"]
args << "SLUIFT_INSTALLDIR=#{prefix}"
args << "lua_includedir=#{lua.include}"
args << "lua_includedir=#{lua.include}/lua-5.1"
args << "lua_libdir=#{lua.lib}"
args << "lua_libname=lua.5.1"
end

args << prefix
Expand Down
1 change: 1 addition & 0 deletions Formula/lsyncd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Lsyncd < Formula
homepage "https://github.com/axkibe/lsyncd"
url "https://github.com/axkibe/lsyncd/archive/release-2.2.2.tar.gz"
sha256 "0bdb12f40f1a52ed2d8e6cb47242d296663a42b30f38d2b8efcb66b43129e009"
revision 1

bottle do
cellar :any
Expand Down
Loading