OBS User unknown 2009-02-03 22:08:31 +00:00 committed by Git OBS Bridge
parent bb13582c1f
commit c93aa919e8
4 changed files with 67 additions and 64 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 02 18:47:32 CET 2009 - mfabian@suse.de
- bnc#470921: add more workarounds for Korean to fix the truncation
of some non-Korean man-pages in ko_KR.UTF-8 locale.
-------------------------------------------------------------------
Mon Dec 22 15:18:31 CET 2008 - mls@suse.de

View File

@ -29,7 +29,7 @@ Obsoletes: jgroff
PreReq: %fillup_prereq %install_info_prereq
AutoReqProv: on
Version: 1.18.1.1
Release: 168
Release: 169
Summary: GNU troff Document Formatting System
Url: http://www.gnu.org/software/groff/groff.html
# cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/groff co groff
@ -191,6 +191,9 @@ popd
/var/adm/fillup-templates/sysconfig.suseconfig-groff
%changelog
* Mon Feb 02 2009 mfabian@suse.de
- bnc#470921: add more workarounds for Korean to fix the truncation
of some non-Korean man-pages in ko_KR.UTF-8 locale.
* Mon Dec 22 2008 mls@suse.de
- keep zzz-groff.csh from aborting if LANG is unset
* Tue Nov 25 2008 mfabian@suse.de

View File

@ -25,7 +25,7 @@ AutoReqProv: on
Requires: groff
Conflicts: jgxdview
Version: 1.18.1.1
Release: 209
Release: 210
Summary: Ditroff Output Displayer for Groff
Url: http://www.gnu.org/software/groff/groff.html
Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2

View File

