How can I use devel/lua-sysctl in sysutils/conky ?

emmex said:
How can I compile Conky with Lua 5.2 ?
In /usr/ports/sysutils/conky/Makefile I made the following changes:
Code:
USES=		gmake iconv pkgconfig tar:bzip2
-changed to-
USES=		gmake iconv pkgconfig tar:bzip2 lua

post-patch:
	@${REINPLACE_CMD} -e 's,lua5\.1,lua-5.1,g' \
-changed to-
post-patch:
	@${REINPLACE_CMD} -e 's,lua5\.1,${LUA_VER},g' \
then I reistalled sysutils/conky. Then I checked:
Code:
# pkg info -r lua52
lua52-5.2.3_2:
	conky-1.9.0_3
which shows sysutils/conky depends on lang/lua52. This is what you want, no?
 
Thank you @trh411 for your effort, but unfortunately it does not works for me.

pkg info -r lua52 returns the correct information
lua52-5.2.3_2:
lua52-sysctl-1.0_1
conky-1.9.0_3


but Conky uses Lua 5.1 internally. I have tested the Lua version with:

lua_version.lua
Code:
function conky_lua_version()
    print(_VERSION)
    return _VERSION
end

conkyrc
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent no
own_window_colour brown

# Use double buffering (reduces flicker)
double_buffer yes

# fiddle with window
use_spacer right
use_xft yes
xftalpha 0.5
no_buffers yes

# Update interval in seconds
update_interval 1.0

# Minimum size of text area
minimum_size 250 5
maximum_width 250

# Draw shades?
draw_shades no

# Text stuff
draw_outline no
draw_borders no
#xftfont Sans:size=15
uppercase no

# Stippled borders?
# stippled_borders 3

# border width
border_width 5

# Default colors and also border colors
default_color white

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

# Lua Load
lua_load ./lua_version.lua

# stuff after ‘TEXT’ will be formatted on screen
TEXT
Lua version: ${lua conky_lua_version }

in a temporary directory. In the same directory running:
conky -c conkyrc

prints:
Lua version: Lua 5.1

Regards
Maurizio
 
Last edited by a moderator:
emmex said:
Thank you @trh411 for your effort, but unfortunately it does not works for me.
Interesting. I modeled the changes to the sysutils/conky Makefile after the devel/lua-sysctl Makefile, which uses lang/lua52. There were no other references to the ${LUA_VER} in either Makefile. I'll take another look at this, but in the meantime, you might want to send the port maintainer an email for some quick ideas on how to make this work the way you want.
 
Last edited by a moderator:
Back
Top