head 1.14; access; symbols pkgsrc-2023Q4:1.14.0.16 pkgsrc-2023Q4-base:1.14 pkgsrc-2023Q3:1.14.0.14 pkgsrc-2023Q3-base:1.14 pkgsrc-2023Q2:1.14.0.12 pkgsrc-2023Q2-base:1.14 pkgsrc-2023Q1:1.14.0.10 pkgsrc-2023Q1-base:1.14 pkgsrc-2022Q4:1.14.0.8 pkgsrc-2022Q4-base:1.14 pkgsrc-2022Q3:1.14.0.6 pkgsrc-2022Q3-base:1.14 pkgsrc-2022Q2:1.14.0.4 pkgsrc-2022Q2-base:1.14 pkgsrc-2022Q1:1.14.0.2 pkgsrc-2022Q1-base:1.14 pkgsrc-2021Q4:1.12.0.2 pkgsrc-2021Q4-base:1.12 pkgsrc-2021Q3:1.11.0.10 pkgsrc-2021Q3-base:1.11 pkgsrc-2021Q2:1.11.0.8 pkgsrc-2021Q2-base:1.11 pkgsrc-2021Q1:1.11.0.6 pkgsrc-2021Q1-base:1.11 pkgsrc-2020Q4:1.11.0.4 pkgsrc-2020Q4-base:1.11 pkgsrc-2020Q3:1.11.0.2 pkgsrc-2020Q3-base:1.11 pkgsrc-2020Q2:1.7.0.42 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.22 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.44 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.40 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.38 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.36 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.34 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.32 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.30 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.28 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.26 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.24 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.20 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.18 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.16 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.14 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.12 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.10 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.8 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.6 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.4 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.2 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.6.0.6 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.4 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.2 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.5.0.4 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.2 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.4.0.2 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.3.0.34 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.32 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.30 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.28 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.26 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.24 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.22 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.20 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.18 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.16 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.14 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.12 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.10 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.8 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.6 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.4 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.2 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.2.0.2 pkgsrc-2009Q1-base:1.2; locks; strict; comment @# @; 1.14 date 2022.03.06.09.13.44; author nia; state Exp; branches; next 1.13; commitid gQZVzUXttfudv8vD; 1.13 date 2022.02.19.20.39.58; author nia; state Exp; branches; next 1.12; commitid p8OUlM85d5usMgtD; 1.12 date 2021.12.06.18.54.32; author nia; state Exp; branches; next 1.11; commitid eTC09xMG6rS5BCjD; 1.11 date 2020.07.11.15.33.51; author nia; state Exp; branches; next 1.10; commitid lIl2aVA0FFnoZFfC; 1.10 date 2020.07.11.15.30.52; author nia; state Exp; branches; next 1.9; commitid WhpApHdDFKdnYFfC; 1.9 date 2020.07.11.15.14.30; author nia; state Exp; branches; next 1.8; commitid 2zwGHGh2ePKsSFfC; 1.8 date 2020.07.09.15.01.53; author nia; state Exp; branches; next 1.7; commitid 0gDIDF9H3p0qSpfC; 1.7 date 2015.03.05.14.15.45; author ryoon; state Exp; branches; next 1.6; commitid eoF8WtJKAhmAoqcy; 1.6 date 2014.05.03.13.00.44; author alnsn; state Exp; branches; next 1.5; commitid m7sx7w5jPd4DO5zx; 1.5 date 2013.10.30.06.18.09; author dholland; state Exp; branches; next 1.4; commitid hUvNwQ9eb8Zothbx; 1.4 date 2013.09.17.12.03.09; author joerg; state Exp; branches; next 1.3; commitid kATW24w8Cu3oPM5x; 1.3 date 2009.06.14.22.58.02; author joerg; state Exp; branches; next 1.2; 1.2 date 2009.01.24.02.56.19; author obache; state Exp; branches; next 1.1; 1.1 date 2009.01.11.23.15.55; author minskim; state Exp; branches; next ; desc @@ 1.14 log @lua/module.mk: Allow passing arguments to busted @ text @# $NetBSD: module.mk,v 1.13 2022/02/19 20:39:58 nia Exp $ # # This Makefile fragment is intended to be included by packages that # install Lua modules. # # === Package-settable variables === # # LUA_LINKER_MAGIC # This appends LDFLAGS to properly link Lua modules on non-ELF # linkers. # # You probably want to set this to "no" if the package links # binaries that are not Lua modules. # # Possible values: yes no # Default: yes # # LUA_USE_BUSTED # Use busted to run tests and provide a do-test target. # # Possible values: yes no # Default: no # # LUA_BUSTED_ARGS # Arguments to pass to the busted command when LUA_USE_BUSTED. # # === Defined variables === # # LUA_LDIR # Path where Lua modules are installed. # # LUA_CDIR # Path where Lua C modules are installed. Not defined if # NO_BUILD variable is set to "yes". # # LUA_DOCDIR # Path where documentation files are installed. # # LUA_EXAMPLESDIR # Path where example files are installed. # # Keywords: lua # .if !defined(LUA_MODULE_MK) LUA_MODULE_MK= # defined .if !defined(LUA_LUAVERSION_MK) .include "../../lang/lua/luaversion.mk" .endif LUA_LDIR= share/lua/${_LUA_DOT_VERSION} PLIST_SUBST+= LUA_LDIR=${LUA_LDIR} PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \ { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") } .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) DEPENDS+= ${LUA_BASEDEPENDS} .else LUA_CDIR= lib/lua/${_LUA_DOT_VERSION} PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} PRINT_PLIST_AWK+= /^${LUA_CDIR:S|/|\\/|g}/ \ { gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") } .include "${LUA_PKGSRCDIR}/buildlink3.mk" .endif LUA_DOCDIR= share/doc/${PKGBASE} PLIST_SUBST+= LUA_DOCDIR=${LUA_DOCDIR} PRINT_PLIST_AWK+= /^${LUA_DOCDIR:S|/|\\/|g}/ \ { gsub(/${LUA_DOCDIR:S|/|\\/|g}/, "$${LUA_DOCDIR}") } LUA_EXAMPLESDIR= share/examples/${PKGBASE} PLIST_SUBST+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR} LUA_LINKER_MAGIC?= yes .if !empty(LUA_LINKER_MAGIC:M[yY][eE][sS]) BUILDLINK_TRANSFORM.Darwin+= rm:-shared LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} LDFLAGS.Darwin+= -bundle -undefined dynamic_lookup .endif .if ${_LUA_VERSION} != "51" && ${_LUA_VERSION} != "52" # Any Lua>=5.3 module using these flags is invalid, # since Lua 5.3 and newer require "long long". BUILDLINK_TRANSFORM+= rm:-ansi BUILDLINK_TRANSFORM+= rm:-std=c89 BUILDLINK_TRANSFORM+= rm:-std=c90 .endif LUA_USE_BUSTED?= no .if !empty(LUA_USE_BUSTED:M[yY][eE][sS]) TEST_DEPENDS+= ${LUA_PKGPREFIX}-busted-[0-9]*:../../devel/lua-busted do-test: cd ${WRKSRC} && ${TEST_ENV} \ ${PREFIX}/bin/busted${_LUA_DOT_VERSION} \ ${LUA_BUSTED_ARGS} .endif # LUA_USE_BUSTED .endif # LUA_MODULE_MK @ 1.13 log @lua: Add support for running tests with busted to module.mk @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.12 2021/12/06 18:54:32 nia Exp $ d22 4 a25 1 # Default: yes d96 2 d102 3 a104 1 cd ${WRKSRC} && ${PREFIX}/bin/busted${_LUA_DOT_VERSION} @ 1.12 log @For Lua modules, strip out the -shared compiler argument on Darwin. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.11 2020/07/11 15:33:51 nia Exp $ d18 6 d93 8 a100 1 .endif # LUA_MODULE_MK @ 1.11 log @lang/module.mk: using rm: is probably more portable here @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.10 2020/07/11 15:30:52 nia Exp $ d74 3 a76 2 LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} LDFLAGS.Darwin+= -bundle -undefined dynamic_lookup @ 1.10 log @lua/module.mk: Avoid compiling Lua 5.3 modules with -ansi @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.9 2020/07/11 15:14:30 nia Exp $ d81 3 a83 3 BUILDLINK_TRANSFORM+= opt:-ansi:-std=c99 BUILDLINK_TRANSFORM+= opt:-std=c89:-std=c99 BUILDLINK_TRANSFORM+= opt:-std=c90:-std=c99 @ 1.9 log @Add LUA_LINKER_MAGIC variable that centrally sets LDFLAGS on Darwin, as should probably have been done to begin with. Remove per-package hacks. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.8 2020/07/09 15:01:53 nia Exp $ d78 8 @ 1.8 log @lua: Add PLIST_AWK for LUA_DOCDIR @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.7 2015/03/05 14:15:45 ryoon Exp $ d6 12 d71 3 d75 2 @ 1.7 log @-llua* is required for Cygwin build. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.6 2014/05/03 13:00:44 alnsn Exp $ d53 3 @ 1.6 log @Multiversion support for Lua. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.5 2013/10/30 06:18:09 dholland Exp $ d56 2 @ 1.5 log @Reimport lang/lua as lang/lua52, and bring back the previous Lua 5.1 package as lang/lua51. I've adjusted the depends and switched the PKGNAMEs but these packages are otherwise unchanged. This means that you can't install both at once. There are preliminary patches for that (see tech-pkg) but they aren't quite ready yet. This also doesn't include agc's builtin.mk, although it should be possible to drop it into the lua51 package with only very minor modifications. I don't think the builtin packages will allow having one builtin.mk for both lua51 and lua52, but I'd be happy to be shown wrong about that. Add infrastructure support for Lua module packages (including multiversion support), application packages written in Lua, and a redirecting bl3.mk file for packages that just link Lua in. This is based on the Python infrastructure. The new variable LUA_VERSION_DEFAULT picks which Lua package you get by default; it is set to 52 so as to maintain the status quo. Packages can set LUA_VERSIONS_ACCEPTED and/or LUA_VERSIONS_INCOMPATIBLE. I have found (I think) most or all the packages that don't work with lua51 and will be marking those; I have not tracked down most of the ones that don't work with lua52 yet as I was originally intending to roll back to 5.1 as the default. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.4 2013/09/17 12:03:09 joerg Exp $ d4 19 a22 1 # install Lua packages. d27 1 d29 1 d34 3 a43 2 PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \ { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") } d50 6 @ 1.4 log @print-PLIST support for LUA_LDIR/LUA_CDIR. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.3 2009/06/14 22:58:02 joerg Exp $ d9 1 a9 1 .include "../../lang/lua/version.mk" d11 1 a11 4 _LUA_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} LUA_PKGPREFIX= lua LUA_LDIR= share/lua/${_LUA_VERSION} d15 2 a16 1 DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua d18 1 a18 1 LUA_CDIR= lib/lua/${_LUA_VERSION} d26 1 a26 3 BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* .include "../../lang/lua/buildlink3.mk" @ 1.3 log @Remove @@dirrm related logic. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.2 2009/01/24 02:56:19 obache Exp $ d23 5 @ 1.2 log @Add to PRINT_PLIST_AWK for LUA_LDIR and LUA_CDIR. @ text @d1 1 a1 1 # $NetBSD: module.mk,v 1.1 2009/01/11 23:15:55 minskim Exp $ a16 5 PRINT_PLIST_AWK+= /^@@dirrm share\/lua$$/ { next; } PRINT_PLIST_AWK+= /^@@dirrm ${LUA_LDIR:S|/|\\/|g}$$/ { next; } PRINT_PLIST_AWK+= /^(@@dirrm )?${LUA_LDIR:S|/|\\/|g}/ \ { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}"); print; next; } a24 5 PRINT_PLIST_AWK+= /^@@dirrm lib\/lua$$/ { next; } PRINT_PLIST_AWK+= /^@@dirrm ${LUA_CDIR:S|/|\\/|g}$$/ { next; } PRINT_PLIST_AWK+= /^(@@dirrm )?${LUA_CDIR:S|/|\\/|g}/ \ { gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}"); print; next; } @ 1.1 log @Add module.mk for Lua packages. Suggested by Aleksey Cheusov on pkgsrc-users@@. @ text @d1 1 a1 1 # $NetBSD$ d17 5 d30 5 @