Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 752885 - x11-misc/devilspie2: migrate to lua eclasses
Summary: x11-misc/devilspie2: 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: Desktop Misc. Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: slotted-lua
  Show dependency tree
 
Reported: 2020-11-03 15:37 UTC by Marek Szuba
Modified: 2020-11-29 19:42 UTC (History)
2 users (show)

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


Attachments
0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch (0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch,2.76 KB, patch)
2020-11-04 01:38 UTC, Ionen Wolkens
Details | Diff
0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch (0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch,2.76 KB, patch)
2020-11-04 02:33 UTC, Ionen Wolkens
Details | Diff
0001-x11-misc-devilspie2-port-to-lua-single-eclass-v3.patch (0001-x11-misc-devilspie2-port-to-lua-single-eclass-v3.patch,2.78 KB, patch)
2020-11-05 14:52 UTC, Ionen Wolkens
Details | Diff

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:55 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 Ionen Wolkens gentoo-dev 2020-11-03 23:26:24 UTC
This package doesn't install any lua scripts (these are provided by users in $HOME/.config/devilspie2), and only links with the library. It also explicitly wants lua5.1 and ignores presence of other versions (upstream is kind of dead, but package still useful).

Does it still need the lua eclass? Is changing
    >=dev-lang/lua-5.1.5:0
to
    dev-lang/lua:5.1
sufficient? I can confirm that works, pulls right deps, builds, and runs fine.
Comment 2 Ionen Wolkens gentoo-dev 2020-11-03 23:45:45 UTC
(In reply to Ionen Wolkens from comment #1)
> It also explicitly wants lua5.1 and ignores presence of other versions.
Correction, it does check others but only if lua5.1 was not found. However it does it wrong and will fail.

LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
Comment 3 Ionen Wolkens gentoo-dev 2020-11-03 23:58:42 UTC
Ah, lua-utils.eclass has a solver for the above. Guess I'll test to see if it builds/runs with :5.2/5.3. I'll see if it works with those and might provide an updated ebuild myself.
Comment 4 Ionen Wolkens gentoo-dev 2020-11-04 01:38:39 UTC
Created attachment 669974 [details, diff]
0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch

Hope that's right, confirm seems to works with all of luajit+lua5-{1..3} (or at least with my scripts, no test suite) and links with right library.

Feel free to use/modify/ignore as seen fit.
...and add >=x11-misc/devilspie2-0.43-r1 to package.mask (not included)

I don't see any reason to keep devilspie2-0.42 if 0.43 is stabilized (no issues on my end), so haven't touched it.

Newer lua may possibly break user scripts in $HOME (can't test those), but users can select a specific implementation if that's an issue.

Also took the liberty to do minor unrelated cleanups:
 - guarded CC with ""
 - removed flag-o-matic inherit (unused)
 - replaced dodoc by einstalldocs (installs same things except skips the irrelevant VERSION file)
Comment 5 Ionen Wolkens gentoo-dev 2020-11-04 02:33:32 UTC
Created attachment 669977 [details, diff]
0001-x11-misc-devilspie2-port-to-lua-single-eclass.patch

Unrelated to lua but realized the original ebuild specified DEPEND twice instead of DEPEND+BDEPEND, new version to fix this as well.
Comment 6 Ionen Wolkens gentoo-dev 2020-11-05 14:52:23 UTC
Created attachment 670073 [details, diff]
0001-x11-misc-devilspie2-port-to-lua-single-eclass-v3.patch

Noticed forgot REQUIRED_USE looking at the example recently added to the eclass, so third version. Hope not missing anything else :)

Been using it with luajit now, working fine.
Comment 7 Ionen Wolkens gentoo-dev 2020-11-20 01:04:22 UTC
I tested lua5-4 to see if worth adding, but 5-4 causes build failures -- so leaving patch unchanged.

If need be I could fix the code but unless for 5-4 support becomes urgent I'll leave it alone (maybe upstream will wake up).
Comment 8 Marek Szuba archtester gentoo-dev 2020-11-29 19:32:46 UTC
Thanks! I'll merge this shortly, the desktop-misc project has just been dissolved so this package is now effectively without a maintainer.
Comment 9 Larry the Git Cow gentoo-dev 2020-11-29 19:42:13 UTC
The bug has been closed via the following commit(s):

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

commit f69df3c1e7978b9bdca93b194a898d5baf239a2c
Author:     Ionen Wolkens <sudinave@gmail.com>
AuthorDate: 2020-11-05 14:46:50 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2020-11-29 19:42:02 +0000

    x11-misc/devilspie2: port to lua-single eclass
    
    With some cosmetic changes made and package.mask entry added by Marek
    Szuba at merge time.
    
    Closes: https://bugs.gentoo.org/752885
    Signed-off-by: Ionen Wolkens <sudinave@gmail.com>
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 profiles/package.mask                              |  1 +
 x11-misc/devilspie2/devilspie2-0.43-r100.ebuild    | 48 ++++++++++++++++++++++
 .../files/devilspie2-0.43-lua-pkgconfig.patch      | 12 ++++++
 3 files changed, 61 insertions(+)