aboutsummaryrefslogtreecommitdiff
path: root/misc/po4a
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-01-10 20:22:48 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-01-17 09:03:26 +0700
commita9149f6c2d23e7ad1e7efdf48240e51c8475ac78 (patch)
treeabec49c6c8e33634f7b300d0e41fc2b469431d33 /misc/po4a
parentc4bdbf642167229044bd9f8211a302e296a89513 (diff)
misc/po4a: Updated for version 0.65, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/po4a')
-rw-r--r--misc/po4a/README78
-rw-r--r--misc/po4a/README_SBo.txt25
-rw-r--r--misc/po4a/po4a.SlackBuild102
-rw-r--r--misc/po4a/po4a.info10
-rw-r--r--misc/po4a/slack-desc8
5 files changed, 93 insertions, 130 deletions
diff --git a/misc/po4a/README b/misc/po4a/README
index 460ea0c578da..591c93129063 100644
--- a/misc/po4a/README
+++ b/misc/po4a/README
@@ -1,65 +1,31 @@
-po4a - Versatile PO to/from other documentation formats converter
+po4a (convert PO to/from other documentation formats)
po4a (PO for anything) eases translations and their maintenance,
allowing gettext's usage on unexpected areas like documentation.
-In po4a each documentation format is handled by a module, that
-converts this format to/from PO. Formats handled by po4a-0.63
-
-. asciidoc: AsciiDoc format.
-. dia: uncompressed Dia diagrams.
-. docbook: DocBook XML.
-. guide: Gentoo Linux's XML documentation format.
-. ini: INI format.
-. kernelhelp: Help messages of each kernel compilation option.
-. latex: LaTeX format.
-. man: Good old manual page format.
-. pod: Perl Online Documentation format.
-. sgml: either DebianDoc or DocBook DTD.
-. texinfo: The info page format.
-. tex: generic TeX documents (see also latex).
-. text: simple text document.
-. wml: WML documents.
-. xhtml: XHTML documents.
-. xml: generic XML documents (see also docbook).
-. yaml: YAML documents.
+In po4a each documentation format is handled by a module that converts
+this format to/from PO. Formats handled by po4a:
+
+- asciidoc: AsciiDoc format.
+- dia: uncompressed Dia diagrams.
+- docbook: DocBook XML.
+- guide: Gentoo Linux's XML documentation format.
+- ini: INI format.
+- kernelhelp: Help messages of each kernel compilation option.
+- latex: LaTeX format.
+- man: Good old manual page format.
+- pod: Perl Online Documentation format.
+- sgml: either DebianDoc or DocBook DTD.
+- texinfo: The info page format.
+- tex: generic TeX documents (see also latex).
+- text: simple text document.
+- wml: WML documents.
+- xhtml: XHTML documents.
+- xml: generic XML documents (see also docbook).
+- yaml: YAML documents.
man pages are encoded in UTF-8. To read them in other languages than
English, do this for instance:
LANG=ru_RU.utf8 GROFF_ENCODING=utf8 man <man page>
-Dependencies tree is as follows (all dependencies listed are available
-at http://slackbuilds.org).
-
-Po4a-0.63
-|
-|-- perl-Module-Build
-|-- perl-YAML-Tiny. mandatory for the YAML module.
-|-- perl-text-WrapI18N to format po4a's warnings and error messages.
-| | Optional.
-| |-- Text::CharWidth. Mandatory
-|-- perl-Unicode-LineBreak, includes module Unicode::GCString to compute
- text width, neeeded by AsciiDoc to determine two line titles in
- encodings different from ASCII. Mandatory for TEXT module.
- |-- perl-MIME-Charset. Mandatory
- |-- perl-Encode-EUCJPASCII. Optional
- |-- perl-Encode-HanExtra. Optional.
- |-- perl-Encode-JISX0213. Optional
- |-- perl-Encode-ISO2022. Mandatory
-
-In addition, perl-Test-Pod allows to run the test for the POFD format
-
-Note: by default the SlackBuild does not run ./Build test, because these
-tests:
-t/cfg-multi.t
-t/cfg-single.t
-t/cfg-split.t
-fail if the script is run by root or even using fakeroot, which has been
-acknowledged upstream.
-
-All tests have been successfully passed running '/Build test' by the
-maintainer as regular user. If you want to check by yourself, un-comment
-the lines 85 and 86 in the SlackBuild. You will then need to comment
-them out to run the script again as root to actually build the package.
-
-WARNING: run this script with LANG set to an UTF-8 locale.
+See README_SBo.txt for dependency info and build options.
diff --git a/misc/po4a/README_SBo.txt b/misc/po4a/README_SBo.txt
new file mode 100644
index 000000000000..65b0f4cb66c7
--- /dev/null
+++ b/misc/po4a/README_SBo.txt
@@ -0,0 +1,25 @@
+Dependency tree is as follows (all dependencies listed are available
+at http://slackbuilds.org).
+
+po4a
+|
+|-- perl-Module-Build
+|-- perl-YAML-Tiny. mandatory for the YAML module.
+|-- perl-text-WrapI18N to format po4a's warnings and error messages.
+| | Optional.
+| |-- Text::CharWidth. Mandatory
+|-- perl-Unicode-LineBreak, includes module Unicode::GCString to compute
+ text width, neeeded by AsciiDoc to determine two line titles in
+ encodings different from ASCII. Mandatory for TEXT module.
+ |-- perl-MIME-Charset. Mandatory
+ |-- perl-Encode-EUCJPASCII. Optional
+ |-- perl-Encode-HanExtra. Optional.
+ |-- perl-Encode-JISX0213. Optional
+ |-- perl-Encode-ISO2022. Mandatory
+
+In addition, perl-Test-Pod allows running the test for the POFD format.
+
+Note: by default the SlackBuild does not run "./Build test". If
+you want to run the tests, export TESTS=yes in the SlackBuild's
+environment. This will make the package take a few extra minutes to
+build.
diff --git a/misc/po4a/po4a.SlackBuild b/misc/po4a/po4a.SlackBuild
index 30ade7c8e462..02c21b791183 100644
--- a/misc/po4a/po4a.SlackBuild
+++ b/misc/po4a/po4a.SlackBuild
@@ -2,51 +2,37 @@
# Slackware build script for po4a
-# Copyright 2014, 2015, 2018 Didier Spaier Paris, France
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.ritten by Didier Spaier <didier dot spaier at epsm dot fr>
-
-# WARNING: run this script using an UTF-8 locale. If you don't use one
-# usually, run it like this e.g.
-# LC_ALL=en_US.utf8 ./po4a.SlackBuild
+# Originally written by Didier Spaier Paris, France
+# Now maintained by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220110 bkw:
+# - new maintainer.
+# - relicense as WTFPL with permission from Didier.
+# - update for v0.65.
+# - force a UTF-8 locale instead of making it a hoop for the user
+# to notice and jump through.
+# - move some of the details from README to a separate README_SBo.txt.
+# - ARCH=noarch.
+# - run the tests if TESTS=yes, as user nobody so they actually work.
+
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=po4a
-VERSION=${VERSION:-0.63}
+VERSION=${VERSION:-0.65}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM="$(printf $PRGNAM | cut -d- -f2-)"
+# There is no compiled code here.
+ARCH=noarch
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+SRCNAM="$(printf $PRGNAM | cut -d- -f2-)"
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -56,20 +42,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -79,34 +51,34 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$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 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
perl Build.PL \
prefix=/usr \
installdirs=vendor \
destdir=$PKG
./Build
-# ./Build test
-# exit
+
+# 20220110 bkw: Tests fail if run as root. Also they're time-consuming.
+# Run them only if requested, and do it as "nobody".
+if [ "${TESTS:-no}" = "yes" ]; then
+ chown -R nobody:nogroup t
+ su nobody -s /bin/sh -c "./Build test"
+fi
+
./Build install \
--install_path bindoc=/usr/man/man1 \
--install_path libdoc=/usr/man/man3
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
-
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | \
+ xargs rm -f || true
find $PKG -depth -type d -empty -delete || true
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING NEWS README* TODO \
- changelog $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a COPYING NEWS README* TODO changelog $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/misc/po4a/po4a.info b/misc/po4a/po4a.info
index caa17c89edca..878e109a38bb 100644
--- a/misc/po4a/po4a.info
+++ b/misc/po4a/po4a.info
@@ -1,10 +1,10 @@
PRGNAM="po4a"
-VERSION="0.63"
+VERSION="0.65"
HOMEPAGE="https://po4a.org/"
-DOWNLOAD="https://github.com/mquinson/po4a/releases/download/v0.63/po4a-0.63.tar.gz"
-MD5SUM="25881c0a02c1180ffdec4bf452b4ff0f"
+DOWNLOAD="https://github.com/mquinson/po4a/releases/download/v0.65/po4a-0.65.tar.gz"
+MD5SUM="16588d7939e05e9fa3d27cda18d4f3d9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="perl-Pod-Parser perl-Unicode-LineBreak perl-Module-Build perl-YAML-Tiny"
-MAINTAINER="Didier Spaier"
-EMAIL="didier at slint dot fr"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/misc/po4a/slack-desc b/misc/po4a/slack-desc
index d81b32f609a9..b20a4b22def3 100644
--- a/misc/po4a/slack-desc
+++ b/misc/po4a/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-po4a: po4a (PO documentation format converter)
+po4a: po4a (convert PO to/from other documentation formats)
po4a:
po4a: po4a (PO for anything) eases translations and their maintenance,
po4a: allowing gettext's usage on unexpected areas like documentation.
po4a:
po4a: In po4a each documentation format is handled by a module, that
-po4a: converts this format to/from PO. Formats included in po4a-0.63 are:
+po4a: converts this format to/from PO. Formats included in po4a-0.65 are:
po4a: man pages, POD, XML (generic, DocBook, XHTML, Dia, Guide, WML), SGML
-po4a: Tex (generic, LaTeX, Texinfo), text (simple with few formatting,
-po4a: markdown, Asciidoc), INI, KernelHelp
+po4a: Tex (generic, LaTeX, Texinfo), text (simple with no formatting,
+po4a: markdown, or Asciidoc), INI, KernelHelp
po4a: