ports/132089: [patch] graphics/graphviz: stray symbolic link to /usr/local/lib/graphviz/lua/libgv_lua.so
Scot Hetzel
swhetzel at gmail.com
Wed Feb 25 08:20:06 UTC 2009
>Number: 132089
>Category: ports
>Synopsis: [patch] graphics/graphviz: stray symbolic link to /usr/local/lib/graphviz/lua/libgv_lua.so
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Feb 25 08:20:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Scot Hetzel
>Release: 8.0-CURRENT
>Organization:
>Environment:
>Description:
When the LUA Option is selected, the port installs a stray symbolic link in to the /root directory:
ls -l /root/gv*
lrwxr-xr-x 1 root wheel 40 Feb 24 13:49 /root/gv.so -> /usr/local/lib/graphviz/lua/libgv_lua.so
This problem is caused by configure not setting LUA_INSTALL_DIR to the ${PREFIX}/lib/lua/${LUA_VER} directory. This causes tclpkg/Makefile to place the symbolic link in the wrong location.
I used script to capture this output of the tclpkg/Makefile:
gmake[4]: Entering directory
`/usr/ports/graphics/graphviz/work/graphviz-2.20.3/tclpkg'
mkdir -p ;
usage: mkdir [-pv] [-m mode] directory_name ...
gmake[4]: [install-data-hook] Error 64 (ignored)
if test -w ; then \
(cd ; \
ln -s -f
/usr/local/lib/graphviz/lua/libgv_lua.so gv.so;) \
else \
echo "Warning: is not writable."; \
echo "Skipping system installation of lua binding."; \
fi
the cd command is missing the LUA_INSTALL_DIR, so it changes to /root.
>How-To-Repeat:
Install graphics/graphviz with the LUA option selected.
>Fix:
The attached patch fixes this problem.
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/graphviz/Makefile,v
retrieving revision 1.109
diff -u -r1.109 Makefile
--- Makefile 24 Jan 2009 17:02:08 -0000 1.109
+++ Makefile 25 Feb 2009 08:03:37 -0000
@@ -345,7 +345,8 @@
.include "${PORTSDIR}/Mk/bsd.lua.mk"
CFLAGS+= -I${LUA_INCDIR}
LDFLAGS+= -L${LUA_LIBDIR} -lm
-CONFIGURE_ENV+= LUA="${LUA_BINDIR}/lua"
+CONFIGURE_ENV+= LUA="${LUA_BINDIR}/lua" \
+ LUA_INSTALL_DIR=${PREFIX}/lib/lua/${LUA_VER}
MANN+= gv_lua.n
.else
CONFIGURE_ARGS+= --disable-lua
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/graphics/graphviz/pkg-plist,v
retrieving revision 1.45
diff -u -r1.45 pkg-plist
--- pkg-plist 25 Jun 2008 14:24:20 -0000 1.45
+++ pkg-plist 25 Feb 2009 08:01:05 -0000
@@ -163,6 +163,7 @@
%%WITH_LUA%%lib/graphviz/lua/libgv_lua.a
%%WITH_LUA%%lib/graphviz/lua/libgv_lua.la
%%WITH_LUA%%lib/graphviz/lua/libgv_lua.so
+%%WITH_LUA%%/lib/lua/%%LUA_VER%%/gv.so
%%WITH_PERL%%lib/graphviz/perl/gv.so
%%WITH_PERL%%lib/graphviz/perl/gv.pm
%%WITH_PERL%%lib/graphviz/perl/libgv_perl.a
Index: files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/graphics/graphviz/files/patch-configure,v
retrieving revision 1.7
diff -u -r1.7 patch-configure
--- files/patch-configure 16 Jul 2008 14:27:32 -0000 1.7
+++ files/patch-configure 25 Feb 2009 07:50:29 -0000
@@ -1,5 +1,5 @@
---- configure.orig 2008-07-07 04:27:21.000000000 +0200
-+++ configure 2008-07-11 11:42:18.000000000 +0200
+--- configure.orig 2008-10-07 18:54:55.000000000 -0500
++++ configure 2009-02-25 01:49:47.424929372 -0600
@@ -6481,6 +6481,9 @@
*-apple-darwin* )
CFLAGS="${CFLAGS} -fno-common -Wall"
@@ -10,3 +10,14 @@
*-freebsd* )
CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
;;
+@@ -26247,7 +26250,9 @@
+
+ LUA_INCLUDES=""
+ LUA_LIBS=""
+- LUA_INSTALL_DIR=""
++ if test -z "$LUA_INSTALL_DIR" ; then
++ LUA_INSTALL_DIR=""
++ fi
+
+ if test -n "$lua_inc"; then
+ CFLAGS="$CFLAGS -I$lua_inc"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list