Update man 1.6g patch

Mostly fixes for using the correct paths for package management, like
not using absolute paths for the tools that man invokes, and using
the correct man search paths.

Displayed man pages contain uninterpreted escape sequences. It works
correctly when adding the '-r' option to DEFAULTLESSOPT (or piping to
"less -irs"), but the comment for this variable explicitly notes that
having to do that hints toward a broken setup. So I didn't do that and
we'll see later whether the current Haiku does better.
This commit is contained in:
Ingo Weinhold
2013-04-24 15:47:39 +02:00
parent c849f5886d
commit 27fd02eaf4

View File

@@ -1,35 +1,81 @@
diff -up man-1.6g/configure.orig man-1.6g/configure
--- man-1.6g/configure.orig 2010-12-31 13:28:46.006291456 -0700
+++ man-1.6g/configure 2012-05-02 21:57:49.683147264 -0600
@@ -287,6 +287,12 @@ if test -f /xenix; then
esac
fi
+echo checking for Haiku
+if test `uname` = "Haiku"; then
+ LIBS="$LIBS -L/boot/system/lib -llocale"
+ mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man
+fi
+
echo checking how to get alloca
echo '
#ifdef __GNUC__
diff -up man-1.6g/man2html/Makefile.in.orig man-1.6g/man2html/Makefile.in
--- man-1.6g/man2html/Makefile.in.orig 2010-12-31 13:28:46.010747904 -0700
+++ man-1.6g/man2html/Makefile.in 2012-05-02 21:58:50.621805568 -0600
@@ -2,7 +2,7 @@ CC = @CC@
diff -ur man-1.6g.orig/configure man-1.6g/configure
--- man-1.6g.orig/configure 2010-12-31 21:28:46.004194304 +0100
+++ man-1.6g/configure 2013-04-24 15:24:06.851968000 +0200
@@ -411,7 +411,7 @@
do
if test -f $j/$i
then
- eval F$i=$j/$i
+ eval F$i=$i
break
fi
done
@@ -455,7 +455,7 @@
do
if test -f $j/$i
then
- eval F$i=$j/$i
+ eval F$i=$i
break
fi
done
@@ -468,7 +468,7 @@
do
if test -f $j/$i
then
- eval Fg$i=$j/$i
+ eval Fg$i=$i
break
fi
done
@@ -1026,7 +1026,7 @@
do
if test -f $j/$i
then
- eval F$i=$j/$i
+ eval F$i=$i
if [ x$compress = x ]; then compress=$j/$i; fi
break
fi
@@ -1124,7 +1124,7 @@
do
if test -f $j/$i
then
- eval F$i=$j/$i
+ eval F$i=$i
break
fi
done
@@ -1368,6 +1368,11 @@
s,@man_config_file@,$man_config_file,
s,@manpathoption@,$manpathoption,
s/@sections@/$sections/
+s,@haikuSystemManDir@,`finddir B_SYSTEM_DOCUMENTATION_DIRECTORY`/man,
+s,@haikuCommonManDir@,`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man,
+s,@haikuCommonNonPackagedManDir@,`finddir B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY`/man,
+s,@haikuUserManDir@,`finddir B_USER_DOCUMENTATION_DIRECTORY`/man,
+s,@haikuUserNonPackagedManDir@,`finddir B_USER_NONPACKAGED_DOCUMENTATION_DIRECTORY`/man,
' $infile.in >> $infile
done
EOS
diff -ur man-1.6g.orig/man2html/Makefile.in man-1.6g/man2html/Makefile.in
--- man-1.6g.orig/man2html/Makefile.in 2010-12-31 21:28:46.008912896 +0100
+++ man-1.6g/man2html/Makefile.in 2013-04-24 15:25:28.619970560 +0200
@@ -2,8 +2,8 @@
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
EXEEXT = @EXEEXT@
-bindir = $(DESTDIR)$(PREFIX)/usr/bin
+bindir = $(DESTDIR)$(PREFIX)/bin
mandir = $(DESTDIR)$(PREFIX)@mandir@
-mandir = $(DESTDIR)$(PREFIX)@mandir@
+bindir = $(DESTDIR)@bindir@
+mandir = $(DESTDIR)@mandir@
vardir = $(DESTDIR)$(PREFIX)/var
httpdir = $(DESTDIR)$(PREFIX)/home/httpd
diff -up man-1.6g/src/Makefile.in.orig man-1.6g/src/Makefile.in
--- man-1.6g/src/Makefile.in.orig 2010-12-31 13:28:46.006815744 -0700
+++ man-1.6g/src/Makefile.in 2012-05-02 21:59:22.845938688 -0600
@@ -30,6 +30,8 @@ LDFLAGS ?= -s
cgiowner = nobody
diff -ur man-1.6g.orig/src/Makefile.in man-1.6g/src/Makefile.in
--- man-1.6g.orig/src/Makefile.in 2010-12-31 21:28:46.004718592 +0100
+++ man-1.6g/src/Makefile.in 2013-04-24 13:18:00.114032640 +0200
@@ -30,6 +30,8 @@
LIBOBJS = @LIBOBJS@
@@ -38,10 +84,10 @@ diff -up man-1.6g/src/Makefile.in.orig man-1.6g/src/Makefile.in
all: man$(EXEEXT) man.conf apropos whatis makewhatis
MANOBJS = man.o manfile.o manpath.o man-config.o man-getopt.o \
diff -up man-1.6g/src/man.conf.in.orig man-1.6g/src/man.conf.in
--- man-1.6g/src/man.conf.in.orig 2010-10-25 18:22:24.008388608 -0600
+++ man-1.6g/src/man.conf.in 2012-05-02 21:57:49.699400192 -0600
@@ -36,11 +36,14 @@
diff -ur man-1.6g.orig/src/man.conf.in man-1.6g/src/man.conf.in
--- man-1.6g.orig/src/man.conf.in 2010-10-26 02:22:24.006553600 +0200
+++ man-1.6g/src/man.conf.in 2013-04-24 14:34:03.149946368 +0200
@@ -36,11 +36,11 @@
#
# Every automatically generated MANPATH includes these fields
#
@@ -50,18 +96,15 @@ diff -up man-1.6g/src/man.conf.in.orig man-1.6g/src/man.conf.in
-MANPATH /usr/local/man
-MANPATH /usr/local/share/man
-MANPATH /usr/X11R6/man
+MANPATH /boot/common/man
+MANPATH /boot/common/share/man
+MANPATH /boot/home/config/man
+MANPATH /boot/home/config/share/man
+MANPATH /boot/common/*/man
+MANPATH /boot/common/*/share/man
+MANPATH /boot/home/config/*/man
+MANPATH /boot/home/config/*/share/man
+MANPATH @haikuUserNonPackagedManDir@
+MANPATH @haikuUserManDir@
+MANPATH @haikuCommonNonPackagedManDir@
+MANPATH @haikuCommonManDir@
+MANPATH @haikuSystemManDir@
#
# Uncomment if you want to include one of these by default
#
@@ -58,15 +61,9 @@ MANPATH /usr/X11R6/man
@@ -58,15 +58,7 @@
# in the mandatory manpath already, but will keep man from statting
# lots of other nearby files and directories.
#
@@ -74,9 +117,7 @@ diff -up man-1.6g/src/man.conf.in.orig man-1.6g/src/man.conf.in
-MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
-MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
-MANPATH_MAP /usr/bin/mh /usr/share/man
+MANPATH_MAP /bin /boot/common/share/man
+MANPATH_MAP /boot/common/bin /boot/common/share/man
+MANPATH_MAP /boot/home/config/bin /boot/home/config/share/man
+MANPATH_MAP /bin @haikuSystemManDir@
#
# NOAUTOPATH keeps man from automatically adding directories that look like
# manual page directories to the path.