man: updated to 1.6f, fixed patches

Rebased patches for 1.6f:
  - lzma - modified for xz support
  - ro_usr & whatis2 fixed up

Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Saul Wold
2010-12-29 22:32:25 -08:00
committed by Richard Purdie
parent c0e6d3ea6a
commit 8494db7478
33 changed files with 200 additions and 249 deletions

View File

@@ -1,142 +0,0 @@
diff -Naurp man-1.6e/configure man-1.6e.oden/configure
--- man-1.6e/configure 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/configure 2008-12-21 19:20:32.000000000 +0100
@@ -1027,7 +1027,7 @@ then
then
DO_COMPRESSION=true
compress=
- for i in bzip2 gzip bzip tzip pack compress freeze yabba
+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
do
eval F$i=missing
for j in $DEFPATH
@@ -1080,6 +1080,8 @@ then
fi
case $compress in
+ *xz*) ext=".xz" ;;
+ *lzma*) ext=".lzma" ;;
*bzip2*) ext=".bz2" ;;
*gzip*) ext=".gz" ;;
*bzip*) ext=".bz" ;;
@@ -1122,7 +1124,7 @@ then
fi
# unconditionally handle uncompression
-UNCOMPRESSORS="gunzip bzip2 pcat zcat fcat unyabba"
+UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
for i in $UNCOMPRESSORS
do
eval F$i=missing
@@ -1143,6 +1146,14 @@ bzip2=missing
if [ $Fbzip2 != missing ]; then
bzip2="$Fbzip2 -c -d"
fi
+unxz=missing
+if [ $Funxz != missing ]; then
+ unxz="$Funxz -c -d"
+fi
+unlzma=missing
+if [ $Funlzma != missing ]; then
+ unlzma="$Funlzma -c -d"
+fi
pcat="$Fpcat"
zcat="$Fzcat"
fcat="$Ffcat"
@@ -1171,6 +1181,12 @@ if [ x$default = x ]; then
bzip2)
echo "Command to use for .bz2 files (standard bzip2)"
echo $n "[`eval echo \\$$filter`] $c" ;;
+ xz)
+ echo "Command to use for .xz files (standard xz)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ lzma)
+ echo "Command to use for .lzma files (standard lzma)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
pcat)
echo "Command to use for .z files (pack/unpack)"
echo $n "[`eval echo \\$$filter`] $c" ;;
@@ -1232,6 +1248,8 @@ fi
case $compress_ext in
.gz) decompress=$gunzip ;;
.bz2) decompress=$bzip2 ;;
+ .xz) decompress=$unlzma ;;
+ .lzma) decompress=$unlzma ;;
.z) decompress=$pcat ;;
.Z) decompress=$zcat ;;
.F) decompress=$fcat ;;
@@ -1319,6 +1337,8 @@ s,@pcat@,$pcat,
s,@zcat@,$zcat,
s,@gunzip@,$gunzip,
s,@bzip2@,$bzip2,
+s,@unlzma@,$unlzma,
+s,@unxz@,$unxz,
s,@unyabba@,$unyabba,
s,@compress@,$compress,
s,@compress_ext@,$compress_ext,
diff -Naurp man-1.6e/src/makewhatis.sh man-1.6e.oden/src/makewhatis.sh
--- man-1.6e/src/makewhatis.sh 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/src/makewhatis.sh 2008-12-21 19:20:32.000000000 +0100
@@ -220,7 +220,7 @@ do
find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
function readline() {
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
result = (pipe_cmd | getline);
if (result < 0) {
print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
@@ -235,7 +235,7 @@ do
}
function closeline() {
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
return close(pipe_cmd);
} else {
return close(filename);
@@ -254,7 +254,11 @@ do
match(filename,"\\.z$") || match(filename,"\\.gz$");
if (!use_zcat)
use_bzcat = match(filename,"\\.bz2");
- if (use_zcat || use_bzcat) {
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+ if(!use_lzcat)
+ use_xzcat = match(filename,"\\.xz");
+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
filename_no_gz = substr(filename, 0, RSTART - 1);
} else {
filename_no_gz = filename;
@@ -267,12 +271,16 @@ do
actual_section = section;
}
sub(/\..*/, "", progname);
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
if (use_zcat) {
pipe_cmd = "zcat \"" filename "\"";
- } else {
+ } else if (use_bzcat) {
pipe_cmd = "bzcat \"" filename "\"";
- }
+ } else if (use_lzcat) {
+ pipe_cmd = "lzcat \"" filename "\"";
+ } else {
+ pipe_cmd = "xzcat \"" filename "\"";
+ }
# try to avoid suspicious stuff
if (filename ~ /[;&|`$(]/) {
print "ignored strange file name " filename " in " curdir > "/dev/stderr";
diff -Naurp man-1.6e/src/man.conf.in man-1.6e.oden/src/man.conf.in
--- man-1.6e/src/man.conf.in 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/src/man.conf.in 2008-12-21 19:20:32.000000000 +0100
@@ -139,6 +139,8 @@ MANSECT @sections@
#
.gz @gunzip@
.bz2 @bzip2@
+.lzma @unlzma@
+.xz @unxz@
.z @pcat@
.Z @zcat@
.F @fcat@

View File

@@ -1,67 +0,0 @@
--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:54:57.000000000 -0300
@@ -124,7 +124,7 @@
continue;;
-s) setsections=1
continue;;
- -u) findarg="-ctime 0"
+ -u) findarg="-newer /var/cache/man/whatis"
update=1
continue;;
-v) verbose=1
@@ -165,14 +165,7 @@
# first truncate all the whatis files that will be created new,
# then only update - we might visit the same directory twice
if [ x$update = x ]; then
- for pages in man cat
- do
- eval path="\$$pages"path
- for mandir in $path
- do
- cp /dev/null $mandir/whatis
- done
- done
+ cp /dev/null /var/cache/man/whatis
fi
for pages in man cat
@@ -184,11 +177,6 @@
if [ x$verbose != x ]; then
echo "about to enter $mandir" > /dev/stderr
fi
- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
- if [ x$verbose != x ]; then
- echo skipping $mandir - we did it already > /dev/stderr
- fi
- else
here=`pwd`
cd $mandir
for i in $sections
@@ -407,23 +395,14 @@
cd $here
- # kludge for Slackware's /usr/man/preformat
- if [ $mandir = /usr/man/preformat ]
- then
- mandir1=/usr/man
- else
- mandir1=$mandir
- fi
-
- if [ -f ${mandir1}/whatis ]
+ if [ -f /var/cache/man/whatis ]
then
- cat ${mandir1}/whatis >> $TMPFILE
+ cat /var/cache/man/whatis >> $TMPFILE
fi
- tr -s '\n' < $TMPFILE | sort -u > ${mandir1}/whatis
+ tr -s '\n' < $TMPFILE | sort -u > /var/cache/man/whatis
- chmod 644 ${mandir1}/whatis
+ chmod 644 /var/cache/man/whatis
rm $TMPFILE
- fi
done
done

View File

@@ -1,37 +0,0 @@
--- man-1.6e-ro_usr/src/makewhatis.sh 2007-05-18 11:41:50.000000000 -0300
+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:27:16.000000000 -0300
@@ -162,10 +162,15 @@
fi
catpath=`echo ${catpath} | tr : ' '`
+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
+
# first truncate all the whatis files that will be created new,
# then only update - we might visit the same directory twice
if [ x$update = x ]; then
- cp /dev/null /var/cache/man/whatis
+ mkdir -p $WHATIS_DIR/
+ /bin/echo -n > $WHATIS_DIR/whatis
fi
for pages in man cat
@@ -395,13 +400,13 @@
cd $here
- if [ -f /var/cache/man/whatis ]
+ if [ -f $WHATIS_DIR/whatis ]
then
- cat /var/cache/man/whatis >> $TMPFILE
+ cat $WHATIS_DIR/whatis >> $TMPFILE
fi
- tr -s '\n' < $TMPFILE | sort -u > /var/cache/man/whatis
+ tr -s '\n' < $TMPFILE | sort -u > $WHATIS_DIR/whatis
- chmod 644 /var/cache/man/whatis
+ chmod 644 $WHATIS_DIR/whatis
rm $TMPFILE
done
done

View File

@@ -0,0 +1,120 @@
Index: man-1.6f/configure
===================================================================
--- man-1.6f.orig/configure 2010-12-29 14:00:35.000000000 -0800
+++ man-1.6f/configure 2010-12-29 14:27:57.584431711 -0800
@@ -1027,7 +1027,7 @@
then
DO_COMPRESSION=true
compress=
- for i in lzma bzip2 gzip bzip tzip pack compress freeze yabba
+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
do
eval F$i=missing
for j in $DEFPATH
@@ -1080,6 +1080,7 @@
fi
case $compress in
+ *xz*) ext=".xz" ;;
*lzma*) ext=".lzma" ;;
*bzip2*) ext=".bz2" ;;
*gzip*) ext=".gz" ;;
@@ -1123,7 +1124,7 @@
fi
# unconditionally handle uncompression
-UNCOMPRESSORS="unlzma gunzip bzip2 pcat zcat fcat unyabba"
+UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
for i in $UNCOMPRESSORS
do
eval F$i=missing
@@ -1144,6 +1145,10 @@
if [ $Fbzip2 != missing ]; then
bzip2="$Fbzip2 -c -d"
fi
+unxz=missing
+if [ $Funxz != missing ]; then
+ unxz="$Funxz -c -d"
+fi
unlzma=missing
if [ $Funlzma != missing ]; then
unlzma="$Funlzma -c -d"
@@ -1176,6 +1181,9 @@
bzip2)
echo "Command to use for .bz2 files (standard bzip2)"
echo $n "[`eval echo \\$$filter`] $c" ;;
+ xz)
+ echo "Command to use for .xz files (standard xz)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
lzma)
echo "Command to use for .lzma files (standard lzma)"
echo $n "[`eval echo \\$$filter`] $c" ;;
@@ -1240,6 +1248,7 @@
case $compress_ext in
.gz) decompress=$gunzip ;;
.bz2) decompress=$bzip2 ;;
+ .xz) decompress=$unxz ;;
.lzma) decompress=$unlzma ;;
.z) decompress=$pcat ;;
.Z) decompress=$zcat ;;
@@ -1333,6 +1342,7 @@
s,@zcat@,$zcat,
s,@gunzip@,$gunzip,
s,@bzip2@,$bzip2,
+s,@unxz@,$unxz,
s,@unlzma@,$unlzma,
s,@unyabba@,$unyabba,
s,@compress@,$compress,
Index: man-1.6f/src/makewhatis.sh
===================================================================
--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 14:00:35.000000000 -0800
+++ man-1.6f/src/makewhatis.sh 2010-12-29 14:16:18.821555314 -0800
@@ -242,7 +242,7 @@
find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
function readline() {
- if (use_zcat || use_bzcat || use_lzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
result = (pipe_cmd | getline);
if (result < 0) {
print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
@@ -257,7 +257,7 @@
}
function closeline() {
- if (use_zcat || use_bzcat || use_lzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
return close(pipe_cmd);
} else {
return close(filename);
@@ -278,7 +278,9 @@
use_bzcat = match(filename,"\\.bz2");
if(!use_bzcat)
use_lzcat = match(filename,"\\.lzma");
- if (use_zcat || use_bzcat || use_lzcat ) {
+ if(!use_xzcat)
+ use_xzcat = match(filename,"\\.xz");
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat ) {
filename_no_gz = substr(filename, 0, RSTART - 1);
} else {
filename_no_gz = filename;
@@ -291,14 +293,16 @@
actual_section = section;
}
sub(/\..*/, "", progname);
- if (use_zcat || use_bzcat || use_lzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
if (use_zcat) {
pipe_cmd = "zcat \"" filename "\"";
} else if (use_bzcat) {
pipe_cmd = "bzcat \"" filename "\"";
- } else {
+ } else if (use_lzcat) {
pipe_cmd = "lzcat \"" filename "\"";
- }
+ } else {
+ pipe_cmd = "xzcat \"" filename "\"";
+ }
# try to avoid suspicious stuff
if (filename ~ /[;&|`$(]/) {
print "ignored strange file name " filename " in " curdir > "/dev/stderr";

View File

@@ -0,0 +1,29 @@
Index: man-1.6f/src/makewhatis.sh
===================================================================
--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800
+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800
@@ -124,7 +124,7 @@
continue;;
-s) setsections=1
continue;;
- -u) findarg="-ctime 0"
+ -u) findarg="-newer /var/cache/man/whatis"
update=1
continue;;
-v) verbose=1
@@ -165,14 +165,7 @@
# first truncate all the whatis files that will be created new,
# then only update - we might visit the same directory twice
if [ x$update = x ]; then
- for pages in man cat
- do
- eval path="\$$pages"path
- for mandir in $path
- do
- cp /dev/null $mandir/whatis
- done
- done
+ cp /dev/null /var/cache/man/whatis
fi
for pages in man cat

