Bug 204778

Summary: sysutils/conky: Fails to build (poudriere) when LUA enabled
Product: Ports & Packages Reporter: D Walker <walkerd>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Many People CC: ntarmos
Priority: --- Keywords: easy, patch, patch-ready
Version: LatestFlags: bugzilla: maintainer-feedback? (ntarmos)
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Poudriere build log for conky-1.9.0_5
none
Patch as a unified diff
koobs: maintainer-approval? (ntarmos)
Successful poudriere build log after patch applied none

Description D Walker 2015-11-24 13:47:19 UTC
Created attachment 163473 [details]
Poudriere build log for conky-1.9.0_5

Build system:  FreeBSD 10.2-RELEASE-p7 on AMD64 with poudriere 3.1.9

Build fails when attempting to build sysutils/conky under poudriere with the LUA bindings enabled as per the following options:

---Begin OPTIONS List---
===> The following configuration options are available for conky-1.9.0_5:
     APCUPSD=off: Monitor APCUPSD
     AUDACIOUS=off: Control Audacious sound player
     INOTIFY=off: Monitor file changes via Inotify
     LUA=on: Lua scripting language support
     METAR=off: Display METAR weather reports
     MOC=off: Control MOC (Music On Console)
     MPD=off: Control MPD (Music Player Daemon)
     NCURSES=off: Use ncurses to draw on terminals
     RSS=off: Display RSS feeds
     X11=on: X11 (graphics) support
     XMMS2=off: Control XMMS2 media player
     XOAP=off: Display XOAP weather reports
====> X11 (graphics) support
     ARGB=on: Use an ARGB visual to draw on X11
     DOUBLE_BUFFER=on: Enable X11 double buffering
     IMLIB2=on: Imlib 2 image library support
     XFT=on: Xft font library support
     LUA_CAIRO=on: Lua-Cairo binding
     LUA_IMLIB2=on: Lua-Imlib2 binding
===> Use 'make config' to modify these settings
---End OPTIONS List---

The following configure error is reported:

configure: error: tolua++, tolua++5.1, or tolua++-5.1 is required for Lua extras.
===>  Script "configure" failed unexpectedly.
Please report the problem to ntarmos@ceid.upatras.gr [maintainer] and attach
the "/wrkdirs/usr/ports/sysutils/conky/work/conky-1.9.0/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1


Possible solution:

If the Makefile is amended to add a libdepends for tolua++ MLUA_CAIRO and MLUA_IMLIB2 is checked and LUA_COMPS is set then the build succeeds.

The relevant section of the Makefile possibly needs amendment from:

.if ${PORT_OPTIONS:MLUA_CAIRO} || ${PORT_OPTIONS:MLUA_IMLIB2}
LUA_COMPS=              toluaxx
.endif

to

.if ${PORT_OPTIONS:MLUA_CAIRO} || ${PORT_OPTIONS:MLUA_IMLIB2}
LUA_COMPS=              toluaxx
LIB_DEPENDS+=           libtolua++-5.1.so:${PORTSDIR}/lang/tolua++
.endif


Full poudriere build log attached.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-27 02:26:34 UTC
@Dwalker, if you could attach your patch in unified diff format, that would be greatly appreciated. 

Bonus if you can confirm poudriere fully successfully passes after applying it.
Comment 2 D Walker 2015-11-29 17:18:44 UTC
Created attachment 163654 [details]
Patch as a unified diff

Unified diff attached as requested.
Comment 3 D Walker 2015-11-29 17:23:52 UTC
Created attachment 163655 [details]
Successful poudriere build log after patch applied

Postpatch poudriere build log attached to confirm a successful build with the patch applied.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-30 01:15:51 UTC
The options in question look they could be converted to OPTIONS helpers. Either original reporter or future assignee (committer) can take care of that
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-12-02 15:45:49 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Dec  2 15:45:19 UTC 2015
New revision: 402833
URL: https://svnweb.freebsd.org/changeset/ports/402833

Log:
  - Fix build with LUA_CAIRO or LUA_IMLIB2 enabled

  PR:		204778
  Submitted by:	walkerd@pamandduncan.co.uk
  Approved by:	portmgr blanket
  MFH:		2015Q4 (blanket)

Changes:
  head/sysutils/conky/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-12-02 15:46:53 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Dec  2 15:46:14 UTC 2015
New revision: 402834
URL: https://svnweb.freebsd.org/changeset/ports/402834

Log:
  MFH: r402833

  - Fix build with LUA_CAIRO or LUA_IMLIB2 enabled

  PR:		204778
  Submitted by:	walkerd@pamandduncan.co.uk
  Approved by:	portmgr blanket
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2015Q4/
  branches/2015Q4/sysutils/conky/Makefile