@ -1,8 +1,7 @@
diff -ru groff-1.18.1.1.orig/src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nroff/nroff.sh
--- groff-1.18.1.1.orig/src/roff/nroff/nroff.sh 2007-07-23 19:22:48.000000000 +0200
+++ groff-1.18.1.1/src/roff/nroff/nroff.sh 2007-07-23 19:27:54.000000000 +0200
@@ -87,11 +87,183 @@
diff -ru groff-1.18.1.1.orig//src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nroff/nroff.sh
--- groff-1.18.1.1.orig//src/roff/nroff/nroff.sh 2009-02-02 18:44:00.000000000 +0100
+++ groff-1.18.1.1/src/roff/nroff/nroff.sh 2009-02-02 18:44:40.000000000 +0100
@@ -87,11 +87,177 @@
shift
done
@ -75,62 +74,6 @@ diff -ru groff-1.18.1.1.orig/src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nro
+
+guess_legacy_encoding;
+
+ICONV="cat"
+case "`locale charmap 2>/dev/null`" in
+ UTF-8)
+ case "${LANGUAGE-${LC_ALL-${LC_MESSAGES-${LANG}}}}" in
+ ja*)
+ # Japanese man page in UTF-8 locale, special case!
+ # force the device 'nippon' to run groff in ja_JP.eucJP locale
+ # and convert the result to UTF-8 using iconv:
+ T=-Tnippon
+ export LC_ALL=ja_JP.eucJP
+ ICONV="iconv -f EUC-JP -t UTF-8"
+ ;;
+ zh_TW*)
+ T=-Tnippon
+ export LC_ALL=zh_TW.Big5
+ ICONV="iconv -f Big5 -t UTF-8"
+ ;;
+ zh_HK*)
+ T=-Tnippon
+ export LC_ALL=zh_HK.Big5HKSCS
+ ICONV="iconv -f Big5HKSCS -t UTF-8"
+ ;;
+ zh*)
+ T=-Tnippon
+ export LC_ALL=zh_CN.GB18030
+ ICONV="iconv -f GB18030 -t UTF-8"
+ ;;
+ ko*)
+ T=-Tlatin1
+ export LC_ALL=ko_KR.EUC-KR
+ ICONV="iconv -f EUC-KR -t UTF-8"
+ ;;
+# Czech, Hungarian, ... and Russian man-pages don't need special treatment in nroff anymore
+# with man-2.4.3 because man already does the necessary conversions (see bugzilla #230030).
+# cs*|hu*|hr*|pl*)
+# # Czech, Hungarian, ... in UTF-8 seem to need special treatment as well:
+# T=-Tascii8
+# export LC_ALL=cs_CZ.ISO-8859-2
+# ICONV="iconv -f ISO-8859-2 -t UTF-8"
+# ;;
+# ru_RU*)
+# # Russian man page sources are in KOI8-R
+# T=-Tascii8
+# export LC_ALL=ru_RU.KOI8-R
+# ICONV="iconv -f KOI8-R -t UTF-8"
+# ;;
+ # make 'man iso-8859-15' display correctly in UTF-8 locales using Euro
+ ca_ES*|de_AT*|de_BE*|de_DE*|de_LU*|en_BE*|en_IE*|es_ES*|eu_ES*|fi_FI*|fr_BE*|fr_FR*|fr_LU*|ga_IE*|gl_ES*|it_IT*|nl_BE*|nl_NL*|pt_PT*|sv_FI*|wa_BE*)
+ T=-Tlatin1
+ export LC_ALL=de_DE@euro
+ ICONV="iconv -f ISO-8859-15 -t UTF-8"
+ ;;
+ esac
+ ;;
+esac
+
+TMPDIR=`mktemp -d /tmp/nroff.XXXXXX`
+if [ $? -ne 0 ]; then
+ echo "$0: Can't create temp directory, exiting..."
@ -177,11 +120,62 @@ diff -ru groff-1.18.1.1.orig/src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nro
+# iconv -s -c -f utf-8 -t $LEGACY_ENCODING < $TMPDIR/input > $TMPDIR/input.new
+# mv $TMPDIR/input.new $TMPDIR/input
+#fi
+
+ICONV="cat"
+case "`locale charmap 2>/dev/null`" in
+ UTF-8)
+ case "${LANGUAGE-${LC_ALL-${LC_MESSAGES-${LANG}}}}" in
+ ja*)
+ # Japanese man page in UTF-8 locale, special case!
+ # force the device 'nippon' to run groff in ja_JP.eucJP locale
+ # and convert the result to UTF-8 using iconv:
+ T=-Tnippon
+ export LC_ALL=ja_JP.eucJP
+ ICONV="iconv -f EUC-JP -t UTF-8"
+ ;;
+ zh_TW*)
+ T=-Tnippon
+ export LC_ALL=zh_TW.Big5
+ ICONV="iconv -f Big5 -t UTF-8"
+ ;;
+ zh_HK*)
+ T=-Tnippon
+ export LC_ALL=zh_HK.Big5HKSCS
+ ICONV="iconv -f Big5HKSCS -t UTF-8"
+ ;;
+ zh*)
+ T=-Tnippon
+ export LC_ALL=zh_CN.GB18030
+ ICONV="iconv -f GB18030 -t UTF-8"
+ ;;
+ ko*)
+ T=-Tlatin1
+ export LC_ALL=ko_KR.EUC-KR
+ # See https://bugzilla.novell.com/show_bug.cgi?id=470921
+ # for the reason why the "-c" is needed and
+ # why a conversion from ISO-8859-1 instead of EUC-KR to
+ # UTF-8 may be needed if an English man-page is displayed:
+ ICONV="iconv -c -f EUC-KR -t UTF-8"
+ iconv -s -f ASCII -t UTF-8 < $TMPDIR/input > /dev/null
+ if [ $? -eq 0 ]; then
+ ICONV="iconv -f ISO-8859-1 -t UTF-8"
+ fi
+ ;;
+ # make 'man iso-8859-15' display correctly in UTF-8 locales using Euro
+ ca_ES*|de_AT*|de_BE*|de_DE*|de_LU*|en_BE*|en_IE*|es_ES*|eu_ES*|fi_FI*|fr_BE*|fr_FR*|fr_LU*|ga_IE*|gl_ES*|it_IT*|nl_BE*|nl_NL*|pt_PT*|sv_FI*|wa_BE*)
+ T=-Tlatin1
+ export LC_ALL=de_DE@euro
+ ICONV="iconv -f ISO-8859-15 -t UTF-8"
+ ;;
+ esac
+ ;;
+esac
+
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
: ${GROFF_BIN_PATH=@BINDIR@}
-: ${GROFF_BIN_PATH=@BINDIR@}
+: ${GROFF_BIN_PATH=@BINDIR@}
export GROFF_BIN_PATH
-PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"}
+PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"} < $TMPDIR/input | $ICONV