the following patch against pcp-2.2.1 adds support for systems
compressing the manpages using bzip2 (like for instance linux
mandrake 8.0) ... i think it should not break anything else
and would really like to see this added (maybe tweaked a bit
to the pcp tree) ... a lot of thanks in advance
t
--- configure.in.org Thu Sep 13 17:03:46 2001
+++ configure.in Thu Sep 13 17:19:16 2001
@@ -184,6 +184,14 @@
gzip=$GZIP
AC_SUBST(gzip)
+dnl check if the bzip2 program is available
+dnl (needed to bzip2 man pages on some platforms)
+test -z "$BZIP2" && AC_PATH_PROG(BZIP2, bzip2, /bin/bzip2)
+test ! -x "$BZIP2" && BZIP2=/usr/local/bin/bzip2
+test ! -x "$BZIP2" && BZIP2=/usr/freeware/bin/bzip2
+bzip2=$BZIP2
+AC_SUBST(bzip2)
+
dnl check if the rpm program is available
test -z "$RPM" && AC_PATH_PROG(RPM, rpm, /bin/rpm)
rpm=$RPM
@@ -749,17 +757,26 @@
then
pcp_man_dir=/usr/share/catman
have_gzipped_manpages=false
+ have_bzip2ed_manpages=false
else
for d in /usr/man /usr/share/man $pcp_share_dir/man
do
if test -f $d/man1/man.1.gz
then
have_gzipped_manpages=true
+ have_bzip2ed_manpages=false
+ pcp_man_dir=$d
+ break
+ elif test -f $d/man1/man.1.bz2
+ then
+ have_gzipped_manpages=false
+ have_bzip2ed_manpages=true
pcp_man_dir=$d
break
- elif test -f $d/man/man.1
+ elif test -f $d/man1/man.1
then
have_gzipped_manpages=false
+ have_bzip2ed_manpages=false
pcp_man_dir=$d
break
fi
@@ -774,6 +791,7 @@
AC_SUBST(pcp_man_dir)
AC_SUBST(have_gzipped_manpages)
+AC_SUBST(have_bzip2ed_manpages)
dnl public binaries
if test -d /usr/bin
--- configure.org Thu Sep 13 16:44:02 2001
+++ configure Thu Sep 13 17:18:47 2001
@@ -1290,6 +1290,41 @@
test ! -x "$GZIP" && GZIP=/usr/freeware/bin/gzip
gzip=$GZIP
+test -z "$BZIP2" && # Extract the first word of "bzip2", so it can be a
program name with args.
+set dummy bzip2; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1257: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$BZIP2" in
+ /*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_BZIP2="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="/bin/bzip2"
+ ;;
+esac
+fi
+BZIP2="$ac_cv_path_BZIP2"
+if test -n "$BZIP2"; then
+ echo "$ac_t""$BZIP2" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
test -z "$RPM" && # Extract the first word of "rpm", so it can be a program
name with args.
set dummy rpm; ac_word=$2
@@ -3518,17 +3553,27 @@
then
pcp_man_dir=/usr/share/catman
have_gzipped_manpages=false
+ have_bzip2ed_manpages=false
else
for d in /usr/man /usr/share/man $pcp_share_dir/man
do
if test -f $d/man1/man.1.gz
then
have_gzipped_manpages=true
+ have_gzipped_manpages=false
pcp_man_dir=$d
break
- elif test -f $d/man/man.1
+ elif test -f $d/man1/man.1.bz2
+ then
+ have_gzipped_manpages=false
+ have_bzip2ed_manpages=true
+ pcp_man_dir=$d
+ break
+ fi
+ elif test -f $d/man1/man.1
then
have_gzipped_manpages=false
+ have_bzip2ed_manpages=false
pcp_man_dir=$d
break
fi
@@ -3975,6 +4020,8 @@
s%@tar@%$tar%g
s%@GZIP@%$GZIP%g
s%@gzip@%$gzip%g
+s%@BZIP2@%$BZIP2%g
+s%@bzip2@%$bzip2%g
s%@RPM@%$RPM%g
s%@rpm@%$rpm%g
s%@rpm_version@%$rpm_version%g
@@ -4012,6 +4059,7 @@
s%@pcp_lib_compat_dir@%$pcp_lib_compat_dir%g
s%@pcp_man_dir@%$pcp_man_dir%g
s%@have_gzipped_manpages@%$have_gzipped_manpages%g
+s%@have_bzip2ed_manpages@%$have_bzip2ed_manpages%g
s%@pcp_bin_dir@%$pcp_bin_dir%g
s%@pcp_inc_dir@%$pcp_inc_dir%g
s%@pcp_rc_dir@%$pcp_rc_dir%g
--- ../pcp-2.2.1.backup/src/include/builddefs.in.org Thu Sep 13 17:02:16 2001
+++ src/include/builddefs.in Thu Sep 13 17:59:02 2001
@@ -108,6 +108,7 @@
MAKEDEPEND= @makedepend@
GZIP = @gzip@
+BZIP2 = @bzip2@
TAR = @tar@
RPM = @rpm@
RPM_VERSION = @rpm_version@
@@ -115,6 +116,7 @@
DPKG = @dpkg@
HAVE_GZIPPED_MANPAGES = @have_gzipped_manpages@
+HAVE_BZIP2ED_MANPAGES = @have_bzip2ed_manpages@
CPP_SIMPLE = @cpp_simple@
CPP_SIMPLE_ARGS = @cpp_simple_args@
RDYNAMIC_FLAG = @rdynamic_flag@
@@ -168,6 +170,9 @@
if $$first; then \
if $(HAVE_GZIPPED_MANPAGES) ; then \
$(GZIP) -c $$d > $$d.gz; _sfx=.gz; \
+ fi; \
+ if $(HAVE_BZIP2ED_MANPAGES) ; then \
+ $(BZIP2) -c $$d > $$d.bz2; _sfx=.bz2; \
fi; \
u=$$m.$(MAN_SECTION)$$_sfx; \
echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
--
thomas graichen <tgr@xxxxxxxxxxx> ... perfection is reached, not
when there is no longer anything to add, but when there is no
longer anything to take away. --- antoine de saint-exupery
|