diff options
author | nia <nia@pkgsrc.org> | 2020-07-11 15:14:29 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-07-11 15:14:29 +0000 |
commit | b8d59e43d438eaf408e08948140b93e013f2ec3d (patch) | |
tree | 9b22b9d284dec844047099206933d00679b33402 /lang | |
parent | 86f2d98a8e5e8aa285343909a3a7fd0d1eb64cf0 (diff) | |
download | pkgsrc-b8d59e43d438eaf408e08948140b93e013f2ec3d.tar.gz |
Add LUA_LINKER_MAGIC variable that centrally sets LDFLAGS on Darwin,
as should probably have been done to begin with. Remove per-package hacks.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/lua/module.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lang/lua/module.mk b/lang/lua/module.mk index 0b52994006a..0399357dc42 100644 --- a/lang/lua/module.mk +++ b/lang/lua/module.mk @@ -1,8 +1,20 @@ -# $NetBSD: module.mk,v 1.8 2020/07/09 15:01:53 nia Exp $ +# $NetBSD: module.mk,v 1.9 2020/07/11 15:14:30 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 +# # === Defined variables === # # LUA_LDIR @@ -56,6 +68,11 @@ PRINT_PLIST_AWK+= /^${LUA_DOCDIR:S|/|\\/|g}/ \ LUA_EXAMPLESDIR= share/examples/${PKGBASE} PLIST_SUBST+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR} +LUA_LINKER_MAGIC?= yes + +.if !empty(LUA_LINKER_MAGIC:M[yY][eE][sS]) LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} +LDFLAGS.Darwin+= -bundle -undefined dynamic_lookup +.endif .endif # LUA_MODULE_MK |