Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 752798 - net-dns/dnsmasq: migrate to lua eclasses
Summary: net-dns/dnsmasq: migrate to lua eclasses
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: slotted-lua
  Show dependency tree
 
Reported: 2020-11-03 15:37 UTC by Marek Szuba
Modified: 2020-12-22 00:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-dns/dnsmasq-2.82-r1: add slotted lua/luajit and fix Makefile's lua_cflags and lua_libs (dnsmasq-2.82-r1.ebuild,4.46 KB, text/plain)
2020-12-02 01:54 UTC, mehw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2020-11-03 15:37:21 UTC
In order for Gentoo Linux to properly support side-by-side installation of
different versions of Lua (including LuaJIT), please migrate this package as
to lua.eclass (for packages which should support multiple Lua implementations
at the same time, i.e. most likely Lua modules) or lua-single.eclass (for
packages which only have to support one Lua implementation at a time). For
details, consult documentation of respective eclasses as well as
already-migrated ebuilds in the tree.

Please note that since slotted dev-lang/lua is currently masked, your
migrated ebuilds should be masked as well. There is a section of package.mask,
created in September 2020, which you can use for this purpose so that it will
be easier in the future to unmask them all in one go.

Thank you in advance for your effort!
Comment 1 mehw 2020-12-02 01:54:17 UTC
Created attachment 676174 [details]
net-dns/dnsmasq-2.82-r1: add slotted lua/luajit and fix Makefile's lua_cflags and lua_libs

Hello,

This is a trivial amendment to add slotted lua/luajit to net-dns/dnsmasq-2.82.

Amendmends:
- add LUA_COMPAT
- add lua-single as inherit
- use LUA_DEPS and LUA_REQUIRED_USE
- fix Makefile: e.g. pkg-config --cflags ${ELUA} (and also --libs), where ELUA may be lua5.{1,2,3} or luajit



diff dnsmasq-2.82.ebuild dnsmasq-2.82-r1.ebuild
6c6,8
< inherit toolchain-funcs flag-o-matic systemd
---
> LUA_COMPAT=( lua5-{1..3} luajit )
> 
> inherit lua-single toolchain-funcs flag-o-matic systemd
35c37
< 	lua? ( dev-lang/lua:* )
---
> 	lua? ( ${LUA_DEPS} )
56c58,61
< 	lua? ( script )
---
> 	lua? (
> 		script
> 		${LUA_REQUIRED_USE}
> 	)
95d99
< 	sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die
97a102,105
> 
> 	if use lua; then
> 		sed -i -r "s:lua5.[0-9]+:${ELUA}:" Makefile || die
> 	fi
Comment 2 Larry the Git Cow gentoo-dev 2020-12-22 00:09:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5db875781303dc0944abfdf04c51a6e05804fbd7

commit 5db875781303dc0944abfdf04c51a6e05804fbd7
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2020-12-22 00:07:46 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2020-12-22 00:09:35 +0000

    net-dns/dnsmasq: migrate to lua-single.eclass
    
    The wrapper works fine with the Makefile hack used in the unmigrated
    ebuilds to point at slot 0. Upstream only checks for lua5.2 but in the end,
    links fine against all Lua implementations currently in the tree.
    
    Closes: https://bugs.gentoo.org/752798
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-dns/dnsmasq/dnsmasq-2.82-r100.ebuild | 210 +++++++++++++++++++++++++++++++
 profiles/package.mask                    |   1 +
 2 files changed, 211 insertions(+)