summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-02-13 01:41:07 -0500
committerMike Frysinger <vapier@gentoo.org>2016-02-13 01:42:45 -0500
commit7f548467ce4c0b0d471b8a8e04c5bde56fcf7d29 (patch)
treed10bd5501c04f6afcab93c43f2738b386f840dfb /sys-apps/man2html
parentsys-devel/bison: clarify bison.1 touching (diff)
downloadgentoo-7f548467ce4c0b0d471b8a8e04c5bde56fcf7d29.tar.gz
gentoo-7f548467ce4c0b0d471b8a8e04c5bde56fcf7d29.tar.bz2
gentoo-7f548467ce4c0b0d471b8a8e04c5bde56fcf7d29.zip
sys-apps/man2html: new package #519390
With the migration to man-db, the man2html tool is no longer available as it was included with the canonical man package. Create a dedicated package for this tool since some people want it w/man-db.
Diffstat (limited to 'sys-apps/man2html')
-rw-r--r--sys-apps/man2html/Manifest1
-rw-r--r--sys-apps/man2html/files/man-1.6-cross-compile.patch61
-rw-r--r--sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch61
-rw-r--r--sys-apps/man2html/files/man-1.6g-compress.patch17
-rw-r--r--sys-apps/man2html/man2html-1.6g.ebuild56
-rw-r--r--sys-apps/man2html/metadata.xml8
6 files changed, 204 insertions, 0 deletions
diff --git a/sys-apps/man2html/Manifest b/sys-apps/man2html/Manifest
new file mode 100644
index 000000000000..677fe5cffdaa
--- /dev/null
+++ b/sys-apps/man2html/Manifest
@@ -0,0 +1 @@
+DIST man-1.6g.tar.gz 256906 SHA256 ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f SHA512 c786fa2201aed92293e5590dc3ad5d550cf14e5059fa274ef7719af86ee4c892e747576495b6dc0a09286e73e2f0f0caf860216e0c8032d9ef13e5d26853048b WHIRLPOOL 1b531476108c27a3993023da430831c2d20f8045a51490d559a7f588f0771931defd7a3a745e9f1f03797e681eea8767aad4a27ab9abdd5d06ad935dc96a5020
diff --git a/sys-apps/man2html/files/man-1.6-cross-compile.patch b/sys-apps/man2html/files/man-1.6-cross-compile.patch
new file mode 100644
index 000000000000..265265077a9c
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6-cross-compile.patch
@@ -0,0 +1,61 @@
+Fix up to work with cross-compiling ... most of these tests only
+need to see if the example compiled, not whether it runs ...
+
+--- configure
++++ configure
+@@ -232,15 +232,13 @@
+
+ echo checking for POSIX.1 header files
+ echo "#include <unistd.h>
+-main() {
+ #ifdef _POSIX_VERSION
+-exit(0);
++main() { exit(0); }
+ #else
+-exit(1);
+-#endif
+-}" > conftest.c
++# error no _POSIX_VERSION
++#endif" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ DEFS="$DEFS -DPOSIX"
+ fi
+ rm -f conftest conftest.c
+@@ -249,7 +247,7 @@
+ echo "#include <strings.h>
+ main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else DEFS="$DEFS -DUSG"
+ fi
+ rm -f conftest conftest.c
+@@ -258,7 +256,7 @@
+ echo '#include <sys/types.h>
+ main() { uid_t x; exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else
+ uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
+ DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
+@@ -291,7 +289,7 @@
+ #endif
+ main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
+ elif test -f /usr/lib/libPW.a; then LIBS="$LIBS -lPW"
+ else DEFS="$DEFS -DALLOCA_MISSING"
+@@ -321,7 +319,7 @@
+ struct option long_opts[] = { { "", no_argument, NULL, 0 } };
+ main() { exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ manpathoption="--path"
+ else
+ manpathoption="-w"
diff --git a/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch b/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch
new file mode 100644
index 000000000000..b79b3a1872f1
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch
@@ -0,0 +1,61 @@
+add support for bzip2/lzma to man2html and friends
+
+--- man2html/glimpse_filters
++++ man2html/glimpse_filters
+@@ -1,3 +1,6 @@
++*.bz2 bzip2 -d -c
++*.lzma lzma -d -c
++*.xz xz -d -c
+ *.gz gzip -d -c
+ *.Z gzip -d -c
+
+--- man2html/scripts/cgi-bin/man/man2html
++++ man2html/scripts/cgi-bin/man/man2html
+@@ -93,6 +93,12 @@
+ *.bz2)
+ bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+ ;;
++ *.lzma)
++ lzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
++ *.xz)
++ xzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
+ *)
+ "$MAN2HTML" "$LL" "$PAGE"
+ ;;
+@@ -103,6 +106,12 @@
+ elif [ -r "$PAGE".bz2 ]
+ then
+ bzcat "$PAGE".bz2 | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".lzma ]
++then
++ lzcat "$PAGE".lzma | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".xz ]
++then
++ xzcat "$PAGE".xz | "$MAN2HTML" "$LL" -D "$PAGE"
+ else
+ "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+ fi
+--- man2html/scripts/cgi-bin/man/mansearch
++++ man2html/scripts/cgi-bin/man/mansearch
+@@ -153,7 +153,7 @@
+ }
+ print "<DT> <a href=\"" cgipath "/man2html?" fullname "\">";
+ textname = filename;
+- sub(/\.(gz)|Z|z$/, "", textname);
++ sub(/\.([zZ]|gz|bz2|lzma|xz)$/, "", textname);
+ sub(/\./, "(", textname);
+ textname = textname ")";
+ print textname;
+--- man2html/scripts/cgi-bin/man/mansec
++++ man2html/scripts/cgi-bin/man/mansec
+@@ -128,7 +128,7 @@
+ # Print out alphabetic quick index and other links
+ }
+ # Split page.n into "page" and "n" and generate an entry
+- sub(/[.]([zZ]|(gz))$/, "", manpage);
++ sub(/[.]([zZ]|gz|bz2|lzma|xz)$/, "", manpage);
+ match(manpage, /[.][^.]+$/);
+ title = substr(manpage, 1, RSTART - 1);
+ if (section != "all") {
diff --git a/sys-apps/man2html/files/man-1.6g-compress.patch b/sys-apps/man2html/files/man-1.6g-compress.patch
new file mode 100644
index 000000000000..374d80730074
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6g-compress.patch
@@ -0,0 +1,17 @@
+allow selection of default cache compressor
+
+http://bugs.gentoo.org/205147
+
+--- configure
++++ configure
+@@ -1012,6 +1012,10 @@
+ done
+ done
+
++ if [ x$COMPRESS != x ]; then
++ compress=$COMPRESS
++ fi
++
+ if [ x$default = x ]; then
+ echo ""
+ echo "What program should be used to compress the formatted pages?"
diff --git a/sys-apps/man2html/man2html-1.6g.ebuild b/sys-apps/man2html/man2html-1.6g.ebuild
new file mode 100644
index 000000000000..4da6fb0b5bca
--- /dev/null
+++ b/sys-apps/man2html/man2html-1.6g.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="man-${PV}"
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="!sys-apps/man"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+ epatch "${FILESDIR}"/man-1.6g-compress.patch #205147
+}
+
+echoit() { echo "$@" ; "$@" ; }
+src_configure() {
+ tc-export CC BUILD_CC
+
+ # Just a stub to disable configure check. man2html doesn't use it.
+ export COMPRESS=true
+ echoit \
+ ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang none \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake {src,man2html}/Makefile
+ emake -C src version.h
+ emake -C man2html
+}
+
+src_install() {
+ # A little faster to run this by hand than `emake install`.
+ cd man2html
+ dobin man2html
+ doman man2html.1
+ dodoc README TODO
+}
diff --git a/sys-apps/man2html/metadata.xml b/sys-apps/man2html/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/man2html/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>