From e8cf4da5ed9e9155ec1ebba35e6a9fbf5f08851f Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:26:44 +0000 Subject: [PATCH 01/28] lua 5.4.1 --- Formula/lua.rb | 85 +++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/Formula/lua.rb b/Formula/lua.rb index a3df24e67d1aa..66f72ed236932 100644 --- a/Formula/lua.rb +++ b/Formula/lua.rb @@ -1,10 +1,9 @@ class Lua < Formula desc "Powerful, lightweight programming language" homepage "https://www.lua.org/" - url "https://www.lua.org/ftp/lua-5.3.5.tar.gz" - sha256 "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac" + url "https://www.lua.org/ftp/lua-5.4.1.tar.gz" + sha256 "4ba786c3705eb9db6567af29c91a01b81f1c0ac3124fdbf6cd94bdd9e53cca7d" license "MIT" - revision 1 livecheck do url "https://www.lua.org/ftp/" @@ -38,7 +37,7 @@ def install inreplace "src/Makefile" do |s| s.gsub! "@LUA_PREFIX@", prefix s.remove_make_var! "CC" - s.change_make_var! "CFLAGS", "#{ENV.cflags} -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)" + s.change_make_var! "CFLAGS", "#{ENV.cflags} -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)" s.change_make_var! "MYLDFLAGS", ENV.ldflags end @@ -51,19 +50,19 @@ def install (lib/"pkgconfig/lua.pc").write pc_file # Fix some software potentially hunting for different pc names. - bin.install_symlink "lua" => "lua5.3" - bin.install_symlink "lua" => "lua-5.3" - bin.install_symlink "luac" => "luac5.3" - bin.install_symlink "luac" => "luac-5.3" - (include/"lua5.3").install_symlink Dir[include/"lua/*"] - lib.install_symlink "liblua.5.3.dylib" => "liblua5.3.dylib" - (lib/"pkgconfig").install_symlink "lua.pc" => "lua5.3.pc" - (lib/"pkgconfig").install_symlink "lua.pc" => "lua-5.3.pc" + bin.install_symlink "lua" => "lua#{version.major_minor}" + bin.install_symlink "lua" => "lua-#{version.major_minor}" + bin.install_symlink "luac" => "luac#{version.major_minor}" + bin.install_symlink "luac" => "luac-#{version.major_minor}" + (include/"lua#{version.major_minor}").install_symlink Dir[include/"lua/*"] + lib.install_symlink "liblua.#{version.major_minor}.dylib" => "liblua#{version.major_minor}.dylib" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua#{version.major_minor}.pc" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua-#{version.major_minor}.pc" end def pc_file <<~EOS - V= 5.3 + V= #{version.major_minor} R= #{version} prefix=#{HOMEBREW_PREFIX} INSTALL_BIN= ${prefix}/bin @@ -93,68 +92,68 @@ def caveats end test do - system "#{bin}/lua", "-e", "print ('Ducks are cool')" + assert_match "Homebrew is awesome!", shell_output("#{bin}/lua -e \"print ('Homebrew is awesome!')\"") end end __END__ diff --git a/Makefile b/Makefile -index 7fa91c8..a825198 100644 +index 1797df9..2f80d16 100644 --- a/Makefile +++ b/Makefile -@@ -41,7 +41,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris +@@ -41,7 +41,7 @@ PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix # What to install. TO_BIN= lua luac TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp -TO_LIB= liblua.a -+TO_LIB= liblua.5.3.5.dylib ++TO_LIB= liblua.5.4.1.dylib TO_MAN= lua.1 luac.1 # Lua version and release. -@@ -63,6 +63,8 @@ install: dummy - cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) - cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) -+ ln -s -f liblua.5.3.5.dylib $(INSTALL_LIB)/liblua.5.3.dylib -+ ln -s -f liblua.5.3.dylib $(INSTALL_LIB)/liblua.dylib +@@ -60,6 +60,8 @@ install: dummy + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++ ln -s -f liblua.5.4.1.dylib $(INSTALL_LIB)/liblua.5.4.dylib ++ ln -s -f liblua.5.4.dylib $(INSTALL_LIB)/liblua.dylib uninstall: - cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) diff --git a/src/Makefile b/src/Makefile -index 2e7a412..d0c4898 100644 +index 514593d..90c78b8 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -28,7 +28,7 @@ MYOBJS= +@@ -32,7 +32,7 @@ CMCFLAGS= -Os - PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris -LUA_A= liblua.a -+LUA_A= liblua.5.3.5.dylib - CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ - lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ - ltm.o lundump.o lvm.o lzio.o -@@ -56,11 +56,12 @@ o: $(ALL_O) ++LUA_A= liblua.5.4.1.dylib + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -57,11 +57,12 @@ o: $(ALL_O) a: $(ALL_A) $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) - $(RANLIB) $@ -+ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.3.dylib \ -+ -compatibility_version 5.3 -current_version 5.3.5 \ -+ -o liblua.5.3.5.dylib $^ ++ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.4.dylib \ ++ -compatibility_version 5.4 -current_version 5.4.1 \ ++ -o liblua.5.4.1.dylib $^ $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+ $(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.3.5 $(LIBS) ++ $(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.4.1 $(LIBS) $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -@@ -110,7 +111,7 @@ linux: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) +@@ -124,7 +125,7 @@ linux-readline: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline" - macosx: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -fno-common" SYSLIBS="-lreadline" + Darwin macos macosx: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE -fno-common" SYSLIBS="-lreadline" mingw: - $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ + $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \ From b3a5730aa624ff36c1e4b881e24d437e24deccda Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:28:57 +0000 Subject: [PATCH 02/28] Rename `lua@5.3` alias --- Aliases/{lua@5.3 => lua@5.4} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Aliases/{lua@5.3 => lua@5.4} (100%) diff --git a/Aliases/lua@5.3 b/Aliases/lua@5.4 similarity index 100% rename from Aliases/lua@5.3 rename to Aliases/lua@5.4 From 7bbf9cc800ace71037c51d576bcabc3c11ac7a04 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:31:04 +0000 Subject: [PATCH 03/28] Add lua@5.3 Version bumped to 5.3.6. --- Formula/lua@5.3.rb | 151 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 Formula/lua@5.3.rb diff --git a/Formula/lua@5.3.rb b/Formula/lua@5.3.rb new file mode 100644 index 0000000000000..6d4cb1b28e035 --- /dev/null +++ b/Formula/lua@5.3.rb @@ -0,0 +1,151 @@ +class LuaAT53 < Formula + desc "Powerful, lightweight programming language" + homepage "https://www.lua.org/" + url "https://www.lua.org/ftp/lua-5.3.6.tar.gz" + sha256 "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60" + license "MIT" + + livecheck do + url "https://www.lua.org/ftp/" + regex(/href=.*?lua[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + keg_only :versioned_formula + + uses_from_macos "unzip" => :build + + on_linux do + depends_on "readline" + end + + # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy + # See: https://github.com/Homebrew/legacy-homebrew/pull/5043 + # ***Update me with each version bump!*** + patch :DATA + + def install + # Subtitute formula prefix in `src/Makefile` for install name (dylib ID). + # Use our CC/CFLAGS to compile. + inreplace "src/Makefile" do |s| + s.gsub! "@LUA_PREFIX@", prefix + s.remove_make_var! "CC" + s.change_make_var! "CFLAGS", "#{ENV.cflags} -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)" + s.change_make_var! "MYLDFLAGS", ENV.ldflags + end + + # Fix path in the config header + inreplace "src/luaconf.h", "/usr/local", HOMEBREW_PREFIX + + # We ship our own pkg-config file as Lua no longer provide them upstream. + system "make", "macosx", "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" + system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" + (lib/"pkgconfig/lua.pc").write pc_file + + # Fix some software potentially hunting for different pc names. + bin.install_symlink "lua" => "lua#{version.major_minor}" + bin.install_symlink "lua" => "lua-#{version.major_minor}" + bin.install_symlink "luac" => "luac#{version.major_minor}" + bin.install_symlink "luac" => "luac-#{version.major_minor}" + (include/"lua#{version.major_minor}").install_symlink Dir[include/"lua/*"] + lib.install_symlink "liblua.#{version.major_minor}.dylib" => "liblua#{version.major_minor}.dylib" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua#{version.major_minor}.pc" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua-#{version.major_minor}.pc" + end + + def pc_file + <<~EOS + V= #{version.major_minor} + R= #{version} + prefix=#{HOMEBREW_PREFIX} + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include/lua + INSTALL_LIB= ${prefix}/lib + INSTALL_MAN= ${prefix}/share/man/man1 + INSTALL_LMOD= ${prefix}/share/lua/${V} + INSTALL_CMOD= ${prefix}/lib/lua/${V} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${prefix}/include/lua + + Name: Lua + Description: An Extensible Extension Language + Version: #{version} + Requires: + Libs: -L${libdir} -llua -lm + Cflags: -I${includedir} + EOS + end + + def caveats + <<~EOS + You may also want luarocks: + brew install luarocks + EOS + end + + test do + assert_match "Ducks are terrifying.", shell_output("#{bin}/lua -e \"print ('Ducks are terrifying.')\"") + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 7fa91c8..a825198 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,7 +41,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + # What to install. + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua.5.3.6.dylib + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -63,6 +63,8 @@ install: dummy + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++ ln -s -f liblua.5.3.6.dylib $(INSTALL_LIB)/liblua.5.3.dylib ++ ln -s -f liblua.5.3.dylib $(INSTALL_LIB)/liblua.dylib + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) +diff --git a/src/Makefile b/src/Makefile +index 2e7a412..d0c4898 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -28,7 +28,7 @@ MYOBJS= + + PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + +-LUA_A= liblua.a ++LUA_A= liblua.5.3.6.dylib + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +@@ -56,11 +56,12 @@ o: $(ALL_O) + a: $(ALL_A) + + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) +- $(RANLIB) $@ ++ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.3.dylib \ ++ -compatibility_version 5.3 -current_version 5.3.6 \ ++ -o liblua.5.3.6.dylib $^ + + $(LUA_T): $(LUA_O) $(LUA_A) +- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++ $(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.3.6 $(LIBS) + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) +@@ -110,7 +111,7 @@ linux: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" + + macosx: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -fno-common" SYSLIBS="-lreadline" + + mingw: + $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ From 327a828c2996c24a93203ab61f28069fbe6fcd47 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:49:46 +0000 Subject: [PATCH 04/28] Remove renamed formula Cf. https://github.com/Homebrew/homebrew-core/pull/65993#issuecomment-736530131 --- formula_renames.json | 1 - 1 file changed, 1 deletion(-) diff --git a/formula_renames.json b/formula_renames.json index 43c3baaca967a..1fe867f5953bc 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -75,7 +75,6 @@ "libcppa": "caf", "libmongoclient": "mongo-cxx-driver", "lua51": "lua@5.1", - "lua@5.3": "lua", "mat": "mat2", "maven32": "maven@3.2", "mkl-dnn": "onednn", From 9e3b9e67a8bca202ad1695806bb641bbdd571f5f Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:19:03 +0000 Subject: [PATCH 05/28] clingo revision bump (lua 5.4.1) --- Formula/clingo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/clingo.rb b/Formula/clingo.rb index d6e69a0f978b3..416e4cb3d22aa 100644 --- a/Formula/clingo.rb +++ b/Formula/clingo.rb @@ -4,7 +4,7 @@ class Clingo < Formula url "https://github.com/potassco/clingo/archive/v5.4.0.tar.gz" sha256 "e2de331ee0a6d254193aab5995338a621372517adcf91568092be8ac511c18f3" license "MIT" - revision 2 + revision 3 livecheck do url "https://github.com/potassco/clingo/releases/latest" From e77d2671a588af299b21e94d83347a372339ccfa Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:20:44 +0000 Subject: [PATCH 06/28] corsixth revision bump (lua 5.4.1) Dependency switched to `lua@5.3` due to build failure. --- Formula/corsixth.rb | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Formula/corsixth.rb b/Formula/corsixth.rb index f78213859bf1f..3a3d657730fef 100644 --- a/Formula/corsixth.rb +++ b/Formula/corsixth.rb @@ -4,6 +4,7 @@ class Corsixth < Formula url "https://github.com/CorsixTH/CorsixTH/archive/v0.64.tar.gz" sha256 "12389a95de0031baec1a3fc77208d44228177f49564f1c79ae763ab4aeeafa98" license "MIT" + revision 1 head "https://github.com/CorsixTH/CorsixTH.git" bottle do @@ -18,7 +19,13 @@ class Corsixth < Formula depends_on xcode: :build depends_on "ffmpeg" depends_on "freetype" - depends_on "lua" + + # This PR implements a limited form of lua 5.4 support: + # https://github.com/CorsixTH/CorsixTH/pull/1686 + # It breaks some features. Maintainer does not appear to have intentions of + # supporting lua 5.4. + depends_on "lua@5.3" + depends_on "sdl2" depends_on "sdl2_mixer" @@ -34,6 +41,9 @@ class Corsixth < Formula end def install + # Make sure I point to the right version! + lua = Formula["lua@5.3"] + ENV["TARGET_BUILD_DIR"] = "." ENV["FULL_PRODUCT_NAME"] = "CorsixTH.app" @@ -47,9 +57,9 @@ def install end end - system "cmake", ".", "-DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}/lua", - "-DLUA_LIBRARY=#{Formula["lua"].opt_lib}/liblua.dylib", - "-DLUA_PROGRAM_PATH=#{Formula["lua"].opt_bin}/lua", + system "cmake", ".", "-DLUA_INCLUDE_DIR=#{lua.opt_include}/lua", + "-DLUA_LIBRARY=#{lua.opt_lib}/liblua.dylib", + "-DLUA_PROGRAM_PATH=#{lua.opt_bin}/lua", "-DCORSIX_TH_DATADIR=#{prefix}/CorsixTH.app/Contents/Resources/", *std_cmake_args system "make" @@ -62,8 +72,11 @@ def install end test do + # Make sure I point to the right version! + lua = Formula["lua@5.3"] + app = prefix/"CorsixTH.app/Contents/MacOS/CorsixTH" assert_includes MachO::Tools.dylibs(app), - "#{Formula["lua"].opt_lib}/liblua.5.3.dylib" + "#{lua.opt_lib}/liblua.#{lua.version.major_minor}.dylib" end end From ccceb8dcbd16c61ae47d02a4550f23beabe32389 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:21:24 +0000 Subject: [PATCH 07/28] freeswitch revision bump (lua 5.4.1) --- Formula/freeswitch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/freeswitch.rb b/Formula/freeswitch.rb index bb0c5bddfe6e3..168fb5b2ed626 100644 --- a/Formula/freeswitch.rb +++ b/Formula/freeswitch.rb @@ -2,7 +2,7 @@ class Freeswitch < Formula desc "Telephony platform to route various communication protocols" homepage "https://freeswitch.org" license "MPL-1.1" - revision 2 + revision 3 head "https://github.com/signalwire/freeswitch.git" stable do From f6f7acbbc55e7d17208038497ac379cee526c169 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Wed, 2 Dec 2020 00:27:08 +0000 Subject: [PATCH 08/28] gnuplot revision bump (lua 5.4.1) --- Formula/gnuplot.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/gnuplot.rb b/Formula/gnuplot.rb index 4dc7d7c2acf97..ee7d01367d01f 100644 --- a/Formula/gnuplot.rb +++ b/Formula/gnuplot.rb @@ -4,6 +4,7 @@ class Gnuplot < Formula url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.4.1/gnuplot-5.4.1.tar.gz" sha256 "6b690485567eaeb938c26936e5e0681cf70c856d273cc2c45fabf64d8bc6590e" license "gnuplot" + revision 1 livecheck do url :stable From c5cfc99de074d61a006fb03613d1106910cc4eab Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:23:42 +0000 Subject: [PATCH 09/28] highlight revision bump (lua 5.4.1) --- Formula/highlight.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/highlight.rb b/Formula/highlight.rb index 6485bfce54983..6f91882903aa3 100644 --- a/Formula/highlight.rb +++ b/Formula/highlight.rb @@ -4,6 +4,7 @@ class Highlight < Formula url "http://www.andre-simon.de/zip/highlight-3.59.tar.bz2" sha256 "85926ca8e08e69b497fa4a0c93bec595e15c1ca18c4ee494ea3f1c9a78c249a2" license "GPL-3.0-or-later" + revision 1 head "https://gitlab.com/saalen/highlight.git" bottle do From 37ef9fee4b7edf1734f4bc1d8d9e9aed7e078118 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:24:34 +0000 Subject: [PATCH 10/28] imapfilter revision bump (lua 5.4.1) --- Formula/imapfilter.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/imapfilter.rb b/Formula/imapfilter.rb index f5cd0e2ab4075..09420e4fd6ec2 100644 --- a/Formula/imapfilter.rb +++ b/Formula/imapfilter.rb @@ -4,6 +4,7 @@ class Imapfilter < Formula url "https://github.com/lefcha/imapfilter/archive/v2.6.16.tar.gz" sha256 "90af9bc9875e03fb5a09a3233287b74dd817867cb18ec9ff52fead615755563e" license "MIT" + revision 1 bottle do sha256 "95cacc31b13fbd4a1435be7cf18e0dd87ca8ec0d9f51a944d1734c19bbea83cc" => :big_sur From bfbb8f3d0cebe1840f5ee972ea26945f81a1e660 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:25:32 +0000 Subject: [PATCH 11/28] instead revision bump (lua 5.4.1) Dependency switched to `lua@5.3` due to build failure. --- Formula/instead.rb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Formula/instead.rb b/Formula/instead.rb index e97fbd55758de..dcd8c3c61bf8e 100644 --- a/Formula/instead.rb +++ b/Formula/instead.rb @@ -4,6 +4,7 @@ class Instead < Formula url "https://github.com/instead-hub/instead/archive/3.3.2.tar.gz" sha256 "bdb827f36e693dc7b443e69d4678d24f1ccc20dc093c22f58b8d78192da15f2e" license "MIT" + revision 1 bottle do sha256 "4279441d1a315d876f9646a284ac3beefd109e7fa7c4ebce2fb8549bf0947d94" => :big_sur @@ -13,17 +14,27 @@ class Instead < Formula end depends_on "cmake" => :build - depends_on "lua" + + # Possible patch for lua 5.4 support: + # https://github.com/instead-hub/instead/commit/ea4f0e81c6859b0aadde582f47ffd7850f54a264 + # Alternatively, this dependency may be replaced with luajit, which is the + # package's preferred version of lua: + # https://github.com/instead-hub/instead/blob/master/INSTALL + depends_on "lua@5.3" + depends_on "sdl2" depends_on "sdl2_image" depends_on "sdl2_mixer" depends_on "sdl2_ttf" def install + # Make sure I point to the correct lua version! + lua = Formula["lua@5.3"] + mkdir "build" do system "cmake", "..", "-DWITH_GTK2=OFF", - "-DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}/lua", - "-DLUA_LIBRARY=#{Formula["lua"].opt_lib}/liblua.dylib", + "-DLUA_INCLUDE_DIR=#{lua.opt_include}/lua", + "-DLUA_LIBRARY=#{lua.opt_lib}/liblua.dylib", *std_cmake_args system "make", "install" end From dd254ee4845d291f6f08d68c74dfc42ffddfa754 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:30:26 +0000 Subject: [PATCH 12/28] kyua revision bump (lua 5.4.1) --- Formula/kyua.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/kyua.rb b/Formula/kyua.rb index 20f8733987113..30f886fbdb1c7 100644 --- a/Formula/kyua.rb +++ b/Formula/kyua.rb @@ -4,7 +4,7 @@ class Kyua < Formula url "https://github.com/jmmv/kyua/releases/download/kyua-0.13/kyua-0.13.tar.gz" sha256 "db6e5d341d5cf7e49e50aa361243e19087a00ba33742b0855d2685c0b8e721d6" license "BSD-3-Clause" - revision 1 + revision 2 bottle do sha256 "888d669ac50da9075895a0702e7b119fa00a5822e9ce57afe3216c00659fe339" => :big_sur From ae2af8c13f520407ac61be6bd4a95b6e1e754699 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:33:55 +0000 Subject: [PATCH 13/28] lcm revision bump (lua 5.4.1) --- Formula/lcm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/lcm.rb b/Formula/lcm.rb index 0c2fcaf29a9fa..b76d2aa2f3a4f 100644 --- a/Formula/lcm.rb +++ b/Formula/lcm.rb @@ -4,7 +4,7 @@ class Lcm < Formula url "https://github.com/lcm-proj/lcm/releases/download/v1.4.0/lcm-1.4.0.zip" sha256 "e249d7be0b8da35df8931899c4a332231aedaeb43238741ae66dc9baf4c3d186" license "LGPL-2.1" - revision 5 + revision 6 head "https://github.com/lcm-proj/lcm.git" bottle do From e80d2c9799912c61122c3a52dd8c5ba03716d82d Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:34:44 +0000 Subject: [PATCH 14/28] lsyncd revision bump (lua 5.4.1) Dependency switched to `lua@5.3` due to build failure. --- Formula/lsyncd.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Formula/lsyncd.rb b/Formula/lsyncd.rb index 4965cc15ea6b2..bac32197ed3cd 100644 --- a/Formula/lsyncd.rb +++ b/Formula/lsyncd.rb @@ -4,6 +4,7 @@ class Lsyncd < Formula url "https://github.com/axkibe/lsyncd/archive/release-2.2.3.tar.gz" sha256 "7bcd0f4ae126040bb078c482ff856c87e61c22472c23fa3071798dcb1dc388dd" license "GPL-2.0" + revision 1 bottle do cellar :any @@ -15,7 +16,10 @@ class Lsyncd < Formula end depends_on "cmake" => :build - depends_on "lua" + + # lua 5.4 support tracking issue: + # https://github.com/axkibe/lsyncd/issues/621 + depends_on "lua@5.3" xnu_headers = { "10.7" => ["xnu-1699.22.73.tar.gz", "c9d24560af543e6099b6248bdbcef3581e7ba4af3afd92974719f7c5a8db5bd2"], From 7c73af2e4223c787e56a3a86689cd7b7f81eb026 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:36:31 +0000 Subject: [PATCH 15/28] lutok revision bump (lua 5.4.1) --- Formula/lutok.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/lutok.rb b/Formula/lutok.rb index a551c2de942d0..bb519572a9cdf 100644 --- a/Formula/lutok.rb +++ b/Formula/lutok.rb @@ -4,7 +4,7 @@ class Lutok < Formula url "https://github.com/jmmv/lutok/releases/download/lutok-0.4/lutok-0.4.tar.gz" sha256 "2cec51efa0c8d65ace8b21eaa08384b77abc5087b46e785f78de1c21fb754cd5" license "BSD-3-Clause" - revision 1 + revision 2 bottle do cellar :any From beeb2614f5ceca3b2d253ada9b61ba495e772d63 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:37:56 +0000 Subject: [PATCH 16/28] macvim revision bump (lua 5.4.1) --- Formula/macvim.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/macvim.rb b/Formula/macvim.rb index 60f2c48c03cf4..de7db0f171034 100644 --- a/Formula/macvim.rb +++ b/Formula/macvim.rb @@ -6,7 +6,7 @@ class Macvim < Formula version "8.2-166" sha256 "d9745f01c45fb2c1c99ce3b74bf1db6b888805bbb2d2a570bfb5742828ca601a" license "Vim" - revision 1 + revision 2 head "https://github.com/macvim-dev/macvim.git" bottle do From 12f9bd4097c91db77b7825e493088df16c1bf9e6 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:38:56 +0000 Subject: [PATCH 17/28] neomutt revision bump (lua 5.4.1) --- Formula/neomutt.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/neomutt.rb b/Formula/neomutt.rb index 6900cfd79e008..721179e91252c 100644 --- a/Formula/neomutt.rb +++ b/Formula/neomutt.rb @@ -4,6 +4,7 @@ class Neomutt < Formula url "https://github.com/neomutt/neomutt/archive/20201127.tar.gz" sha256 "29ac51a5ac5b4524dfdbb5ac78b59a1cc28c1090c541fb3da7bc86f838ab64cd" license "GPL-2.0-or-later" + revision 1 head "https://github.com/neomutt/neomutt.git" bottle do From 405b0cde56780fba4b8f36c8427cbde28c97f7d7 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:40:08 +0000 Subject: [PATCH 18/28] onscripter revision bump (lua 5.4.1) --- Formula/onscripter.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/onscripter.rb b/Formula/onscripter.rb index 04a5959516009..55f5b32adf43f 100644 --- a/Formula/onscripter.rb +++ b/Formula/onscripter.rb @@ -4,6 +4,7 @@ class Onscripter < Formula url "https://onscripter.osdn.jp/onscripter-20200722.tar.gz" sha256 "12e5f4ac336ae3da46bf166ff1d439840be6336b19401a76c7d788994a9cd35e" license "GPL-2.0" + revision 1 bottle do cellar :any From 078ce34957fb13108e312608d0b42a19ea720c24 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:41:21 +0000 Subject: [PATCH 19/28] osrm-backend revision bump (lua 5.4.1) Dependency switched to `lua@5.3` due to build failure. --- Formula/osrm-backend.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Formula/osrm-backend.rb b/Formula/osrm-backend.rb index a37b9199d7486..783c082c42be2 100644 --- a/Formula/osrm-backend.rb +++ b/Formula/osrm-backend.rb @@ -4,6 +4,7 @@ class OsrmBackend < Formula url "https://github.com/Project-OSRM/osrm-backend/archive/v5.23.0.tar.gz" sha256 "8527ce7d799123a9e9e99551936821cc0025baae6f2120dbf2fbc6332c709915" license "BSD-2-Clause" + revision 1 head "https://github.com/Project-OSRM/osrm-backend.git" livecheck do @@ -24,7 +25,11 @@ class OsrmBackend < Formula depends_on "libstxxl" depends_on "libxml2" depends_on "libzip" - depends_on "lua" + + # Possible patch for lua5.4 support: + # https://github.com/Project-OSRM/osrm-backend/pull/5783 + # Upgrade me to lua5.4 at the next version bump. + depends_on "lua@5.3" # "invalid use of non-static data member 'offset'" # https://github.com/Project-OSRM/osrm-backend/issues/3719 From 5668497d1dccf193ca75db668afb595853bee96e Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:42:14 +0000 Subject: [PATCH 20/28] pdns revision bump (lua 5.4.1) --- Formula/pdns.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/pdns.rb b/Formula/pdns.rb index 94b6ba2f8c279..ee6e5ac4e7bf0 100644 --- a/Formula/pdns.rb +++ b/Formula/pdns.rb @@ -4,6 +4,7 @@ class Pdns < Formula url "https://downloads.powerdns.com/releases/pdns-4.3.1.tar.bz2" sha256 "d5146c04098ee94b9377ee491ebb3fd5eb061d7b24262f4a8e1a89f2ed3fc245" license "GPL-2.0-or-later" + revision 1 livecheck do url "https://downloads.powerdns.com/releases/" From 800721b9900932be54adc36ffd79205e6742d32f Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:43:32 +0000 Subject: [PATCH 21/28] pdnsrec revision bump (lua 5.4.1) --- Formula/pdnsrec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/pdnsrec.rb b/Formula/pdnsrec.rb index c9e357c97f260..b1ded8711821e 100644 --- a/Formula/pdnsrec.rb +++ b/Formula/pdnsrec.rb @@ -4,6 +4,7 @@ class Pdnsrec < Formula url "https://downloads.powerdns.com/releases/pdns-recursor-4.4.1.tar.bz2" sha256 "f97fa34635d42c68acee5d4da9db0e5ff619fd49e62acace7b4bdb7ee3675698" license "GPL-2.0-only" + revision 1 livecheck do url "https://downloads.powerdns.com/releases/" From df74ea8d77ef8e0ffa7e2c8a3153c285ccf714dd Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:44:11 +0000 Subject: [PATCH 22/28] rpm revision bump (lua 5.4.1) --- Formula/rpm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/rpm.rb b/Formula/rpm.rb index 4ac504a14be6b..7af45e12b338f 100644 --- a/Formula/rpm.rb +++ b/Formula/rpm.rb @@ -4,7 +4,7 @@ class Rpm < Formula url "http://ftp.rpm.org/releases/rpm-4.15.x/rpm-4.15.1.tar.bz2" mirror "https://ftp.osuosl.org/pub/rpm/releases/rpm-4.15.x/rpm-4.15.1.tar.bz2" sha256 "ddef45f9601cd12042edfc9b6e37efcca32814e1e0f4bb8682d08144a3e2d230" - revision 1 + revision 2 version_scheme 1 livecheck do From 21e8c79cdb116c927e2c0d01b8d0412f7a636532 Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:45:00 +0000 Subject: [PATCH 23/28] sile revision bump (lua 5.4.1) Dependency switched to `lua@5.3` due to test failure. A potential fix to upgrade to lua5.4 is proposed here: https://github.com/sile-typesetter/sile/issues/1115 --- Formula/sile.rb | 65 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/Formula/sile.rb b/Formula/sile.rb index 6daae1873e37e..c99febb6d67b4 100644 --- a/Formula/sile.rb +++ b/Formula/sile.rb @@ -4,6 +4,7 @@ class Sile < Formula url "https://github.com/sile-typesetter/sile/releases/download/v0.10.13/sile-0.10.13.tar.xz" sha256 "d207d0ee9749a6da16fa2db217f51d3586955387a132c45423b47eedf8c964a6" license "MIT" + revision 1 head "https://github.com/sile-typesetter/sile.git", shallow: false bottle do @@ -25,7 +26,12 @@ class Sile < Formula depends_on "harfbuzz" depends_on "icu4c" depends_on "libpng" - depends_on "lua" + + # Unable to upgrade to lua5.4 due to test failure. + # For a suggested fix: + # https://github.com/sile-typesetter/sile/issues/1115 + depends_on "lua@5.3" + depends_on "openssl@1.1" depends_on "zlib" @@ -105,25 +111,64 @@ class Sile < Formula end def install + lua = Formula["lua@5.3"] + luaprefix = lua.opt_prefix + luaversion = lua.version.major_minor luapath = libexec/"vendor" - ENV["LUA_PATH"] = - "#{luapath}/share/lua/5.3/?.lua;#{luapath}/share/lua/5.3/?/init.lua;#{luapath}/share/lua/5.3/lxp/?.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" + + paths = %W[ + #{luapath}/share/lua/#{luaversion}/?.lua + #{luapath}/share/lua/#{luaversion}/?/init.lua + #{luapath}/share/lua/#{luaversion}/lxp/?.lua + ] + + ENV["LUA_PATH"] = paths.join(";") + ENV["LUA_CPATH"] = "#{luapath}/lib/lua/#{luaversion}/?.so" + + ENV.prepend "CPPFLAGS", "-I#{lua.opt_include}/lua" + ENV.prepend "LDFLAGS", "-L#{lua.opt_lib}" resources.each do |r| r.stage do case r.name when "lua-zlib" # https://github.com/brimworks/lua-zlib/commit/08d6251700965 - mv "lua-zlib-1.1-0.rockspec", "lua-zlib-1.2-0.rockspec" - system "luarocks", "make", "#{r.name}-#{r.version}-0.rockspec", "--tree=#{luapath}", - "ZLIB_DIR=#{Formula["zlib"].opt_prefix}" + # https://github.com/brimworks/lua-zlib/issues/49 + mv "lua-zlib-1.1-0.rockspec", "lua-zlib-1.2-1.rockspec" + + # rockspec needs to be updated to accommodate lua5.4: + # https://github.com/brimworks/lua-zlib/pull/50 + # Note that the maintainer prefers the upper bound of `<= 5.4`, + # so this may lead to subtle breakage if lua5.5 is ever released. + # https://github.com/brimworks/lua-zlib/pull/51 + # Remove this when `lua-zlib` is updated. + inreplace "lua-zlib-1.2-1.rockspec" do |s| + s.gsub! "1.2-0", "1.2-1" + s.gsub! ", <= 5.3", "" + end + + system "luarocks", "make", + "#{r.name}-#{r.version}-1.rockspec", + "ZLIB_DIR=#{Formula["zlib"].opt_prefix}", + "--tree=#{luapath}", + "--lua-dir=#{luaprefix}" when "luaexpat" - system "luarocks", "build", r.name, "--tree=#{luapath}", "EXPAT_DIR=#{Formula["expat"].opt_prefix}" + system "luarocks", "build", + r.name, + "EXPAT_DIR=#{Formula["expat"].opt_prefix}", + "--tree=#{luapath}", + "--lua-dir=#{luaprefix}" when "luasec" - system "luarocks", "build", r.name, "--tree=#{luapath}", "OPENSSL_DIR=#{Formula["openssl@1.1"].opt_prefix}" + system "luarocks", "build", + r.name, + "OPENSSL_DIR=#{Formula["openssl@1.1"].opt_prefix}", + "--tree=#{luapath}", + "--lua-dir=#{luaprefix}" else - system "luarocks", "build", r.name, "--tree=#{luapath}" + system "luarocks", "build", + r.name, + "--tree=#{luapath}", + "--lua-dir=#{luaprefix}" end end end From f8afe31de586528deaa5be194beeef74f891db0e Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:45:43 +0000 Subject: [PATCH 24/28] tracebox revision bump (lua 5.4.1) Added dependency on `libpcap`. Ref: https://www.tracebox.org Thanks to @hyuraku for the (stolen) assist: https://github.com/Homebrew/homebrew-core/pull/65843 --- Formula/tracebox.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/tracebox.rb b/Formula/tracebox.rb index 403194c36a891..ce9b459a1a97e 100644 --- a/Formula/tracebox.rb +++ b/Formula/tracebox.rb @@ -4,8 +4,8 @@ class Tracebox < Formula url "https://github.com/tracebox/tracebox.git", tag: "v0.4.4", revision: "4fc12b2e330e52d340ecd64b3a33dbc34c160390" - license "GPL-2.0" - revision 2 + license "GPL-2.0-only" + revision 3 head "https://github.com/tracebox/tracebox.git" bottle do @@ -17,14 +17,18 @@ class Tracebox < Formula depends_on "automake" => :build depends_on "libtool" => :build depends_on "json-c" + depends_on "libpcap" depends_on "lua" def install + ENV.append_to_cflags "-I#{Formula["libpcap"].opt_include}" + ENV.append "LIBS", "-L#{Formula["libpcap"].opt_lib} -lpcap" ENV.libcxx system "autoreconf", "--install" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", + "--with-libpcap=yes", "--prefix=#{prefix}" system "make" system "make", "install" From c484133fe9437d94f1561bf92f2b8ef9fe7079cb Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:46:27 +0000 Subject: [PATCH 25/28] vim revision bump (lua 5.4.1) --- Formula/vim.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/vim.rb b/Formula/vim.rb index be3e4c608c441..bd7a49dc1ef3f 100644 --- a/Formula/vim.rb +++ b/Formula/vim.rb @@ -5,6 +5,7 @@ class Vim < Formula url "https://github.com/vim/vim/archive/v8.2.2050.tar.gz" sha256 "e1013e6c013f57e6d9843c7bb549256673c778e2afd5fbbb131b7aa14e021743" license "Vim" + revision 1 head "https://github.com/vim/vim.git" bottle do From f8119b04fbe61800cc66d6ba032a1189923f191c Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:47:07 +0000 Subject: [PATCH 26/28] vis revision bump (lua 5.4.1) --- Formula/vis.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Formula/vis.rb b/Formula/vis.rb index b62bca3bd592f..edbfa203668bc 100644 --- a/Formula/vis.rb +++ b/Formula/vis.rb @@ -3,6 +3,7 @@ class Vis < Formula homepage "https://github.com/martanne/vis" url "https://github.com/martanne/vis/archive/v0.6.tar.gz" sha256 "9ab4a3f1c5953475130b3c286af272fe5cfdf7cbb7f9fbebd31e9ea4f34e487d" + revision 1 head "https://github.com/martanne/vis.git" bottle do @@ -22,10 +23,21 @@ class Vis < Formula sha256 "149be31e0155c4694f77ea7264d9b398dd134eca0d00ff03358d91a6cfb2ea9d" end + # Upstream patch for lua5.4 compatibility: + # https://github.com/martanne/vis/pull/844 + # Remove me at the next version bump + patch do + url "https://github.com/martanne/vis/commit/603ee4688ca0da05840bbc15241ee53b02d0987d.patch?full_index=1" + sha256 "69a3e466bdbc0695213cc5f9f61a0d3819b861c872bdfcee441558f46799b4fa" + end + def install + # Make sure I point to the right version! + lua = Formula["lua"] + luapath = libexec/"vendor" - ENV["LUA_PATH"] = "#{luapath}/share/lua/5.3/?.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" + ENV["LUA_PATH"] = "#{luapath}/share/lua/#{lua.version.major_minor}/?.lua" + ENV["LUA_CPATH"] = "#{luapath}/lib/lua/#{lua.version.major_minor}/?.so" resource("lpeg").stage do system "luarocks", "build", "lpeg", "--tree=#{luapath}" From 54b50980052d22a0be4bee47702973429a23a1ba Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:47:38 +0000 Subject: [PATCH 27/28] weechat revision bump (lua 5.4.1) --- Formula/weechat.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/weechat.rb b/Formula/weechat.rb index c7c70dbdf9309..45908d3a91651 100644 --- a/Formula/weechat.rb +++ b/Formula/weechat.rb @@ -4,6 +4,7 @@ class Weechat < Formula url "https://weechat.org/files/src/weechat-3.0.tar.xz" sha256 "6cb7d25a363b66b835f1b9f29f3580d6f09ac7d38505b46a62c178b618d9f1fb" license "GPL-3.0-or-later" + revision 1 head "https://github.com/weechat/weechat.git" bottle do From 28cb03d9a521923e815616d11d1cf9b5aec6ca7a Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Tue, 1 Dec 2020 19:53:01 +0000 Subject: [PATCH 28/28] luarocks: fix test + revision bump (lua 5.4.1) Revision needed to rebuild against lua5.4. This should fix the formulae that need luarocks to build: - corsixth - sile - vis --- Formula/luarocks.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Formula/luarocks.rb b/Formula/luarocks.rb index 41a5442e437e5..fc7c0627bfac7 100644 --- a/Formula/luarocks.rb +++ b/Formula/luarocks.rb @@ -4,6 +4,7 @@ class Luarocks < Formula url "https://luarocks.org/releases/luarocks-3.4.0.tar.gz" sha256 "62ce5826f0eeeb760d884ea8330cd1552b5d432138b8bade0fa72f35badd02d0" license "MIT" + revision 1 head "https://github.com/luarocks/luarocks.git" bottle do @@ -27,7 +28,7 @@ def install def caveats <<~EOS LuaRocks supports multiple versions of Lua. By default it is configured - to use Lua5.3, but you can require it to use another version at runtime + to use Lua#{Formula["lua"].version.major_minor}, but you can require it to use another version at runtime with the `--lua-dir` flag, like this: luarocks --lua-dir=#{Formula["lua@5.1"].opt_prefix} install say @@ -35,17 +36,17 @@ def caveats end test do - ENV["LUA_PATH"] = "#{testpath}/share/lua/5.3/?.lua" - ENV["LUA_CPATH"] = "#{testpath}/lib/lua/5.3/?.so" + ENV["LUA_PATH"] = "#{testpath}/share/lua/5.4/?.lua" + ENV["LUA_CPATH"] = "#{testpath}/lib/lua/5.4/?.so" - (testpath/"lfs_53test.lua").write <<~EOS + (testpath/"lfs_54test.lua").write <<~EOS require("lfs") print(lfs.currentdir()) EOS system "#{bin}/luarocks", "--tree=#{testpath}", "install", "luafilesystem" system "lua", "-e", "require('lfs')" - assert_match testpath.to_s, shell_output("lua lfs_53test.lua") + assert_match testpath.to_s, shell_output("lua lfs_54test.lua") ENV["LUA_PATH"] = "#{testpath}/share/lua/5.1/?.lua" ENV["LUA_CPATH"] = "#{testpath}/lib/lua/5.1/?.so"