- rewrite nroff for using -Tencoding with main support of utf8
- Resolves: rhbz#251064
This commit is contained in:
parent
4c00864d74
commit
88c2d0a7f6
@ -3,7 +3,7 @@
|
|||||||
Summary: A document formatting system
|
Summary: A document formatting system
|
||||||
Name: groff
|
Name: groff
|
||||||
Version: 1.18.1.4
|
Version: 1.18.1.4
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
License: GPLv2 and GFDL
|
License: GPLv2 and GFDL
|
||||||
Group: Applications/Publishing
|
Group: Applications/Publishing
|
||||||
URL: http://groff.ffii.org
|
URL: http://groff.ffii.org
|
||||||
@ -35,6 +35,7 @@ Patch23: groff-1.18.1.1-spacefix.patch
|
|||||||
Patch24: groff-1.18.1.4-sectmp.patch
|
Patch24: groff-1.18.1.4-sectmp.patch
|
||||||
Patch25: groff-1.18.1.4-grofferpath.patch
|
Patch25: groff-1.18.1.4-grofferpath.patch
|
||||||
Patch26: groff-1.18.1.4-gcc4.3.0.patch
|
Patch26: groff-1.18.1.4-gcc4.3.0.patch
|
||||||
|
Patch27: nroff.patch
|
||||||
|
|
||||||
Requires: mktemp
|
Requires: mktemp
|
||||||
Requires: /sbin/install-info
|
Requires: /sbin/install-info
|
||||||
@ -103,6 +104,7 @@ System display.
|
|||||||
%patch24 -p1 -b .sectmp
|
%patch24 -p1 -b .sectmp
|
||||||
%patch25 -p1 -b .grofferpath
|
%patch25 -p1 -b .grofferpath
|
||||||
%patch26 -p1 -b .gcc43
|
%patch26 -p1 -b .gcc43
|
||||||
|
%patch27
|
||||||
|
|
||||||
for i in contrib/mm/{groff_mm,groff_mmse,mmroff}.man \
|
for i in contrib/mm/{groff_mm,groff_mmse,mmroff}.man \
|
||||||
src/devices/grolbp/grolbp.man; do
|
src/devices/grolbp/grolbp.man; do
|
||||||
@ -241,6 +243,10 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 23 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.18.1.4-12
|
||||||
|
- rewrite nroff for using -Tencoding with main support of utf8
|
||||||
|
- Resolves: rhbz#251064
|
||||||
|
|
||||||
* Thu Jan 3 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.18.1.4-11
|
* Thu Jan 3 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.18.1.4-11
|
||||||
- fix for gcc4.3.0
|
- fix for gcc4.3.0
|
||||||
|
|
||||||
|
61
nroff
61
nroff
@ -6,51 +6,6 @@ charset_in=iso-8859-1
|
|||||||
charset_out=`locale charmap 2>/dev/null`
|
charset_out=`locale charmap 2>/dev/null`
|
||||||
opts="-mtty-char -Tutf8"
|
opts="-mtty-char -Tutf8"
|
||||||
|
|
||||||
# Default device.
|
|
||||||
# First try the "locale charmap" command, because it's most reliable.
|
|
||||||
# On systems where it doesn't exist, look at the environment variables.
|
|
||||||
case "`locale charmap 2>/dev/null`" in
|
|
||||||
UTF-8)
|
|
||||||
T=-Tutf8 ;;
|
|
||||||
ISO-8859-1)
|
|
||||||
T=-Tlatin1 ;;
|
|
||||||
IBM-1047)
|
|
||||||
T=-Tcp1047 ;;
|
|
||||||
EUC-JP)
|
|
||||||
T=-Tnippon ;;
|
|
||||||
EUC-KR)
|
|
||||||
T=-Tkorean ;;
|
|
||||||
*)
|
|
||||||
case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
|
|
||||||
*.UTF-8)
|
|
||||||
T=-Tutf8 ;;
|
|
||||||
iso_8859_1 | *.ISO-8859-1)
|
|
||||||
T=-Tlatin1 ;;
|
|
||||||
*.IBM-1047)
|
|
||||||
T=-Tcp1047 ;;
|
|
||||||
ja_JP.ujis | ja_JP.eucJP)
|
|
||||||
T=-Tnippon ;;
|
|
||||||
ko_KR.eucKR)
|
|
||||||
T=-Tkorean ;;
|
|
||||||
*)
|
|
||||||
case "$LESSCHARSET" in
|
|
||||||
utf-8)
|
|
||||||
T=-Tutf8 ;;
|
|
||||||
latin1)
|
|
||||||
T=-Tlatin1 ;;
|
|
||||||
cp1047)
|
|
||||||
T=-Tcp1047 ;;
|
|
||||||
japanese)
|
|
||||||
T=-Tnippon ;;
|
|
||||||
ko)
|
|
||||||
T=-Tkorean ;;
|
|
||||||
*)
|
|
||||||
T=-Tascii8 ;;
|
|
||||||
esac ;;
|
|
||||||
esac ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
@ -58,19 +13,16 @@ do
|
|||||||
opts="$opts -P-c" ;;
|
opts="$opts -P-c" ;;
|
||||||
-h)
|
-h)
|
||||||
opts="$opts -P-h" ;;
|
opts="$opts -P-h" ;;
|
||||||
-[eq] | -s*)
|
|
||||||
# ignore these options
|
|
||||||
;;
|
|
||||||
-[mrnoT])
|
-[mrnoT])
|
||||||
echo $"option $1 requires an argument" >&2
|
echo $"option $1 requires an argument" >&2
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
-[iptSUC] | -[mrno]*)
|
-[iptSUC] | -[mrno]*)
|
||||||
opts="$opts $1" ;;
|
opts="$opts $1" ;;
|
||||||
-Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
|
-Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
|
||||||
opts=
|
T=$1 ;
|
||||||
T=$1 ;;
|
opts="-mtty-char $T";;
|
||||||
-T*)
|
-[eq] | -s* | -u* | -T*)
|
||||||
# ignore other devices
|
# ignore other devices
|
||||||
;;
|
;;
|
||||||
-v | --version)
|
-v | --version)
|
||||||
echo $"GNU nroff (groff) with Red Hat i18n/l10n support"
|
echo $"GNU nroff (groff) with Red Hat i18n/l10n support"
|
||||||
@ -120,7 +72,6 @@ export LC_ALL=en_US.UTF-8
|
|||||||
|
|
||||||
# This shell script is intended for use with man, so warnings are
|
# This shell script is intended for use with man, so warnings are
|
||||||
# probably not wanted. Also load nroff-style character definitions.
|
# probably not wanted. Also load nroff-style character definitions.
|
||||||
|
|
||||||
if [ $charset_in = utf-8 -a $charset_out = UTF-8 ]; then
|
if [ $charset_in = utf-8 -a $charset_out = UTF-8 ]; then
|
||||||
if [ $TMPFILE = buf ]; then
|
if [ $TMPFILE = buf ]; then
|
||||||
echo -n "$buf" | /usr/bin/groff $opts 2>/dev/null
|
echo -n "$buf" | /usr/bin/groff $opts 2>/dev/null
|
||||||
@ -140,7 +91,7 @@ else
|
|||||||
/usr/bin/groff $opts 2>/dev/null | \
|
/usr/bin/groff $opts 2>/dev/null | \
|
||||||
/usr/bin/iconv -f utf-8 -t ${charset_out}//translit
|
/usr/bin/iconv -f utf-8 -t ${charset_out}//translit
|
||||||
|
|
||||||
rm -f $TMPFILE
|
rm -f $TMPFILE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
97
nroff.patch
Normal file
97
nroff.patch
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
diff -up ./nroff.old ./nroff
|
||||||
|
--- ./nroff.old 2007-08-16 16:11:35.000000000 +0200
|
||||||
|
+++ ./nroff 2008-01-23 14:22:19.000000000 +0100
|
||||||
|
@@ -6,51 +6,6 @@ charset_in=iso-8859-1
|
||||||
|
charset_out=`locale charmap 2>/dev/null`
|
||||||
|
opts="-mtty-char -Tutf8"
|
||||||
|
|
||||||
|
-# Default device.
|
||||||
|
-# First try the "locale charmap" command, because it's most reliable.
|
||||||
|
-# On systems where it doesn't exist, look at the environment variables.
|
||||||
|
-case "`locale charmap 2>/dev/null`" in
|
||||||
|
- UTF-8)
|
||||||
|
- T=-Tutf8 ;;
|
||||||
|
- ISO-8859-1)
|
||||||
|
- T=-Tlatin1 ;;
|
||||||
|
- IBM-1047)
|
||||||
|
- T=-Tcp1047 ;;
|
||||||
|
- EUC-JP)
|
||||||
|
- T=-Tnippon ;;
|
||||||
|
- EUC-KR)
|
||||||
|
- T=-Tkorean ;;
|
||||||
|
- *)
|
||||||
|
- case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
|
||||||
|
- *.UTF-8)
|
||||||
|
- T=-Tutf8 ;;
|
||||||
|
- iso_8859_1 | *.ISO-8859-1)
|
||||||
|
- T=-Tlatin1 ;;
|
||||||
|
- *.IBM-1047)
|
||||||
|
- T=-Tcp1047 ;;
|
||||||
|
- ja_JP.ujis | ja_JP.eucJP)
|
||||||
|
- T=-Tnippon ;;
|
||||||
|
- ko_KR.eucKR)
|
||||||
|
- T=-Tkorean ;;
|
||||||
|
- *)
|
||||||
|
- case "$LESSCHARSET" in
|
||||||
|
- utf-8)
|
||||||
|
- T=-Tutf8 ;;
|
||||||
|
- latin1)
|
||||||
|
- T=-Tlatin1 ;;
|
||||||
|
- cp1047)
|
||||||
|
- T=-Tcp1047 ;;
|
||||||
|
- japanese)
|
||||||
|
- T=-Tnippon ;;
|
||||||
|
- ko)
|
||||||
|
- T=-Tkorean ;;
|
||||||
|
- *)
|
||||||
|
- T=-Tascii8 ;;
|
||||||
|
- esac ;;
|
||||||
|
- esac ;;
|
||||||
|
-esac
|
||||||
|
-
|
||||||
|
-
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
case $1 in
|
||||||
|
@@ -58,19 +13,16 @@ do
|
||||||
|
opts="$opts -P-c" ;;
|
||||||
|
-h)
|
||||||
|
opts="$opts -P-h" ;;
|
||||||
|
- -[eq] | -s*)
|
||||||
|
- # ignore these options
|
||||||
|
- ;;
|
||||||
|
-[mrnoT])
|
||||||
|
echo $"option $1 requires an argument" >&2
|
||||||
|
exit 1 ;;
|
||||||
|
-[iptSUC] | -[mrno]*)
|
||||||
|
opts="$opts $1" ;;
|
||||||
|
- -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
|
||||||
|
- opts=
|
||||||
|
- T=$1 ;;
|
||||||
|
- -T*)
|
||||||
|
- # ignore other devices
|
||||||
|
+ -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
|
||||||
|
+ T=$1 ;
|
||||||
|
+ opts="-mtty-char $T";;
|
||||||
|
+ -[eq] | -s* | -u* | -T*)
|
||||||
|
+ # ignore other devices
|
||||||
|
;;
|
||||||
|
-v | --version)
|
||||||
|
echo $"GNU nroff (groff) with Red Hat i18n/l10n support"
|
||||||
|
@@ -120,7 +72,6 @@ export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
# This shell script is intended for use with man, so warnings are
|
||||||
|
# probably not wanted. Also load nroff-style character definitions.
|
||||||
|
-
|
||||||
|
if [ $charset_in = utf-8 -a $charset_out = UTF-8 ]; then
|
||||||
|
if [ $TMPFILE = buf ]; then
|
||||||
|
echo -n "$buf" | /usr/bin/groff $opts 2>/dev/null
|
||||||
|
@@ -140,7 +91,7 @@ else
|
||||||
|
/usr/bin/groff $opts 2>/dev/null | \
|
||||||
|
/usr/bin/iconv -f utf-8 -t ${charset_out}//translit
|
||||||
|
|
||||||
|
- rm -f $TMPFILE
|
||||||
|
+ rm -f $TMPFILE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user