public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 3/3] lua-utils.eclass: Add lua_get_static_lib()
Date: Mon, 12 Oct 2020 17:39:56 +0200	[thread overview]
Message-ID: <b2a7d17f84eb40695f290ea507962f42057781b6.camel@gentoo.org> (raw)
In-Reply-To: <20201012140534.113655-4-marecki@gentoo.org>

On Mon, 2020-10-12 at 16:05 +0200, Marek Szuba wrote:
> For build systems which must be pointed directly to the relevant
> files,
> e.g. CMake.
> 
> Signed-off-by: Marek Szuba <marecki@gentoo.org>
> ---
>  eclass/lua-utils.eclass | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
> index 100be14cb08..922f72b80d6 100644
> --- a/eclass/lua-utils.eclass
> +++ b/eclass/lua-utils.eclass
> @@ -329,6 +329,11 @@ _lua_export() {
>  				export LUA_SHARED_LIB="${val}".so
>  				debug-print "${FUNCNAME}:
> LUA_SHARED_LIB = ${LUA_SHARED_LIB}"
>  				;;
> +			LUA_STATIC_LIB)
> +				local val=$(_lua_get_library_file
> ${impl})
> +				export LUA_STATIC_LIB="${val}".a
> +				debug-print "${FUNCNAME}:
> LUA_STATIC_LIB = ${LUA_STATIC_LIB}"
> +				;;
>  			LUA_VERSION)
>  				local val
>  
> @@ -443,6 +448,25 @@ lua_get_shared_lib() {
>  	echo "${LUA_SHARED_LIB}"
>  }
>  
> +# @FUNCTION: lua_get_static_lib
> +# @USAGE: [<impl>]
> +# @DESCRIPTION:
> +# Obtain and print the expected name, with path, of the main static
> library
> +# of the given Lua implementation. If no implementation is provided,
> +# ${ELUA} will be used.
> +#
> +# Note that it is up to the ebuild maintainer to ensure Lua actually
> +# provides a static library.
> +#
> +# Please note that this function requires Lua and pkg-config
> installed,
> +# and therefore proper build-time dependencies need be added to the
> ebuild.
> +lua_get_static_lib() {
> +	debug-print-function ${FUNCNAME} "${@}"
> +
> +	_lua_export "${@}" LUA_STATIC_LIB
> +	echo "${LUA_STATIC_LIB}"
> +}
> +
>  # @FUNCTION: lua_get_version
>  # @USAGE: [<impl>]
>  # @DESCRIPTION:

When is passing static libs ever useful for Lua?



  reply	other threads:[~2020-10-12 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 14:05 [gentoo-dev] [PATCH 0/3] lua-utils.eclass: expose header and library locations Marek Szuba
2020-10-12 14:05 ` [gentoo-dev] [PATCH 1/3] lua-utils.eclass: Add lua_get_include_dir() Marek Szuba
2020-10-12 14:05 ` [gentoo-dev] [PATCH 2/3] lua-utils.eclass: Add lua_get_shared_lib() Marek Szuba
2020-10-12 14:05 ` [gentoo-dev] [PATCH 3/3] lua-utils.eclass: Add lua_get_static_lib() Marek Szuba
2020-10-12 15:39   ` David Seifert [this message]
2020-10-12 15:57     ` Marek Szuba
2020-10-12 16:09       ` David Seifert
2020-10-15 16:28 ` [gentoo-dev] [PATCH 0/3] lua-utils.eclass: expose header and library locations Marek Szuba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2a7d17f84eb40695f290ea507962f42057781b6.camel@gentoo.org \
    --to=soap@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox