diff options
Diffstat (limited to 'source/ap/linuxdoc-tools/linuxdoc-tools.build')
-rwxr-xr-x | source/ap/linuxdoc-tools/linuxdoc-tools.build | 70 |
1 files changed, 51 insertions, 19 deletions
diff --git a/source/ap/linuxdoc-tools/linuxdoc-tools.build b/source/ap/linuxdoc-tools/linuxdoc-tools.build index 91521a6d..5eff9afb 100755 --- a/source/ap/linuxdoc-tools/linuxdoc-tools.build +++ b/source/ap/linuxdoc-tools/linuxdoc-tools.build @@ -1,6 +1,6 @@ #!/bin/bash -############################################################################### +####################################################################################### # Script: linuxdoc-tools.build # Purpose: Build & install all components that form the linuxdoc-tools # Slackware Package. @@ -11,13 +11,19 @@ # http://www.linuxfromscratch.org/blfs/view/svn/index.html # http://cblfs.cross-lfs.org/index.php/Category:DocBook_SGML # Thanks guys! :-) -############################################################################### +####################################################################################### +# Misc notes +# 1. Bug: Problem when validating docbook 4.5 documents +# Res: Won't Fix: Address such problems locally. +# See this thread for a discussion on this subject. +# https://www.linuxquestions.org/questions/showthread.php?p=5820741#post5820741 +####################################################################################### # Version of LDT (which is also the .t?z package version) LINUXDOCTOOLSVER=$PKGVERSION # Bundled package versions: -ASCIIDOCVER=8.6.9 +ASCIIDOCVER=8.6.10 DSSSLSTYLESHEETSVER=1.79 # docbook-dsssl-*.tar.xz (plus -doc- source archive), not SRPM. XSLSTYLESHEETSVER=1.79.2 # docbook-style-xsl-*src.rpm ("DocBook XSL Stylesheets" in our ChangeLog.txt) DOCBOOKUTILSVER=0.6.14 @@ -25,7 +31,7 @@ SGMLDTD3VER=3.1 SGMLDTD4VER=4.5 XMLDTDVER=4.5 GNOMEDOCUTILSVER=0.20.10 -GTKDOCVER=1.25 +GTKDOCVER=1.29 SGMLSPLVER=1.03ii OPENJADEVER=1.3.2 OPENSPVER=1.5.2 @@ -66,15 +72,16 @@ esac # the Linux from Scratch documentation; the other rest is because of # dependency build order. -####################### Build AsciiDoc ############################## +####################### Build AsciiDoc: Pass 1 of 2 ################# +function build_asciidoc() { # Extract source: cd $TMP +rm -rf asciidoc mkdir asciidoc && cd asciidoc -#rpm2cpio $CWD/sources/asciidoc-${ASCIIDOCVER}*.src.rpm | cpio -div || exit 1 -#tar xvf asciidoc-$ASCIIDOCVER.tar.*z* -tar xvf $CWD/sources/asciidoc-$ASCIIDOCVER.tar.*z* -cd asciidoc-$ASCIIDOCVER || exit 1 +rpm2cpio $CWD/sources/asciidoc-${ASCIIDOCVER}*.src.rpm | cpio -div || exit 1 +tar xvf asciidoc-py3-*.tar.*z +cd asciidoc-py3-*/ || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -83,21 +90,20 @@ find . \ -exec chmod 644 {} \; # Apply patches: -# Note: Don't take the "explicit-interpreter" patch) because: On Slackware 15.0, /usr/bin/python -> python2.7 -# Rationale: We're going to assume that by the time Slackware switches Python default to 3, AsciiDoc would -# also be Python3 compatible. If not, someone will probably patch it once all distributions -# drop Python2 support. # # Assemble patch list from spec file: # egrep '^Patch[0-9].*: ' *.spec | awk -F: '{print $2" \\"}' for i in \ \ - 0001-a2x-Write-manifests-in-UTF-8-by-default.patch \ + asciidoc-python3.patch \ + asciidoc-python3-a2x-decode-fix.patch \ + asciidoc-python3-deprecation-warning.patch \ \ - ; do xzcat $CWD/sources/${i}.xz | patch -p1 --verbose || exit 1 + ; do patch -p1 --verbose < ../${i} || exit 1 done || exit 1 # Configure: +autoreconf -v ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -105,7 +111,15 @@ done || exit 1 --mandir=/usr/man || exit 1 # Install: -make install && make docs || exit 1 +if [ "$1" = "nodocs" ]; then + make -i install + echo "******************************************************************" + echo "*** Built asciidoc without documentation - expect errors above ***" + echo "******************************************************************" + else + make install docs || exit 1 +fi + find /etc/asciidoc -type f -print0 | xargs -0 chmod 644 # After the build completes, we'll rename the asciidoc config files to '.new' @@ -115,8 +129,13 @@ find /etc/asciidoc -type f -print0 | xargs -0 chmod 644 # Copy docs: mkdir -vpm755 /usr/doc/asciidoc-$ASCIIDOCVER cp -fav \ - BUGS CHANGELOG COPY* README \ + BUGS.txt CHANGELOG.txt COPY* README.asciidoc \ /usr/doc/asciidoc-$ASCIIDOCVER/ +} + +# Build asciidoc without any documentation (man pages). We'll have +# a 2nd pass once we have the pre-requisites installed (docbook-style-xsl) later on: +build_asciidoc nodocs ####################### Build sgml-common ############################ @@ -157,6 +176,7 @@ done --prefix=/usr \ --mandir=/usr/man \ --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ || exit 1 @@ -524,6 +544,7 @@ CXXFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ @@ -738,7 +759,7 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Assemble patch list from spec file: +# Assemble patch list from spec file (and see individual level-2 patch outside of 'for' loop below): # egrep '^Patch[0-9].*: ' *.spec | awk -F: '{print $2" \\"}' # Apply patches: for i in \ @@ -852,6 +873,8 @@ find . \ # Configure: ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ --sysconfdir=/etc \ --localstatedir=/var \ || exit 1 @@ -949,6 +972,7 @@ CXXFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-perllibdir=$installvendorlib \ --mandir=/usr/man \ --with-installed-nsgmls \ @@ -1048,7 +1072,9 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ ./configure \ - --prefix=/usr || exit 1 + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man || exit 1 # Build: make || exit 1 @@ -1132,6 +1158,7 @@ CXXFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --infodir=/usr/info \ --docdir=/usr/doc/docbook2X-$DOCBOOK2XVER \ @@ -1156,6 +1183,11 @@ cp -fav \ AUTHORS COPYING ChangeLog NEWS README THANKS TODO \ /usr/doc/docbook2X-$DOCBOOK2XVER +####################### Build AsciiDoc: Pass 2 of 2 ################# + +# Now build asciidoc with documentation: +build_asciidoc + ####################################################################### # Install the package description and post installation script: |