You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
3.1 KiB
127 lines
3.1 KiB
setperms() {
|
|
find -L . \
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
-exec chmod 755 {} \; -o \
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
|
}
|
|
|
|
|
|
phpbindings() {
|
|
sed -i 's|/php/modules|/php/extensions|' configure
|
|
}
|
|
|
|
|
|
patches() {
|
|
echo $'#scan.l patch not required for 2.40.1
|
|
#--- lib/cgraph/scan.l
|
|
#+++ lib/cgraph/scan.l
|
|
#@@ -152,1 +152,1 @@
|
|
#- agerr(AGWARN,agxbuse(&xb));
|
|
#+ agerr(AGWARN, "%s", agxbuse(&xb));
|
|
#@@ -228,1 +228,1 @@
|
|
#- agerr(AGERR,agxbuse(&xb));
|
|
#+ agerr(AGERR, "%s", agxbuse(&xb));
|
|
--- plugin/gs/gvloadimage_gs.c
|
|
+++ plugin/gs/gvloadimage_gs.c
|
|
@@ -72,11 +72,11 @@
|
|
|
|
assert (err < 0);
|
|
|
|
- if (err >= e_VMerror)
|
|
+ if (err >= gs_error_VMerror)
|
|
errsrc = "PostScript Level 1";
|
|
- else if (err >= e_unregistered)
|
|
+ else if (err >= gs_error_unregistered)
|
|
errsrc = "PostScript Level 2";
|
|
- else if (err >= e_invalidid)
|
|
+ else if (err >= gs_error_invalidid)
|
|
errsrc = "DPS error";
|
|
else
|
|
errsrc = "Ghostscript internal error";
|
|
--- tclpkg/gv/gv_php_init.c
|
|
+++ tclpkg/gv/gv_php_init.c
|
|
@@ -27,0 +28 @@
|
|
+ TSRMLS_FETCH();
|
|
@@ -32,0 +34 @@
|
|
+ TSRMLS_FETCH();
|
|
' | while read line
|
|
do
|
|
patch -p0
|
|
done
|
|
}
|
|
|
|
|
|
rmdoc() {
|
|
rm -rf $PKG/usr/share/$PRGNAM/doc
|
|
}
|
|
|
|
|
|
graphvizini() {
|
|
mkdir -p $PKG/etc/php.d
|
|
cat << EOF > $PKG/etc/php.d/graphviz.ini.new
|
|
; 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$LIBDIRSUFFIX/graphviz/php/gv.php');
|
|
; ?>
|
|
EOF
|
|
}
|
|
|
|
|
|
gzipman() {
|
|
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
|
|
}
|
|
|
|
|
|
emptydirs() {
|
|
find $PKG/usr/lib${LIBDIRSUFFIX}/graphviz -depth -type d -empty -exec rmdir {} \;
|
|
}
|
|
|
|
|
|
# Create a "dummy" config file in /usr/lib${LIBDIRSUFFIX}/graphviz so that it
|
|
# will be removed when the package is uninstalled. This file is generated by
|
|
# the postinstall script and contains information about available plugins, so
|
|
# this is (or at least should be) safe.
|
|
#
|
|
# Write some dummy content to it to avoid
|
|
# "Error: /usr/lib64/graphviz/config6 is zero sized, or other read error."
|
|
# message during installation.
|
|
dummy() {
|
|
echo '# Dummy content.' > $PKG/usr/lib${LIBDIRSUFFIX}/graphviz/config6
|
|
}
|
|
|
|
|
|
doinstsh() {
|
|
cat << EOF > $PKG/install/doinst.sh
|
|
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.d/graphviz.ini.new
|
|
|
|
# Configure plugins
|
|
# (writes /usr/lib*/graphviz/config6 with available plugin information)
|
|
chroot . /usr/bin/dot -c
|
|
EOF
|
|
}
|
|
|
|
|