summaryrefslogtreecommitdiff
path: root/office/htmldoc/htmldoc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/htmldoc/htmldoc.SlackBuild')
-rw-r--r--office/htmldoc/htmldoc.SlackBuild37
1 files changed, 20 insertions, 17 deletions
diff --git a/office/htmldoc/htmldoc.SlackBuild b/office/htmldoc/htmldoc.SlackBuild
index 404215de69..8378dbc8f4 100644
--- a/office/htmldoc/htmldoc.SlackBuild
+++ b/office/htmldoc/htmldoc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for htmldoc
-# Copyright 2009-2013 LukenShiro, Italy
+# Copyright 2009-2014 LukenShiro, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,8 +26,8 @@
# workaround, and for a patch to fix CVE-2009-3050.
PRGNAM=htmldoc
-VERSION=1.8.27
-BUILD=${BUILD:-5}
+VERSION=${VERSION:-1.8.28}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -43,7 +43,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCFILES="CHANGES.txt README.txt COMPILE.txt COPYING.txt htmldoc.eula htmldoc.readme"
+DOCFILES="CHANGES.txt README.txt COMPILE.txt COPYING.txt htmldoc.readme"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -69,17 +69,22 @@ tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ \( -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# workaround to avoid /usr/share/doc/htmldoc's use for help function
-sed -i 's|^#define DOCUMENTATION "$prefix/share/doc/htmldoc"|\
- #define DOCUMENTATION "$prefix/doc/htmldoc-1.8.27"|g' ./configure
+sed -r -i 's|^#define DOCUMENTATION "$prefix/share/doc/htmldoc"|\
+ #define DOCUMENTATION "$prefix/doc/htmldoc-$VERSION"|g' ./configure
+
+# to avoid an invalid implicit declaration of function (for 'CUPS_SRAND' and 'CUPS_RAND')
+sed -r -i 's|CUPS_SRAND|srand|g' htmldoc/http.c
+sed -r -i 's|CUPS_RAND|rand|g' htmldoc/http.c
# --mandir seems to be ignored; --docdir doesn't exist
# internal jpeg/png/zlib libs disabled (using system ones)
+# it does not build correctly with gnutls (disabled)
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -89,20 +94,18 @@ CXXFLAGS="$SLKCFLAGS" \
--with-gui \
--disable-localjpeg \
--disable-localzlib \
- --disable-localpng
+ --disable-localpng \
+ --disable-gnutls \
+ --build=$ARCH-slackware-linux
# workaround to avoid /usr/share/doc/htmldoc's use for doc installation
-sed -i 's|\$(datadir)/doc/htmldoc|\$(prefix)/doc/htmldoc-1.8.27|g' \
+sed -r -i 's|\$(datadir)/doc/htmldoc|\$(prefix)/doc/htmldoc-$VERSION|g' \
doc/Makefile
-# Apply patch to fix several insecure calls to sscanf().
-# It's intended to resolve CVE-2009-3050 vulnerability.
-patch -p0 < $CWD/insecure_sscanf_patch.diff
-
-make all || exit 1
+make all
# DESTDIR= is not supported
-make prefix=$PKG/usr install || exit 1
+make prefix=$PKG/usr install
# Copy some files who are not automatically installed (main binary, .desktop, icons, etc..)
mkdir -p $PKG/usr/bin