diff options
Diffstat (limited to 'accessibility/flite/flite.SlackBuild')
-rw-r--r-- | accessibility/flite/flite.SlackBuild | 62 |
1 files changed, 39 insertions, 23 deletions
diff --git a/accessibility/flite/flite.SlackBuild b/accessibility/flite/flite.SlackBuild index e45fe7fbb5..c937d4761b 100644 --- a/accessibility/flite/flite.SlackBuild +++ b/accessibility/flite/flite.SlackBuild @@ -4,6 +4,12 @@ # Originally written by Martin Lefebvre (dadexter@sekurity.com) # Now maintained by B. Watson (yalhcru@gmail.com), original author is MIA. +# 20150623 bkw: +# - fix doc build failure with standalone SBo texi2html, thanks +# to John Vogel for investigating this +# - add DOCS=no option, in case a future texi2html has more +# issues + # 20150509 bkw: # - update for 2.0.0 # - add HTML and .info docs @@ -78,6 +84,12 @@ CXXFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux +# Fix builds with SBo standalone texi2html. The -number option works +# with Slackware's ancient texi2html (from t/tetex), but would have to +# be --number-sections in the newer SBo texi2html. It turns out section +# numbering is enabled by default in both versions, so get rid of it... +sed -i '/texi2html/s,-number,,' doc/Makefile + make make install prefix=$PKG/usr INSTALLLIBDIR=$PKG/usr/lib${LIBDIRSUFFIX} @@ -97,31 +109,35 @@ done # build the docs. NB don't replace subshells with "cd dir" and # "cd -", as they don't nest. -( cd doc - # build the HTML docs. - make $PRGNAM.html - ( cd html - - # Upstream hardlinks index.html, use a symlink instead. - rm -f index.html - ln -s ${PRGNAM}_toc.html index.html - - # Also, we don't ship the PDF doc, so link to upstream's. - # Fix link to source package. - sed -i \ - -e 's,HREF="flite.pdf",HREF="http://www.festvox.org/flite/doc/flite.pdf",' \ - -e 's,\.tar\.gz,.tar.bz2,g' \ - ${PRGNAM}_toc.html +HTMLDOC="" +if [ "${DOCS:-yes}" = "yes" ]; then + HTMLDOC="doc/html" + ( cd doc + # build the HTML docs. + make $PRGNAM.html + ( cd html + + # Upstream hardlinks index.html, use a symlink instead. + rm -f index.html + ln -s ${PRGNAM}_toc.html index.html + + # Also, we don't ship the PDF doc, so link to upstream's. + # Fix link to source package. + sed -i \ + -e 's,HREF="flite.pdf",HREF="http://www.festvox.org/flite/doc/flite.pdf",' \ + -e 's,\.tar\.gz,.tar.bz2,g' \ + ${PRGNAM}_toc.html + ) + + # build the GNU info docs + makeinfo $PRGNAM.texi + mkdir -p $PKG/usr/info + gzip -9c < $PRGNAM.info > $PKG/usr/info/$PRGNAM.info.gz ) - - # build the GNU info docs - makeinfo $PRGNAM.texi - mkdir -p $PKG/usr/info - gzip -9c < $PRGNAM.info > $PKG/usr/info/$PRGNAM.info.gz -) +fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ACKNOWLEDGEMENTS COPYING README doc/html doc/*.txt doc/alice \ +cp -a ACKNOWLEDGEMENTS COPYING README $HTMLDOC doc/*.txt doc/alice \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -140,7 +156,7 @@ else fi # doinst.sh needed because we append to /usr/info/dir. -cat $CWD/doinst.sh > $PKG/install/doinst.sh +[ "${DOCS:-yes}" = "yes" ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |