martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.23k stars 256 forks source link

Gentoo lua version #851

Closed frddbbbl closed 3 years ago

frddbbbl commented 4 years ago

Hi, i understand this is a problem with gentoo not vis. however on gentoo the highest unmasked verion of lua is 5.1.5 so i am unable to use colour schemes. is there any workaround for this?

acidrums4 commented 4 years ago

Hello, fellow Gentoo user here.

I struggled for this for some weeks, but I ended unmasking =dev-lang/lua-5.3.5-r2 and emerging lpeg without the luajit use. Don't ask me why but when I set it, vis couldn't find the lpeg library. So without setting luajit we don't have to link lpeg statically and you can use color schemes/syntax.

frddbbbl commented 4 years ago

Hi, can i ask exactly how you unmasked it? when i was trying to unmask it it was hard to find a way to unmask it without causing a lot of conflicts with packages that need the other version. i've not used gentoo for a relativly longtime so i'm probably just missing something.

acidrums4 commented 4 years ago

I just throwed it into /etc/portage/package.unmask:

=dev-lang/lua-5.3.5-r2
app-eselect/eselect-lua

Though I didn't had lua installed or any package which depended on it, so I didn't had any dependency conflict about it

frddbbbl commented 4 years ago

yeah unfortunatly lua is blocking me from installing 5.3 and i dont want to end up causing a massive mess in conflicts

acidrums4 commented 4 years ago

You can try installing it as a different slot. I know this is possible, but not sure how it's done.

frddbbbl commented 4 years ago

will look into that!

frddbbbl commented 4 years ago

so i now have lua installed, but no matter the USE flags on lpeg vis tells me WARNING:could not find lpeg module and whenever i try set theme $PATH/TO/THEME i get this error:

/usr/local/share/vis/vis-std.lua:14: module 'themes//home/freddie/src/vis-master/lua/themes/base16-isotope.lua' not found:
        no field package.preload['themes//home/freddie/src/vis-master/lua/themes/base16-isotope.lua']
        no file '/usr/local/bin/lua/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/usr/local/bin/lua/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/home/freddie/.config/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/home/freddie/.config/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/etc/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/etc/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/usr/local/share/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/usr/local/share/vis/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/usr/share/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/usr/share/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/usr/lib64/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.lua'
        no file '/usr/lib64/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua/init.lua'
        no file '/usr/lib64/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope/lua.so'
        no file '/usr/lib64/lua/5.3/loadall.so'
        no file '/usr/lib64/lua/5.3/themes//home/freddie/src/vis-master/lua/themes/base16-isotope.so'
        no file '/usr/lib64/lua/5.3/loadall.so'
acidrums4 commented 4 years ago

You sure the luajit use isn't set anywhere?

frddbbbl commented 4 years ago

it was set, however when i tried to merge it it had a complation error. might just run it sans the colour schemes for now

martanne commented 4 years ago

You should only provide the name of the theme (without the .lua extension), not the full path to it. See also the relevant man page section. The color files will be searched in a themes/ sub folder of the paths listed by :help Lua. Use the VIS_PATH environment variable to change it. Again, check the manual page for details.

The wiki also links to a Gentoo overlay maintained by @lanodan. (I don't know the status of it though.)

lanodan commented 4 years ago

Thanks for the mention (watch status on everything was getting quite overwhelming).

vis in the lua overlay is working and it is what I would recommend it to get proper lua 5.2 and vis+lua on gentoo.

martanne commented 3 years ago

I am closing this because - as you mentioned - it is not a vis issue. Also I believe the Gentoo's Lua packaging improved recently.

lanodan commented 3 years ago

Yes, the lua overlay isn't needed anymore (AFAIK it even got deleted), it's in the main tree.