[617118d] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | # cross-lfs native man build
|
---|
| 4 | # --------------------------
|
---|
| 5 | # $LastChangedBy$
|
---|
| 6 | # $LastChangedDate$
|
---|
| 7 | # $LastChangedRevision$
|
---|
| 8 | # $HeadURL$
|
---|
| 9 | #
|
---|
| 10 |
|
---|
| 11 | cd ${SRC}
|
---|
| 12 | LOG=man-native.log
|
---|
| 13 |
|
---|
| 14 | set_libdirname
|
---|
| 15 | setup_multiarch
|
---|
| 16 |
|
---|
| 17 | unpack_tarball man-${MAN_VER} &&
|
---|
| 18 | cd ${PKGDIR}
|
---|
| 19 |
|
---|
| 20 | # apply the man manpath, pager and 80cols patches
|
---|
| 21 | # The following replaces the below
|
---|
| 22 | # apply_patch man-${MAN_VER}-manpath &&
|
---|
| 23 | # apply_patch man-${MAN_VER}-pager
|
---|
| 24 | # apply_patch man-${MAN_VER}-80cols
|
---|
| 25 | #
|
---|
| 26 | # ( Tested with man-1.5k and man-1.5l )
|
---|
| 27 |
|
---|
| 28 | #apply_patch man-${MAN_VER}-grepsilent
|
---|
| 29 |
|
---|
| 30 | case ${MAN_VER} in
|
---|
| 31 | 1.5[klmn]* )
|
---|
| 32 | # apply the man manpath patch
|
---|
| 33 | test -f src/man.conf.in-ORIG ||
|
---|
| 34 | cp src/man.conf.in src/man.conf.in-ORIG
|
---|
| 35 | sed 's@MANPATH[[:blank:]]/usr/man@#&@' src/man.conf.in-ORIG > src/man.conf.in
|
---|
| 36 |
|
---|
| 37 | # apply the man pager patch
|
---|
| 38 | test -f configure-ORIG ||
|
---|
| 39 | cp configure configure-ORIG
|
---|
| 40 | sed 's@DEFAULTLESSOPT="-is"@DEFAULTLESSOPT="-isR"@' configure-ORIG \
|
---|
| 41 | > configure
|
---|
| 42 |
|
---|
| 43 | # apply the man 80 cols patch
|
---|
| 44 | test -f src/man.c-ORIG ||
|
---|
| 45 | cp src/man.c src/man.c-ORIG
|
---|
| 46 | sed 's@.ll %d.%di@.nr LL %d.%di@' src/man.c-ORIG > src/man.c
|
---|
| 47 |
|
---|
| 48 | # apply the man 80 cols patch
|
---|
| 49 | test -f src/gripes.c-ORIG ||
|
---|
| 50 | cp src/gripes.c src/gripes.c-ORIG
|
---|
| 51 | sed 's@is none$@&\\n\\@g' src/gripes.c-ORIG > src/gripes.c
|
---|
| 52 | ;;
|
---|
| 53 | 1.5p* )
|
---|
| 54 | # apply the man manpath patch
|
---|
| 55 | test -f src/man.conf.in-ORIG ||
|
---|
| 56 | cp src/man.conf.in src/man.conf.in-ORIG
|
---|
| 57 | sed 's@MANPATH[[:blank:]]/usr/man@#&@' src/man.conf.in-ORIG > src/man.conf.in
|
---|
| 58 |
|
---|
| 59 | # apply the man pager patch
|
---|
| 60 | test -f configure-ORIG ||
|
---|
| 61 | cp configure configure-ORIG
|
---|
| 62 | sed 's@DEFAULTLESSOPT="-is"@DEFAULTLESSOPT="-isR"@' configure-ORIG \
|
---|
| 63 | > configure
|
---|
| 64 | ;;
|
---|
| 65 | * )
|
---|
| 66 | echo "###### CHECK MAN SOURCE TO SEE IF IT REQUIRES PATCHING ###"
|
---|
| 67 | ;;
|
---|
| 68 | esac
|
---|
| 69 |
|
---|
| 70 | max_log_init Man ${MAN_VER} "Final (shared)" ${CONFLOGS} ${LOG}
|
---|
| 71 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
| 72 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
| 73 | PATH="${PATH}:/usr/bin:/bin" \
|
---|
| 74 | ./configure -default -confdir=/etc \
|
---|
| 75 | >> ${LOGFILE} 2>&1 &&
|
---|
| 76 | echo " o Configure OK" &&
|
---|
| 77 |
|
---|
| 78 | min_log_init ${BUILDLOGS} &&
|
---|
| 79 | make LDFLAGS="-s" \
|
---|
| 80 | >> ${LOGFILE} 2>&1 &&
|
---|
| 81 | echo " o Build OK" &&
|
---|
| 82 |
|
---|
| 83 | min_log_init ${INSTLOGS} &&
|
---|
| 84 | make install \
|
---|
| 85 | >> ${LOGFILE} 2>&1 &&
|
---|
| 86 | echo " o ALL OK" || barf
|
---|
| 87 |
|
---|