diff --git a/Mk/Uses/lua.mk b/Mk/Uses/lua.mk index 7088d5e29720..c8184225920a 100644 --- a/Mk/Uses/lua.mk +++ b/Mk/Uses/lua.mk @@ -1,280 +1,280 @@ # Provide support for lua # # MAINTAINER: ports@FreeBSD.org # Usage: # # USES+= lua[:options,...] # # Options: # # NN (e.g. 52) - specify an allowed Lua version (can use multiple times) # NN+ (e.g. 52+) - specify a minimum Lua version (discouraged) # -NN (e.g. -53) - specify a maximum allowed version # NN-NN (e.g. 51-53) - specify a range of allowed versions # # flavors define FLAVOR / FLAVORS as luaNN from the allowed versions # # noflavors don't use flavors # # module (implies flavors) specifies that the port is a Lua module # (i.e. that it installes files in MODLIBDIR etc.) # # build add dependency to BUILD_DEPENDS instead of LIB_DEPENDS # run add dependency to RUN_DEPENDS instead of LIB_DEPENDS # # env define only the LUA_* vars and add them to PLIST_SUB and # MAKE_ENV, do not add dependencies or other global state # # core for building Lua itself # # If more than one version is allowed, then the LUA_DEFAULT version (as set # in DEFAULT_VERSIONS) is chosen if it is in the allowed range, otherwise # the closest allowed version to the default is chosen, preferring the # larger version in case of a tie. # # But if "flavors" was requested, and FLAVOR is set, we use that version # exactly. (It is an error to specify a flavor that isn't supported, but # that is checked in bsd.port.mk, not here.) # # LUA_FLAVOR is defined to the desired flavor whether or not "flavors" was # selected; ports should use this to specify the flavor of dependencies # which are Lua modules or otherwise Lua-flavored. # # It's not generally expected that applications that embed Lua, or apps # written in Lua, would use USES=lua:flavors. Given that Lua is lightweight # and does not carry around a whole lot of module ecosystem with it, it is # best that application ports simply specify the Lua version or range of # versions that they support, and let the default one or the latest one be # used. However, they should still use LUA_FLAVOR as needed when specifying # dependencies. # # We assume Lua versions can be represented as 2 digits. # .if !defined(_INCLUDE_USES_LUA_MK) _INCLUDE_USES_LUA_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -_LUA_VALID_VERSIONS:= 54 53 52 51 +_LUA_VALID_VERSIONS:= 55 54 53 52 51 . if defined(_LUA_EXTRA_VER) _LUA_VALID_VERSIONS+= ${_LUA_EXTRA_VER} . endif _LUA_DEFAULT_VERSION:= ${LUA_DEFAULT:S/.//} # args _LUA_ARG_FLAVORS:= _LUA_ARG_MODULE:= _LUA_ARG_ENV:= _LUA_ARG_CORE:= . if ${lua_ARGS:Mmodule} _LUA_ARG_FLAVORS:=yes _LUA_ARG_MODULE:=yes . endif . if ${lua_ARGS:Mflavors} _LUA_ARG_FLAVORS:=yes . endif . if ${lua_ARGS:Mnoflavors} _LUA_ARG_FLAVORS:= . endif . if ${lua_ARGS:Menv} _LUA_ARG_ENV:=yes . endif . if ${lua_ARGS:Mcore} _LUA_ARG_CORE:=yes _LUA_ARG_ENV:=yes _LUA_ARG_FLAVORS:= _LUA_ARG_MODULE:= . endif # core is for building Lua itself, so it overrides all version checks . if ${_LUA_ARG_CORE} _LUA_WANTED_VERSION:=${lua_ARGS:M[1-9][0-9]:[1]} . if ${lua_ARGS:M[1-9][0-9]:[#]} != 1 IGNORE= USES=lua:core must also specify exactly one version number # set to avoid spurious errors below _LUA_WANTED_VERSION:=${_LUA_DEFAULT_VERSION} . endif _LUA_VALID_VERSIONS:=${_LUA_WANTED_VERSION} _LUA_WANTED_VERSIONS:=${_LUA_WANTED_VERSION} _LUA_DEFAULT_VERSION:=${_LUA_WANTED_VERSION} . endif # _LUA_ARG_CORE . if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}} IGNORE= Invalid lua version ${LUA_DEFAULT} . endif # # Parse a ver+ argument # . if ${lua_ARGS:M??+} _LUA_MIN_VERSION:= ${lua_ARGS:M??+:S/+//} _LUA_MAX_VERSION:= 99 . endif # # Parse a -ver argument # . if ${lua_ARGS:M-??} _LUA_MAX_VERSION:= ${lua_ARGS:M-??:S/-//} _LUA_MIN_VERSION:= 0 . endif # # Parse a ver-ver argument # . if ${lua_ARGS:M??-??} _LUA_MIN_VERSION:= ${lua_ARGS:M??-??:C/-.*//} _LUA_MAX_VERSION:= ${lua_ARGS:M??-??:C/.*-//} . endif # # Parse one or more ver arguments # . if ${lua_ARGS:M[1-9][0-9]} . for _v in ${lua_ARGS:M[1-9][0-9]} . if ${_LUA_VALID_VERSIONS:M${_v}} _LUA_WANTED_VERSIONS+=${_v} . endif . endfor . if empty(_LUA_WANTED_VERSIONS) IGNORE= USES=lua:nn did not find any valid version number . endif . endif # # Resolve version ranges. Append anything within the range to the list of # wanted versions. # . if defined(_LUA_MIN_VERSION) && defined(_LUA_MAX_VERSION) . for _v in ${_LUA_VALID_VERSIONS} . if ${_LUA_MIN_VERSION} <= ${_v} && ${_LUA_MAX_VERSION} >= ${_v} _LUA_WANTED_VERSIONS+=${_v} . endif . endfor . if empty(_LUA_WANTED_VERSIONS) IGNORE= USES=lua:xx-yy did not find any valid version . endif . endif # # If no version was specified with any of the ver or ver+ arguments, allow # all versions. # . if empty(_LUA_WANTED_VERSIONS) _LUA_WANTED_VERSIONS:= ${_LUA_VALID_VERSIONS} . endif # The "preferred" version, which must always exist, is defined as the # closest value to the default version, preferring higher versions in # case of ties. We find this by constructing values in sequence: # VV VV+1 VV-1 VV+2 VV-2 ... # and then filtering against the allowed versions. The result is the # final list of "wanted" versions, with the preferred version first. _LUA_NUM_ASC:= \ ${:U:range=99:@_v@${${_v} > ${_LUA_DEFAULT_VERSION}:?${_v}:}@} _LUA_NUM_DESC:= \ ${:U:range=99:[-1..1]:@_v@${${_v} <= ${_LUA_DEFAULT_VERSION}:?${_v}:}@} _LUA_NUM_ALL:= \ ${:U:range=99:@_v@${_LUA_NUM_DESC:[${_v}]} ${_LUA_NUM_ASC:[${_v}]}@} _LUA_WANTED_VERSIONS:= \ ${_LUA_NUM_ALL:@_v@${_LUA_WANTED_VERSIONS:M${_v}}@} . if ${_LUA_ARG_FLAVORS} . if empty(FLAVORS) FLAVORS= ${_LUA_WANTED_VERSIONS:S/^/lua/} . endif . if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif _LUA_WANTED_VERSION:= ${FLAVOR:S/^lua//} . else _LUA_WANTED_VERSION:= ${_LUA_WANTED_VERSIONS:[1]} . endif # If we're building Lua itself, everything should be in $PREFIX. If # we're building a module or app, then the stuff we're installing goes # in $PREFIX but references to Lua itself are in $LOCALBASE. # # The assumption is the LUA_MOD* directories are where we're going to # install (this is common for both modules and apps), and so we also # define LUA_REFMOD* relative to LOCALBASE for use when specifying # dependencies and so on. . if ${_LUA_ARG_CORE} LUA_BASE=${PREFIX} . else LUA_BASE=${LOCALBASE} . endif LUA_PREFIX=${PREFIX} # # Exported variables # LUA_VER_STR= ${_LUA_WANTED_VERSION} LUA_VER= ${_LUA_WANTED_VERSION:S/^5/5./} LUA_FLAVOR= ${_LUA_WANTED_VERSION:S/^/lua/} LUA_CMD= lua${LUA_VER_STR} LUAC_CMD= luac${LUA_VER_STR} LUA_PKGNAMEPREFIX= lua${LUA_VER_STR}- LUA_LIBDIR= ${LUA_BASE}/lib LUA_INCDIR= ${LUA_BASE}/include/lua${LUA_VER_STR} LUA_MODLIBDIR= ${LUA_PREFIX}/lib/lua/${LUA_VER} LUA_MODSHAREDIR= ${LUA_PREFIX}/share/lua/${LUA_VER} LUA_MODDOCSDIR= ${LUA_PREFIX}/share/doc/lua${LUA_VER_STR} LUA_MODEXAMPLESDIR= ${LUA_PREFIX}/share/examples/lua${LUA_VER_STR} LUA_REFMODLIBDIR= ${LUA_BASE}/lib/lua/${LUA_VER} LUA_REFMODSHAREDIR= ${LUA_BASE}/share/lua/${LUA_VER} PLIST_SUB+= LUA_MODLIBDIR=${LUA_MODLIBDIR:S,^${LUA_PREFIX}/,,} \ LUA_MODSHAREDIR=${LUA_MODSHAREDIR:S,^${LUA_PREFIX}/,,} \ LUA_MODDOCSDIR=${LUA_MODDOCSDIR:S,^${LUA_PREFIX}/,,} \ LUA_INCDIR=${LUA_INCDIR:S,^${LUA_BASE}/,,} \ LUA_VER=${LUA_VER} \ LUA_VER_STR=${LUA_VER_STR} MAKE_ENV+= LUA_MODLIBDIR=${LUA_MODLIBDIR} \ LUA_MODSHAREDIR=${LUA_MODSHAREDIR} \ LUA_MODDOCSDIR=${LUA_MODDOCSDIR} \ LUA_INCDIR=${LUA_INCDIR} \ LUA_LIBDIR=${LUA_LIBDIR} \ LUA_VER=${LUA_VER} \ LUA_VER_STR=${LUA_VER_STR} # if building a module or Lua itself, or if the port defined LUA_DOCSUBDIR, # then define LUA_DOCSDIR and LUA_EXAMPLESDIR too . if ${_LUA_ARG_CORE} || ${_LUA_ARG_MODULE} LUA_DOCSUBDIR?=${PORTNAME} . endif . if !empty(LUA_DOCSUBDIR) LUA_DOCSDIR= ${LUA_MODDOCSDIR}/${LUA_DOCSUBDIR} LUA_EXAMPLESDIR=${LUA_MODEXAMPLESDIR}/${LUA_DOCSUBDIR} PLIST_SUB+= LUA_DOCSDIR=${LUA_DOCSDIR:S,^${LUA_PREFIX}/,,} PLIST_SUB+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR:S,^${LUA_PREFIX}/,,} MAKE_ENV+= LUA_DOCSDIR=${LUA_DOCSDIR} MAKE_ENV+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR} . endif . if empty(_LUA_ARG_ENV) . if ${lua_ARGS:Mbuild} BUILD_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} . endif . if ${lua_ARGS:Mrun} RUN_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} . endif . if !${lua_ARGS:Mbuild} && !${lua_ARGS:Mrun} LIB_DEPENDS+= liblua-${LUA_VER}.so:lang/lua${LUA_VER_STR} . endif . endif .endif diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index ed5a17e63431..162b056522f7 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -1,209 +1,209 @@ # MAINTAINER: ports@FreeBSD.org # # Note: before committing to this file, contact portmgr to arrange for an # experimental ports run. Untested commits may be backed out at portmgr's # discretion. # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.20 ruby=3.1 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local . for lang in APACHE BDB COROSYNC EBUR128 EMACS FIREBIRD FORTRAN FPC GCC \ GHOSTSCRIPT GL GO GUILE IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ LUA LUAJIT MONO MYSQL NINJA NODEJS OPENLDAP PERL5 PGSQL PHP \ PYCRYPTOGRAPHY PYTHON PYTHON2 RUBY RUST SAMBA SSL TCLTK VARNISH . if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" . endif #.undef ${lang}_DEFAULT . endfor . for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} . endfor # Possible values: 2.4 APACHE_DEFAULT?= 2.4 # Possible values: 5, 18 BDB_DEFAULT?= 5 # Possible values: 2, 3 COROSYNC_DEFAULT?= 3 # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) EBUR128_DEFAULT?= rust . else EBUR128_DEFAULT?= legacy . endif # Possible values: full canna nox wayland devel_full devel_nox (default: nox) #EMACS_DEFAULT?= nox # Possible values: 3.0, 4.0 . if ${ARCH} == powerpc64le FIREBIRD_DEFAULT?= 4.0 . else FIREBIRD_DEFAULT?= 3.0 . endif # Possible values: gfortran FORTRAN_DEFAULT?= gfortran # Possible values: 3.2.3, 3.3.1 . if (defined(WANT_FPC_DEVEL) && !empty(WANT_FPC_DEVEL)) || ${ARCH:Maarch64} || ${ARCH:Mpowerpc*} FPC_DEFAULT?= 3.3.1 . else FPC_DEFAULT?= 3.2.3 . endif # Possible values: 12, 13, 14, 15, 16, 17 # (Any other version is completely unsupported and not meant for general use.) GCC_DEFAULT?= 14 # Possible values: 10 GHOSTSCRIPT_DEFAULT?= 10 # Possible values: mesa-libs, mesa-devel GL_DEFAULT?= mesa-libs # Possible values: 1.24, 1.25, 1.26 GO_DEFAULT?= 1.25 # Possible values: 1.8, 2.2, 3.0 GUILE_DEFAULT?= 2.2 # Possible versions: 6, 7 # Possible flavors: x11, nox11 # (defaults to x11 when not specified) # Format: version[-flavor] # Examples: 6-nox11, 7 IMAGEMAGICK_DEFAULT?= 7 # Possible values: 8, 11, 17, 21, 24, 25 . if ${ARCH:Marmv*} || ${ARCH} == powerpc JAVA_DEFAULT?= 11 . elif ${ARCH:Mi386} JAVA_DEFAULT?= 21 . else JAVA_DEFAULT?= 25 . endif # Possible values: 4.6, 4.99 . if (defined(WANT_LAZARUS_DEVEL) && !empty(WANT_LAZARUS_DEVEL)) || ${ARCH:Maarch64} || ${ARCH:Mpowerpc*} LAZARUS_DEFAULT?= 4.99 . else LAZARUS_DEFAULT?= 4.6 . endif # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) LIBRSVG2_DEFAULT?= rust . else LIBRSVG2_DEFAULT?= legacy . endif # Possible values: c7 rl9 . if ${ARCH:Mi386} LINUX_DEFAULT?= c7 . else LINUX_DEFAULT?= rl9 . endif # Possible values: 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -devel (to be used when non-base compiler is required) LLVM_DEFAULT?= 19 -# Possible values: 5.1, 5.2, 5.3, 5.4 +# Possible values: 5.1, 5.2, 5.3, 5.4, 5.5 LUA_DEFAULT?= 5.4 # Possible values: luajit, luajit-openresty . if ${ARCH:Mpowerpc64*} LUAJIT_DEFAULT?= luajit-openresty . else LUAJIT_DEFAULT?= luajit . endif # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT?= 5.20 # Possible values: 8.0, 8.4, 9.6, 9.7, 10.6m, 10.11m, 11.4m, 11.8m MYSQL_DEFAULT?= 8.4 # Possible values: ninja, samurai NINJA_DEFAULT?= ninja # Possible value: 20, 22, 24, 25, 26, current, lts (Note: current = 26 and lts = 24) NODEJS_DEFAULT?= lts # Possible value: 25, 26 OPENLDAP_DEFAULT?= 26 # Possible values: 5.38, 5.40, 5.42, devel . if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) # When changing the default here, make sure the DEPRECATED/EXPIRATION lines in # the older Perl 5 ports are uncommented at the same time. PERL5_DEFAULT?= 5.42 . elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. . if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;' . endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} . endif # Possible values: 13, 14, 15, 16, 17, 18 PGSQL_DEFAULT?= 18 # Possible values: 8.2, 8.3, 8.4, 8.5 PHP_DEFAULT?= 8.4 # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) PYCRYPTOGRAPHY_DEFAULT?= rust . else PYCRYPTOGRAPHY_DEFAULT?= legacy . endif # Possible values: 3.10, 3.11, 3.12, 3.13, 3.13t, 3.14 PYTHON_DEFAULT?= 3.11 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.3, 3.4, 4.0 RUBY_DEFAULT?= 3.4 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust # Possible values: 4.16, 4.19, 4.20, 4.22, 4.23 SAMBA_DEFAULT?= 4.16 # When updating this, please also update the same list in ssl.mk and the checks # for USES=ssl in qa.sh! # Possible values: base, openssl, openssl34, openssl35, # openssl36, libressl, libressl-devel . if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. . if !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base . else . if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) . if defined(PKG_BIN) # find installed port and use it for dependency . if !defined(OPENSSL_INSTALLED) . if defined(DESTDIR) PKGARGS= -c ${DESTDIR} . else PKGARGS= . endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : . endif . if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" . endif . else check-makevars:: @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable" @${ECHO_MSG} "to determine what port it comes from." @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl= to your /etc/make.conf and try again." @${FALSE} . endif . endif . endif # Make sure we have a default in the end SSL_DEFAULT?= base . endif # Possible values: default, sssd SUDO_DEFAULT?= default # Possible values: 8.6, 9.0 TCLTK_DEFAULT?= 8.6 # Possible values: 6, 7 VARNISH_DEFAULT?= 6 .endif diff --git a/lang/Makefile b/lang/Makefile index 574cef288142..d2fb79408663 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -1,400 +1,401 @@ COMMENT = Programming languages SUBDIR += abcl SUBDIR += alchemist.el SUBDIR += algol68g SUBDIR += amber SUBDIR += angelscript SUBDIR += antimony SUBDIR += apache-commons-jelly SUBDIR += asm-lsp SUBDIR += asmc SUBDIR += asn1c SUBDIR += atlast SUBDIR += awka SUBDIR += babashka SUBDIR += bas2tap SUBDIR += basic256 SUBDIR += bend SUBDIR += bsh SUBDIR += bun SUBDIR += bwbasic SUBDIR += c SUBDIR += cairo SUBDIR += cbmbasic SUBDIR += cbqn SUBDIR += ccl SUBDIR += ceylon SUBDIR += cfortran SUBDIR += chaiscript SUBDIR += chez-scheme SUBDIR += chibi-scheme SUBDIR += chicken SUBDIR += cim SUBDIR += cjs SUBDIR += cling SUBDIR += clips SUBDIR += clisp SUBDIR += clojure SUBDIR += clojure-mode.el SUBDIR += clover SUBDIR += cocor SUBDIR += coffeescript SUBDIR += colm SUBDIR += cparser SUBDIR += crumb SUBDIR += crystal SUBDIR += csharp-mode.el SUBDIR += cython SUBDIR += cython0 SUBDIR += dhall SUBDIR += dlang-tools SUBDIR += dotnet SUBDIR += dotnet-devel SUBDIR += dotnet-host SUBDIR += dotnet8 SUBDIR += duktape SUBDIR += duktape-lib SUBDIR += ecl SUBDIR += eisl SUBDIR += elixir SUBDIR += elixir-devel SUBDIR += elixir-mode.el SUBDIR += elk SUBDIR += emacs-lisp-intro SUBDIR += emilua SUBDIR += erlang SUBDIR += erlang-doc SUBDIR += erlang-java SUBDIR += erlang-man SUBDIR += erlang-runtime27 SUBDIR += erlang-runtime28 SUBDIR += erlang-runtime29 SUBDIR += erlang-wx SUBDIR += execline SUBDIR += expect SUBDIR += f2c SUBDIR += fasm SUBDIR += fennel SUBDIR += ficl SUBDIR += fpc SUBDIR += fpc-devel SUBDIR += fpc-devel-source SUBDIR += fpc-docs SUBDIR += fpc-source SUBDIR += fsharp SUBDIR += fth SUBDIR += gambit-c SUBDIR += gauche SUBDIR += gawk SUBDIR += gcc SUBDIR += gcc12 SUBDIR += gcc12-devel SUBDIR += gcc13 SUBDIR += gcc13-devel SUBDIR += gcc14 SUBDIR += gcc14-devel SUBDIR += gcc15 SUBDIR += gcc15-devel SUBDIR += gcc16 SUBDIR += gcc16-devel SUBDIR += gcc17-devel SUBDIR += gcc6-aux SUBDIR += gforth SUBDIR += ghc SUBDIR += ghc96 SUBDIR += ghc98 SUBDIR += gir-to-d SUBDIR += gjs SUBDIR += gleam SUBDIR += gluon SUBDIR += gnat12 SUBDIR += gnat13 SUBDIR += gnat14 SUBDIR += gnatcross-binutils-aarch64 SUBDIR += gnatcross-sysroot-aarch64 SUBDIR += gnatdroid-binutils SUBDIR += gnatdroid-binutils-x86 SUBDIR += gnatdroid-sysroot SUBDIR += gnatdroid-sysroot-x86 SUBDIR += gnu-apl SUBDIR += gnu-cobol SUBDIR += gnustep-base SUBDIR += go SUBDIR += go125 SUBDIR += go126 SUBDIR += gomacro SUBDIR += gprolog SUBDIR += gptscript SUBDIR += gravity SUBDIR += groovy SUBDIR += gscheme SUBDIR += guile SUBDIR += guile-aclocal SUBDIR += guile1 SUBDIR += guile2 SUBDIR += guile3 SUBDIR += halide SUBDIR += harec SUBDIR += haskell-mode.el SUBDIR += hermes SUBDIR += hla SUBDIR += hs-brainfuck SUBDIR += hs-futhark SUBDIR += hs-koka SUBDIR += hs-unlambda SUBDIR += huc SUBDIR += inko SUBDIR += intel-compute-runtime SUBDIR += intercal SUBDIR += io SUBDIR += io-devel SUBDIR += itcl SUBDIR += itcl4 SUBDIR += janet SUBDIR += jimtcl SUBDIR += jpm SUBDIR += jruby SUBDIR += julia SUBDIR += jython SUBDIR += kawa SUBDIR += kefir SUBDIR += kf5-kross SUBDIR += kotlin SUBDIR += kotlin22 SUBDIR += kturtle SUBDIR += lafontaine SUBDIR += lci SUBDIR += ldc SUBDIR += lfe SUBDIR += lfortran SUBDIR += libhx SUBDIR += libobjc2 SUBDIR += librep SUBDIR += libstdc++_stldoc_4.2.2 SUBDIR += linux-c7-tcl85 SUBDIR += linux-j SUBDIR += linux-rl9-python3 SUBDIR += linux-rl9-tcl86 SUBDIR += lua51 SUBDIR += lua52 SUBDIR += lua53 SUBDIR += lua54 + SUBDIR += lua55 SUBDIR += luajit SUBDIR += luajit-openresty SUBDIR += malbolge SUBDIR += maude SUBDIR += mawk SUBDIR += mdk SUBDIR += mecrisp-stellaris SUBDIR += micropython SUBDIR += mit-scheme SUBDIR += mixal SUBDIR += mlkit SUBDIR += mlton SUBDIR += mmix SUBDIR += mono SUBDIR += mono-basic SUBDIR += mono5.10 SUBDIR += mono5.20 SUBDIR += mono6.8 SUBDIR += mosh SUBDIR += mosml SUBDIR += mtasc SUBDIR += mujs SUBDIR += munger SUBDIR += myrddin SUBDIR += nawk SUBDIR += nbfc SUBDIR += neocmakelsp SUBDIR += nesasm SUBDIR += newlisp SUBDIR += nickel SUBDIR += nickle SUBDIR += nim SUBDIR += njs SUBDIR += nll SUBDIR += nqc SUBDIR += numbat SUBDIR += nwcc SUBDIR += nx SUBDIR += nyan SUBDIR += ocaml SUBDIR += ocaml-autoconf SUBDIR += ocaml-camlidl SUBDIR += odin SUBDIR += oo2c SUBDIR += opencoarrays SUBDIR += opensycl SUBDIR += ott SUBDIR += owl-lisp SUBDIR += p5-Data-JavaScript SUBDIR += p5-Error SUBDIR += p5-Expect SUBDIR += p5-ExtUtils-F77 SUBDIR += p5-Interpolation SUBDIR += p5-JSAN SUBDIR += p5-JavaScript-QuickJS SUBDIR += p5-JavaScript-Squish SUBDIR += p5-JavaScript-Value-Escape SUBDIR += p5-List-MoreUtils SUBDIR += p5-List-MoreUtils-XS SUBDIR += p5-Marpa SUBDIR += p5-Marpa-PP SUBDIR += p5-Marpa-XS SUBDIR += p5-Modern-Perl SUBDIR += p5-Perl6-Subs SUBDIR += p5-Promises SUBDIR += p5-Pugs-Compiler-Rule SUBDIR += p5-Quantum-Superpositions SUBDIR += p5-Scalar-List-Utils SUBDIR += p5-Switch SUBDIR += p5-Tcl SUBDIR += p5-Test-XPath SUBDIR += p5-Try-Catch SUBDIR += p5-Try-Tiny SUBDIR += p5-Try-Tiny-Retry SUBDIR += p5-TryCatch SUBDIR += p5-ePerl SUBDIR += p5-signatures SUBDIR += p5-v6 SUBDIR += pbasic SUBDIR += pcc SUBDIR += perl5-devel SUBDIR += perl5.38 SUBDIR += perl5.40 SUBDIR += perl5.42 SUBDIR += petite-chez SUBDIR += pfe SUBDIR += pharo SUBDIR += php-mode.el SUBDIR += php82 SUBDIR += php82-extensions SUBDIR += php83 SUBDIR += php83-extensions SUBDIR += php84 SUBDIR += php84-extensions SUBDIR += php85 SUBDIR += php85-extensions SUBDIR += picoc SUBDIR += picolisp SUBDIR += pkl SUBDIR += plexil SUBDIR += pocl SUBDIR += polyml SUBDIR += pomsky SUBDIR += prql SUBDIR += ptoc SUBDIR += purescript SUBDIR += py-dhall SUBDIR += py-gherkin-official SUBDIR += py-hy SUBDIR += py-lupa SUBDIR += py-sly SUBDIR += py-textX SUBDIR += python SUBDIR += python-doc-html SUBDIR += python-doc-text SUBDIR += python-mode.el SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 SUBDIR += python3 SUBDIR += python310 SUBDIR += python311 SUBDIR += python312 SUBDIR += python313 SUBDIR += python313t SUBDIR += python314 SUBDIR += python315 SUBDIR += qmasm SUBDIR += quickjs SUBDIR += quickjs-ng SUBDIR += quilc SUBDIR += racket SUBDIR += racket-minimal SUBDIR += ratfor SUBDIR += referenceassemblies-pcl SUBDIR += retro12 SUBDIR += rexx-imc SUBDIR += rexx-regina SUBDIR += rexx-regutil SUBDIR += rexx-wrapper SUBDIR += rhino SUBDIR += rizin SUBDIR += rizin-cutter SUBDIR += ruby33 SUBDIR += ruby34 SUBDIR += ruby40 SUBDIR += rubygem-rb_sys SUBDIR += rubygem-ruby_language_server SUBDIR += runawk SUBDIR += rust SUBDIR += rust-bootstrap SUBDIR += rust-nightly SUBDIR += rust188 SUBDIR += rustpython SUBDIR += s7 SUBDIR += s7-nrepl SUBDIR += sagittarius-scheme SUBDIR += sather-specification SUBDIR += sather-tutorial SUBDIR += sbcl SUBDIR += scala SUBDIR += scheme48 SUBDIR += scm SUBDIR += scratch SUBDIR += scryer-prolog SUBDIR += sdcc SUBDIR += see SUBDIR += seed7 SUBDIR += silq SUBDIR += siod SUBDIR += sisc SUBDIR += sketchy SUBDIR += slib SUBDIR += slib-guile SUBDIR += slisp SUBDIR += smalltalk SUBDIR += smlnj SUBDIR += snobol4 SUBDIR += solidity SUBDIR += spidermonkey115 SUBDIR += spidermonkey128 SUBDIR += spidermonkey140 SUBDIR += squeak SUBDIR += squirrel SUBDIR += starlark-rust SUBDIR += swift510 SUBDIR += swipl SUBDIR += tauthon SUBDIR += tcbasic SUBDIR += tcc SUBDIR += tcl-manual SUBDIR += tcl-wrapper SUBDIR += tcl86 SUBDIR += tcl90 SUBDIR += tclX SUBDIR += tolua SUBDIR += tolua++ SUBDIR += trealla-prolog SUBDIR += tuareg-mode.el SUBDIR += typescript-go SUBDIR += typstyle SUBDIR += ucc SUBDIR += urweb SUBDIR += v SUBDIR += v8 SUBDIR += v8-beta SUBDIR += vala SUBDIR += voc SUBDIR += yabasic SUBDIR += yap SUBDIR += yorick SUBDIR += ypsilon SUBDIR += zephir SUBDIR += zig SUBDIR += zig014 SUBDIR += zig015 .include diff --git a/lang/lua55/Makefile b/lang/lua55/Makefile index 80142d88b858..271eb1477e3c 100644 --- a/lang/lua55/Makefile +++ b/lang/lua55/Makefile @@ -1,144 +1,145 @@ PORTNAME= lua -DISTVERSION= 5.4.8 +DISTVERSION= 5.5.0 CATEGORIES= lang MASTER_SITES= https://www.lua.org/ftp/ PKGNAMESUFFIX= ${LUA_VER_STR} -MAINTAINER= andrew@tao11.riddles.org.uk +MAINTAINER= tagattie@FreeBSD.org COMMENT= Powerful, efficient, lightweight, embeddable scripting language WWW= https://www.lua.org/ LICENSE= MIT -USES= cpe lua:core,54 +USES= cpe lua:core,55 USE_LDCONFIG= yes # using the "bsd" target rather than "freebsd" saves patching out the # assumption of using base libedit in order to make it configurable. "bsd" # is "generic" plus the POSIX and DLOPEN options, plus -Wl,-E at link time; # it doesn't set CC either, which makes it easier for us to control that too. -ALL_TARGET=bsd +ALL_TARGET= bsd LUA_LIB_STATIC= liblua-${LUA_VER}.a LUA_LIB_SHARED= liblua-${LUA_VER}.so LUA_PC_FILE= lua-${LUA_VER}.pc CFLAGS+= -fPIC # 2019-01-25: -pthread in LIBS is a work around for the following bug: # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235211 LIBS+= -pthread -WITHOUT_NO_STRICT_ALIASING=yes +WITHOUT_NO_STRICT_ALIASING= yes MAKE_ARGS+= CC="${CC}" \ CMCFLAGS="" \ MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \ MYLDFLAGS="${LDFLAGS}" \ MYLIBS="${LIBS}" \ LUA_T=${LUA_CMD} \ LUAC_T=${LUAC_CMD} \ LUA_A=${LUA_LIB_STATIC} \ LUA_SO=${LUA_LIB_SHARED} \ LUA_SONAME=${LUA_LIB_SHARED} \ TO_BIN="${LUA_CMD} ${LUAC_CMD}" \ TO_LIB="${LUA_LIB_SHARED} ${LUA_LIB_STATIC}" \ INSTALL_TOP=${STAGEDIR}${PREFIX} \ INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \ INSTALL_EXEC="${INSTALL_PROGRAM}" # Source, destination, and filenames to copy for the DOCS option # (automatically added to pkg-plist if DOCS is set) # We override DOCSDIR to get a per-version subdir. # We put the docs for Lua proper in a lua/ subdir of the version subdir # so that ports for Lua modules can use the version subdir too without # making a mess. DOCSDIR= ${LUA_DOCSDIR} BUILD_WRKDOC= ${WRKSRC}/doc SUB_FILES= ${LUA_PC_FILE} SUB_LIST= version=${PORTVERSION} \ includedir=${LUA_INCDIR} \ libdir=${LUA_LIBDIR} \ soname=lua-${LUA_VER} BUILD_WRKSRC= ${WRKSRC}/src PORTDOCS= * # Options OPTIONS_DEFAULT= LIBEDIT_DL OPTIONS_GROUP= DOCSGRP DEBUGGRP OPTIONS_GROUP_DEBUGGRP= ASSERT APICHECK OPTIONS_GROUP_DOCSGRP= DOCS OPTIONS_SINGLE= EDITGRP -OPTIONS_SINGLE_EDITGRP= EDITNONE LIBEDIT_DL LIBEDIT READLINE +OPTIONS_SINGLE_EDITGRP= EDITNONE LIBEDIT LIBEDIT_DL READLINE READLINE_DL # Option descriptions APICHECK_DESC= Enable API checks ASSERT_DESC= Enable interpreter assertions DEBUGGRP_DESC= Debugging options DOCSGRP_DESC= Documentation options DOCS_DESC= Install language and API reference (HTML, ~400kB) -EDITGRP_DESC= Interactive command-line editing -EDITNONE_DESC= No command-line editing -LIBEDIT_DESC= Use libedit (breaks lcurses) -LIBEDIT_DL_DESC=Use dynamically loaded libedit (recommended) -READLINE_DESC= Use GNU Readline (breaks lcurses) +EDITGRP_DESC= Interactive command-line editing +EDITNONE_DESC= No command-line editing +LIBEDIT_DESC= Use libedit (breaks lcurses) +LIBEDIT_DL_DESC= Use dynamically loaded libedit (recommended) +READLINE_DESC= Use GNU Readline (breaks lcurses) +READLINE_DL_DESC= Use dynamically loaded GNU readline # Option implementations APICHECK_CPPFLAGS= -DLUA_USE_APICHECK ASSERT_CPPFLAGS= -DLUAI_ASSERT # EDITNONE currently requires no settings LIBEDIT_USES= libedit LIBEDIT_CPPFLAGS= -DLUA_USE_READLINE LIBEDIT_LIBS= -ledit LIBEDIT_DL_USES= libedit -LIBEDIT_DL_CPPFLAGS= -DLUA_USE_READLINE_DL -LIBEDIT_DL_EXTRA_PATCHES=${PATCHDIR}/extra-patch-libedit-dl +LIBEDIT_DL_CPPFLAGS= -DLUA_USE_DLOPEN \ + -DLUA_READLINELIB='\"${LOCALBASE}/lib/libedit.so\"' +LIBEDIT_DL_EXTRA_PATCHES=${PATCHDIR}/extra-patch-dlopen READLINE_USES= readline READLINE_CPPFLAGS= -DLUA_USE_READLINE READLINE_LIBS= -lreadline +READLINE_DL_USES= readline +READLINE_DL_CPPFLAGS= -DLUA_USE_DLOPEN \ + -DLUA_READLINELIB='\"${LOCALBASE}/lib/libreadline.so\"' + # end of option vars post-patch: @${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \ ${WRKSRC}/src/luaconf.h @${REINPLACE_CMD} -e "s|man/man|share/man/man|g" \ ${WRKSRC}/Makefile post-patch-LIBEDIT-on: @${REINPLACE_CMD} -e "s,readline/,editline/,g ; \ /history\.h/d" ${WRKSRC}/src/lua.c -post-patch-LIBEDIT_DL-on: - @${REINPLACE_CMD} \ - -e "/^#def.*LUA_READLINE_LIBPATH/s,/usr/local,${LOCALBASE}," \ - ${WRKSRC}/src/lua.c - post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${LUA_LIB_SHARED} ${MV} ${STAGEDIR}${PREFIX}/share/man/man1/lua.1 \ ${STAGEDIR}${PREFIX}/share/man/man1/${LUA_CMD}.1 ${MV} ${STAGEDIR}${PREFIX}/share/man/man1/luac.1 \ ${STAGEDIR}${PREFIX}/share/man/man1/${LUAC_CMD}.1 ${INSTALL_DATA} ${WRKDIR}/${LUA_PC_FILE} \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${BUILD_WRKDOC} && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} '-not -name *\.1') .include diff --git a/lang/lua55/distinfo b/lang/lua55/distinfo index 21fa1f581472..3413a4a73796 100644 --- a/lang/lua55/distinfo +++ b/lang/lua55/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1751702639 -SHA256 (lua-5.4.8.tar.gz) = 4f18ddae154e793e46eeab727c59ef1c0c0c2b744e7b94219710d76f530629ae -SIZE (lua-5.4.8.tar.gz) = 374332 +TIMESTAMP = 1778587320 +SHA256 (lua-5.5.0.tar.gz) = 57ccc32bbbd005cab75bcc52444052535af691789dba2b9016d5c50640d68b3d +SIZE (lua-5.5.0.tar.gz) = 396950 diff --git a/lang/lua55/files/extra-patch-dlopen b/lang/lua55/files/extra-patch-dlopen new file mode 100644 index 000000000000..edfbfce1e868 --- /dev/null +++ b/lang/lua55/files/extra-patch-dlopen @@ -0,0 +1,42 @@ +--- src/lua.c.orig 2025-12-15 10:44:40 UTC ++++ src/lua.c +@@ -498,18 +498,30 @@ static void lua_initreadline (lua_State *L) { + #include + + static void lua_initreadline (lua_State *L) { ++ union { ++ void *ptr; ++ l_readlineT rlfunc; ++ l_addhistT ahfunc; ++ char **rlnamevar; ++ int *icompvar; ++ } u; ++ + void *lib = dlopen(LUA_READLINELIB, RTLD_NOW | RTLD_LOCAL); +- if (lib == NULL) ++ if (lib == NULL) { + lua_warning(L, "library '" LUA_READLINELIB "' not found", 0); +- else { +- const char **name = cast(const char**, dlsym(lib, "rl_readline_name")); +- if (name != NULL) +- *name = "lua"; +- l_readline = cast(l_readlineT, cast_func(dlsym(lib, "readline"))); +- l_addhist = cast(l_addhistT, cast_func(dlsym(lib, "add_history"))); +- if (l_readline == NULL) +- lua_warning(L, "unable to load 'readline'", 0); ++ return; + } ++ ++ u.ptr = dlsym(lib, "readline"); ++ l_readline = u.rlfunc; ++ u.ptr = dlsym(lib, "add_history"); ++ l_addhist = u.ahfunc; ++ if ((u.ptr = dlsym(lib, "rl_readline_name"))) ++ *u.rlnamevar = "lua"; ++ if ((u.ptr = dlsym(lib, "rl_inhibit_completion"))) ++ *u.icompvar = 1; ++ if (l_readline == NULL) ++ lua_warning(L, "unable to load 'readline' from dynamic library", 0); + } + + #else /* }{ */ diff --git a/lang/lua55/files/extra-patch-libedit-dl b/lang/lua55/files/extra-patch-libedit-dl deleted file mode 100644 index ef0fe4390c9d..000000000000 --- a/lang/lua55/files/extra-patch-libedit-dl +++ /dev/null @@ -1,58 +0,0 @@ ---- src/lua.c.orig 2018-03-16 14:23:08 UTC -+++ src/lua.c -@@ -379,7 +379,54 @@ static int handle_luainit (lua_State *L) - */ - #if !defined(lua_readline) /* { */ - --#if defined(LUA_USE_READLINE) /* { */ -+#if defined(LUA_USE_READLINE_DL)/* { */ -+ -+#include -+ -+#ifndef LUA_READLINE_LIBPATH -+#define LUA_READLINE_LIBPATH "/usr/local/lib/libedit.so" -+#endif -+ -+typedef char *readline_functype(const char *); -+typedef int add_history_functype(const char *); -+ -+static readline_functype *lua_readline_p = NULL; -+static add_history_functype *lua_saveline_p = NULL; -+ -+static void lua_initreadline(lua_State *L) -+{ -+ void *editlib = NULL; -+ union dl_func_hack { -+ void *ptr; -+ readline_functype *rlfunc; -+ add_history_functype *ahfunc; -+ char **rlnamevar; -+ int *icompvar; -+ } u; -+ (void) L; -+ if ((editlib = dlopen(LUA_READLINE_LIBPATH, RTLD_LAZY | RTLD_LOCAL))) { -+ u.ptr = dlsym(editlib, "readline"); -+ lua_readline_p = u.rlfunc; -+ u.ptr = dlsym(editlib, "add_history"); -+ lua_saveline_p = u.ahfunc; -+ if ((u.ptr = dlsym(editlib, "rl_readline_name"))) -+ *u.rlnamevar = "lua"; -+ if ((u.ptr = dlsym(editlib, "rl_inhibit_completion"))) -+ *u.icompvar = 1; -+ } -+} -+ -+#define lua_readline(L,b,p) \ -+ ((void)L, \ -+ (lua_readline_p) \ -+ ? (((b)=lua_readline_p(p)) != NULL) \ -+ : (fputs(p, stdout), fflush(stdout), fgets(b, LUA_MAXINPUT, stdin) != NULL)) -+#define lua_saveline(L,line) \ -+ do { (void)L; if (lua_saveline_p) lua_saveline_p(line); } while(0) -+#define lua_freeline(L,b) \ -+ do { (void)L; if (lua_readline_p) free(b); } while(0) -+ -+#elif defined(LUA_USE_READLINE) /* { */ - - #include - #include diff --git a/lang/lua55/files/lua-5.4.pc.in b/lang/lua55/files/lua-5.5.pc.in similarity index 100% rename from lang/lua55/files/lua-5.4.pc.in rename to lang/lua55/files/lua-5.5.pc.in diff --git a/lang/lua55/files/patch-src_Makefile b/lang/lua55/files/patch-src_Makefile index 1d52c4a01aa7..35648f909c77 100644 --- a/lang/lua55/files/patch-src_Makefile +++ b/lang/lua55/files/patch-src_Makefile @@ -1,45 +1,45 @@ ---- src/Makefile.orig 2020-04-15 13:00:29 UTC +--- src/Makefile.orig 2025-07-07 00:19:14 UTC +++ src/Makefile -@@ -7,11 +7,12 @@ +@@ -7,11 +7,12 @@ CC= gcc -std=gnu99 PLAT= guess CC= gcc -std=gnu99 --CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS) -+CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS) +-CFLAGS= -O2 -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS) ++CFLAGS= -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS) LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) LIBS= -lm $(SYSLIBS) $(MYLIBS) +SOLIBS= -lm -AR= ar rcu +AR= ar RANLIB= ranlib RM= rm -f UNAME= uname -@@ -39,12 +40,13 @@ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -39,12 +40,13 @@ LUA_O= lua.o LUA_T= lua LUA_O= lua.o +LUA_SO= liblua.so LUAC_T= luac LUAC_O= luac.o ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) ALL_A= $(LUA_A) # Targets start here. -@@ -56,8 +58,11 @@ o: $(ALL_O) +@@ -56,8 +58,11 @@ a: $(ALL_A) a: $(ALL_A) +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $? $(SOLIBS) + $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) + $(AR) $(ARFLAGS) $@ $(BASE_O) $(RANLIB) $@ $(LUA_T): $(LUA_O) $(LUA_A)