Bug 190516 - graphics/darktable: incorrect plist, cannot install with LUA disabled
Summary: graphics/darktable: incorrect plist, cannot install with LUA disabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jean-Sébastien Pédron
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 16:33 UTC by Matthieu Volat
Modified: 2014-06-13 08:50 UTC (History)
0 users

See Also:


Attachments
Fix plist by using PLIST_SUB and comments (7.95 KB, patch)
2014-06-04 15:00 UTC, Jean-Sébastien Pédron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2014-06-02 16:33:00 UTC
When installing graphics/darktable, if the LUA option is unselected, an incorrect plist will generate an error and package installation will fail with:
====> Compressing man pages (compress-man)
===>   Installing ldconfig configuration file
===>  Installing for darktable-1.4.2
===>   Registering installation for darktable-1.4.2
pkg-static: lstat(/usr/ports/graphics/darktable/work/stage/usr/local/share/darktable/lua/darktable/): No such file or directory
pkg-static: lstat(/usr/ports/graphics/darktable/work/stage/usr/local/share/darktable/lua/): No such file or directory
*** Error code 74

Stop.
make[2]: stopped in /usr/ports/graphics/darktable
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/darktable
*** Error code 1

Stop.

How-To-Repeat:
1. cd $PORTSDIR/graphics/darktable
2. make config, disable LUA
3. make (re)install

Fix:
Fix pkg-plist & Makefile, the following worked on my system:

Index: pkg-plist
===================================================================
--- pkg-plist	(revision 356237)
+++ pkg-plist	(working copy)
@@ -238,8 +238,6 @@
 @dirrmtry %%DATADIR%%/pixmaps/plugins/darkroom
 @dirrmtry %%DATADIR%%/pixmaps/plugins
 @dirrmtry %%DATADIR%%/pixmaps
-@dirrmtry %%DATADIR%%/lua/darktable
-@dirrmtry %%DATADIR%%/lua
 @dirrmtry %%DATADIR%%/latex
 @dirrmtry %%DATADIR%%/kernels
 @dirrmtry %%DATADIR%%/js
Index: Makefile
===================================================================
--- Makefile	(revision 356237)
+++ Makefile	(working copy)
@@ -20,7 +20,7 @@
 ONLY_FOR_ARCHS=	i386 amd64
 ONLY_FOR_ARCHS_REASON=	uses SSE extensions
 
-USES=		cmake:outsource pkgconfig tar:xz ninja desktop-file-utils
+USES=		cmake:outsource pkgconfig tar:xz desktop-file-utils
 USE_GNOME=	librsvg2
 USE_SQLITE=	yes
 USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}
@@ -120,7 +120,9 @@
 .if ${PORT_OPTIONS:MLUA}
 USES+=		lua
 PLIST_FILES+=	%%DATADIR%%/lua/darktable/debug.lua \
-		%%DATADIR%%/luarc
+		%%DATADIR%%/luarc \
+		@dirrmtry %%DATADIR%%/lua/darktable \
+		@dirrmtry %%DATADIR%%/lua
 .else
 CMAKE_ARGS+=	-DUSE_LUA:BOOL=OFF
 .endif
Comment 1 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-06-04 15:00:59 UTC
Created attachment 143366 [details]
Fix plist by using PLIST_SUB and comments

Hello!

You're right that the plist is broken if Lua support is disabled, but your patch breaks the Lua-enabled case. You previously reported this in GNATS and I failed to find a solution at that time... I looked in other ports to know what they do (I'm very new to ports) and here's a patch (attached), based on PLIST_SUB and comments in pkg-plist.

I tested it with all options checked and all options unchecked. It's working for me. Could you please give it a try?
Comment 2 Matthieu Volat 2014-06-04 18:26:58 UTC
As far as my option set is concerned, packaging and installation proceeds fine.
Comment 3 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-06-06 07:55:43 UTC
Just a follow-up to let you know that I'm still working on this issue: I submitted the patch for review on Phabricator and Baptiste (bapt@) is helping me improving it:
https://phabric.freebsd.org/D178
Comment 4 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-06-12 09:13:28 UTC
The final patch was committed in r357572.

Do you confirm that the issue is resolved for you?
Comment 5 Matthieu Volat 2014-06-12 16:51:17 UTC
Seems fine with me. Bug report can be closed, thanks.