<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/46287b463d8953c60164c8e56fe2394fb99cea9d">https://github.com/macports/macports-ports/commit/46287b463d8953c60164c8e56fe2394fb99cea9d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 46287b463d8953c60164c8e56fe2394fb99cea9d
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sat Feb 11 03:45:01 2023 -0700
<span style='display:block; white-space:pre;color:#404040;'> lua: refactor Portfile
</span>---
lang/lua/Portfile | 182 +++++++++++++++++++++++++++---------------------------
1 file changed, 92 insertions(+), 90 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/Portfile b/lang/lua/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 65be5924d1d..600cf359b1f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,118 +1,120 @@
</span> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
<span style='display:block; white-space:pre;background:#ffe0e0;'>-PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-name lua
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-conflicts lua50
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-version 5.3.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-categories lang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-license MIT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin linux
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-description powerful, lightweight programming language
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description Lua is a powerful, light-weight programming language designed for \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extending applications. Lua is also frequently used as a general-purpose, \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- standalone language.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-homepage https://www.lua.org/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-master_sites ${homepage}ftp/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 cc715df991bccaec75a022404902200d984b002e \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 303770
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-Makefile.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-Makefile.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-luaconf.h.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# TODO: also add lua50 here
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lua54 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 5.4.4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 fc2d63300da19e1c2cdb35011034d44cfd590b0e \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 360876
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles patch-Makefile-54.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-Makefile-54.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-luaconf.h-54.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name lua
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+conflicts lua50
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 5.3.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories lang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description powerful, lightweight programming language
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description Lua is a {*}${description} designed for \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extending applications. Lua is also frequently used as a general-purpose, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ standalone language.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.lua.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites ${homepage}ftp/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 cc715df991bccaec75a022404902200d984b002e \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 303770
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-Makefile.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-Makefile.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-luaconf.h.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lua54 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 5.4.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 fc2d63300da19e1c2cdb35011034d44cfd590b0e \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 360876
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-Makefile-54.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-Makefile-54.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-luaconf.h-54.diff
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lua53 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 5.3.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 cc715df991bccaec75a022404902200d984b002e \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 303770
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lua53 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 5.3.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 cc715df991bccaec75a022404902200d984b002e \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 303770
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles patch-Makefile-53.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-Makefile-53.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-luaconf.h-53.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-Makefile-53.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-Makefile-53.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-luaconf.h-53.diff
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lua52 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 5.2.4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 3bad2da85f354132da6a53b45882006f0a451b5c \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 252651
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lua52 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 5.2.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 3bad2da85f354132da6a53b45882006f0a451b5c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 252651
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles patch-Makefile-52.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-Makefile-52.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-luaconf.h-52.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-Makefile-52.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-Makefile-52.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-luaconf.h-52.diff
</span>
# this is needed only on lua52, to fix build in 10.4
# this patch is already in lua53+ and works on all tested systems
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-liolib-tiger.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-src-liolib-tiger.diff
</span>
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lua51 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 5.1.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 b0c2234675335a8bf158a125b6778cf800c754a0 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 221213
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lua51 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 5.1.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 b0c2234675335a8bf158a125b6778cf800c754a0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 221213
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles patch-Makefile-51.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-Makefile-51.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-luaconf.h-51.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-Makefile-51.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-Makefile-51.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-luaconf.h-51.diff
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set branch [join [lrange [split ${version} .] 0 1] .]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# TODO: also add lua50 here
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set branch [join [lrange [split ${version} .] 0 1] .]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_lib port:readline
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-build.target macosx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib port:readline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.target macosx
</span>
platform linux {
# With lua 5.4, replace with linux-readline
<span style='display:block; white-space:pre;background:#ffe0e0;'>- build.target linux
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target linux
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-test.run yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-test.env DYLD_LIBRARY_PATH=./lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.env DYLD_LIBRARY_PATH=./lib
</span>
post-extract {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 -W ${filespath} COPYRIGHT ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${filespath}/COPYRIGHT \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$subport eq $name} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 -W ${filespath} lua.pc ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${filespath}/lua.pc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 ${filespath}/lua-branched.pc ${worksrcpath}/lua.pc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${filespath}/lua-branched.pc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/lua.pc
</span> }
}
post-patch {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|@PLATFORM@|${os.platform}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile ${worksrcpath}/src/luaconf.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|@BRANCH@|${branch}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PLATFORM@|${os.platform}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile ${worksrcpath}/src/luaconf.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@BRANCH@|${branch}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
</span>
# See: https://trac.macports.org/ticket/53708
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$subport eq $name} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/Makefile
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -122,7 +124,7 @@ configure {
</span> reinplace "s|CC= .*\$|CC= ${configure.cc}|" ${worksrcpath}/src/Makefile
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-use_parallel_build no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_parallel_build no
</span>
destroot.target install INSTALL_TOP=${destroot}${prefix}
post-destroot {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -134,7 +136,7 @@ post-destroot {
</span> xinstall -m 0644 ${html} ${destroot}${docdir}/html
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$subport eq $name} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq ${name}} {
</span> xinstall -W ${worksrcpath} -m 0644 lua.pc ${destroot}${prefix}/lib/pkgconfig/
} else {
# version executable and man pages files
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -147,16 +149,16 @@ post-destroot {
</span> }
# install versioned pkgconfig file
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
</span> xinstall -m 0644 ${worksrcpath}/lua.pc ${destroot}${prefix}/lib/pkgconfig/lua-${branch}.pc
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-livecheck.type regex
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-livecheck.url ${master_sites}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url ${master_sites}
</span> # Main lua port livecheck shouldn't be limited by the branch
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {$subport eq $name} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- livecheck.regex {lua-(\d+(?:\.\d+)*)}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.regex {lua-(\d+(?:\.\d+)*)}
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- livecheck.regex lua-(${branch}\.\[0-9]+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.regex lua-(${branch}\.\[0-9]+)
</span> }
</pre><pre style='margin:0'>
</pre>