rpms/groff/F-7 groff.spec,1.51,1.52 nroff,1.4,1.5
Marcela Mašláňová (mmaslano)
fedora-extras-commits at redhat.com
Fri Jan 25 12:02:47 UTC 2008
Author: mmaslano
Update of /cvs/pkgs/rpms/groff/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18531
Modified Files:
groff.spec nroff
Log Message:
nroff support -T option
Index: groff.spec
===================================================================
RCS file: /cvs/pkgs/rpms/groff/F-7/groff.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- groff.spec 22 Oct 2007 06:57:19 -0000 1.51
+++ groff.spec 25 Jan 2008 12:02:11 -0000 1.52
@@ -3,7 +3,7 @@
Summary: A document formatting system
Name: groff
Version: 1.18.1.4
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPL
Group: Applications/Publishing
URL: http://groff.ffii.org
@@ -235,6 +235,10 @@
%endif
%changelog
+* Fri Jan 25 2008 Marcela Maslanova <mmaslano at redhat.com> - 1.18.1.4-8
+- nroff support -T option
+- Resolves: rhbz#428443
+
* Fri Oct 19 2007 Marcela Maslanova <mmaslano at redhat.com> - 1.18.1.4-7
- path to groffer wasn't set correct
- Resolves: rhbz#321431
Index: nroff
===================================================================
RCS file: /cvs/pkgs/rpms/groff/F-7/nroff,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nroff 16 Aug 2007 14:14:23 -0000 1.4
+++ nroff 25 Jan 2008 12:02:11 -0000 1.5
@@ -4,52 +4,8 @@
prog="$0"
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
-
+opts="-mtty-char"
+T=""
for i
do
@@ -58,19 +14,15 @@
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
+ -[eq] | -s* | -u* | -T*)
+ # ignore these options
;;
-v | --version)
echo $"GNU nroff (groff) with Red Hat i18n/l10n support"
@@ -95,6 +47,11 @@
shift
done
+# Don't convert encodings when -T is specified
+[ -n "$T" ] && exec /usr/bin/groff $opts $T ${1+"$@"} 2>/dev/null
+
+opts="$opts -Tutf8"
+
if TMPFILE=$(mktemp /tmp/man.XXXXXX 2>/dev/null); then
trap "rm -f $TMPFILE" 0 1 2 3 15
cat ${1+"$@"} >| $TMPFILE
@@ -120,7 +77,6 @@
# 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
@@ -143,5 +99,4 @@
rm -f $TMPFILE
fi
fi
-
# eof
More information about the fedora-extras-commits
mailing list