summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
author Heinz Wiesinger <pprkut@slackbuilds.org>2011-03-21 21:32:23 +0100
committer Robby Workman <rworkman@slackbuilds.org>2011-03-24 19:22:35 -0500
commit2bd47ab87eda16e1ed6c0bd377c0187fc8791fcc (patch)
tree8d3fb59fef739fce0d3878d1a270b38c5a196b14 /graphics
parent2dcab5ec2b3715c85d847d34f3a0657f56dd024f (diff)
downloadslackbuilds-2bd47ab87eda16e1ed6c0bd377c0187fc8791fcc.tar.gz
slackbuilds-2bd47ab87eda16e1ed6c0bd377c0187fc8791fcc.tar.xz
graphics/graphviz: More proper php support.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/graphviz/doinst.sh15
-rw-r--r--graphics/graphviz/graphviz.SlackBuild8
-rw-r--r--graphics/graphviz/graphviz.ini12
3 files changed, 34 insertions, 1 deletions
diff --git a/graphics/graphviz/doinst.sh b/graphics/graphviz/doinst.sh
index 24af708a0e..3eeed5b0f0 100644
--- a/graphics/graphviz/doinst.sh
+++ b/graphics/graphviz/doinst.sh
@@ -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
diff --git a/graphics/graphviz/graphviz.SlackBuild b/graphics/graphviz/graphviz.SlackBuild
index 64b22ddf13..26f0b53991 100644
--- a/graphics/graphviz/graphviz.SlackBuild
+++ b/graphics/graphviz/graphviz.SlackBuild
@@ -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
diff --git a/graphics/graphviz/graphviz.ini b/graphics/graphviz/graphviz.ini
new file mode 100644
index 0000000000..6561f21010
--- /dev/null
+++ b/graphics/graphviz/graphviz.ini
@@ -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');
+; ?>