graphics/graphviz: More proper php support.

Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
This commit is contained in:
Heinz Wiesinger 2011-03-21 21:32:23 +01:00 committed by Robby Workman
parent 2dcab5ec2b
commit 2bd47ab87e
3 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,18 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/php/graphviz.ini.new
# Configure plugins
# (writes /usr/lib*/graphviz/config6 with available plugin information)
chroot . /usr/bin/dot -c

View File

@ -4,10 +4,11 @@
# Written by Audrius Kažukauskas <audrius@neutrino.lt>
# Modified by Robby Workman <rworkman@slackbuilds.org>
# Modified by Heinz Wiesinger <pprkut@slackbuilds.org>
PRGNAM=graphviz
VERSION=${VERSION:-2.26.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -61,6 +62,11 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
# Move php bindings to proper location and install config file
mv $PKG/usr/lib$LIBDIRSUFFIX/php/modules \
$PKG/usr/lib$LIBDIRSUFFIX/php/extensions
install -D -m 644 $CWD/graphviz.ini $PKG/etc/php/graphviz.ini.new
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

View File

@ -0,0 +1,12 @@
; Enable graphviz extension module
; extension=gv.so
; Graphviz' own documentation mentions a "gv.php" file that should
; be included. This file is however not necessary, it is just a
; wrapper class around functions that are already available after
; loading the extension, just leave out the "gv::" prefix.
; In case you still prefer to use the wrapper class you have to
; include it using its absolute path:
; <?php
; include ('/usr/lib/graphviz/php/gv.php');
; ?>