View File

@@ -0,0 +1,48 @@
Index: man-1.6f/src/makewhatis.sh
===================================================================
--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800
+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800
@@ -164,10 +164,15 @@
fi
catpath=`echo ${catpath} | tr : ' '`
+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
+
# first truncate all the whatis files that will be created new,
# then only update - we might visit the same directory twice
if [ x$update = x ]; then
- cp /dev/null /var/cache/man/whatis
+ mkdir -p $WHATIS_DIR/
+ /bin/echo -n > $WHATIS_DIR/whatis
fi
for pages in man cat
@@ -180,13 +185,7 @@
echo "about to enter $mandir" > /dev/stderr
fi
- # kludge for Slackware's /usr/man/preformat
- if [ $mandir = /usr/man/preformat ]
- then
- mandir1=/usr/man
- else
- mandir1=$mandir
- fi
+ mandir1=$WHATIS_DIR
# if $mandir is on a readonly partition, and the whatis file
# is not a symlink, then let's skip trying to update it
@@ -207,11 +206,6 @@
fi
fi
- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
- if [ x$verbose != x ]; then
- echo skipping $mandir - we did it already > /dev/stderr
- fi
- else
here=`pwd`
cd $mandir
for i in $sections

View File

@@ -10,7 +10,7 @@ DEPENDS = "groff less"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
SRC_URI = "http://primates.ximian.com/~flucifredi/man/man-1.6e.tar.gz \
SRC_URI = "http://primates.ximian.com/~flucifredi/${PN}/${PN}-${PV}.tar.gz \
file://man-1.5k-confpath.patch;striplevel=0 \
file://man-1.5h1-make.patch;striplevel=1 \
file://man-1.5k-nonascii.patch;striplevel=1 \
@@ -38,8 +38,8 @@ SRC_URI = "http://primates.ximian.com/~flucifredi/man/man-1.6e.tar.gz \
file://man-1.6e-lzma+xz-support.patch;striplevel=1 \
file://man*"
SRC_URI[md5sum] = "d8187cd756398baefc48ba7d60ff6a8a"
SRC_URI[sha256sum] = "022faf23844eabb3662eabb105836925dd83bedda10271e2450a5bc5b61a5b5f"
SRC_URI[md5sum] = "67aaaa6df35215e812fd7d89472c44b6"
SRC_URI[sha256sum] = "9f208c7e1981371ad4481d6e6c2c566bc726a15778723f94136d220fb9375f6c"
do_configure () {