Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lua_single_target
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Mon Jul 12, 2021 8:04 am    Post subject: lua_single_target Reply with quote

I'd appreciate if we had a news item regarding this LUA_SINGLE_TARGET thing.
The key information should be which lua to use, how to set it up. I assume it is again make.conf. What the recommendation is, e.g. the news item regarding python. Will there be only single_target or the other thing also like python has?

Example:
Code:
[ebuild     U  ] media-video/vlc-3.0.16-r4:0/5-9::gentoo [3.0.16-r2:0/5-9::gentoo] USE="...
" CPU_FLAGS_X86="mmx sse" LUA_SINGLE_TARGET="lua5-1 -lua5-2" 0 KiB


Not sure since when this LUA_SINGLE_TARGET is implemented.
Not sure if https://wiki.gentoo.org/wiki/Lua this page should reflect the changes.

Maybe the wiki should be updated: https://wiki.gentoo.org/index.php?title=Special%3ASearch&search=LUA_SINGLE_TARGET&go=Go
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31443
Location: here

PostPosted: Mon Jul 12, 2021 8:14 am    Post subject: Reply with quote

Like PYTHON_TARGETS or PYTHON_SINGLE_TARGET if you don't care about a specific version profile set it for you.
For set a specific version better is use package.use for example with entry */* LUA_SINGLE_TARGET: lua5-1 because it not override profile setting as would be done by make.conf.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2892

PostPosted: Mon Jul 12, 2021 9:04 am    Post subject: Reply with quote

lua usage is unfortunately less streamlined than python right now, so you may find yourself needing to set this manually for a few packages that only support specific versions.

For a bit of a lowdown on versions, lua5.1 and luajit are a lot like python2.7 -- some things are refusing to move on. 5-1 was used as default for both LUA_TARGETS and LUA_SINGLE_TARGET because its use is still more widespread resulting "less" flag juggling.

I use lua5-3 system-wide myself (set manually) with exceptions where needed, still early to use 5-4 in general. And lua5-2 is somewhat useless, there's been talk to remove it.

Not that I'm saying should use 5-3, simply need to use what a package you need supports and what you set globally is just for "most frequently used" convenience.

As mentioned above, works a lot like python nonetheless. For package.use examples:
Code:
# add lua5-3, keep profile defaults (5-1), resulting in LUA_TARGETS="lua5-1 lua5-3"
*/* LUA_TARGETS: lua5-3

# change single target default, can only have one so remove current value with -*
*/* LUA_SINGLE_TARGET: -* lua5-3

# package only supports single target lua5-1
category/package LUA_SINGLE_TARGET: -* lua5-1

# package works only with luajit and needs a dependency to support it as well
dev-lua/somedep LUA_TARGETS: luajit
category/otherpackage LUA_SINGLE_TARGET: -* luajit
TARGETS vs SINGLE_T is essentially a package that can support multiple versions at once (i.e. will install for all targets, often a dependency of other packages), while single is more often a standalone application that picks which version to use.

Generally I wouldn't use make.conf for this nor set anything until a package requests it, or if you personally need it. Most people don't really need to know any of the above.
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 214

PostPosted: Tue Jul 13, 2021 10:10 am    Post subject: Reply with quote

Thanks Ionen,
for give some background information about lua versions.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Sun Sep 12, 2021 4:06 pm    Post subject: Reply with quote

user wrote:
Thanks Ionen,
for give some background information about lua versions.

+1
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum