Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2001 14:18:08 GMT
From:      Udo Schweigert <ust@cert.siemens.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/28145: Unbreak references in non-html output for port textproc/sgmlformat
Message-ID:  <200106141418.f5EEI8886823@alaska.cert.siemens.de>

next in thread | raw e-mail | index | archive | help

>Number:         28145
>Category:       ports
>Synopsis:       Unbreak references in non-html output for port textproc/sgmlformat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 14 07:20:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Udo Schweigert
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD alaska.cert.siemens.de 4.3-STABLE FreeBSD 4.3-STABLE #19: Sun Jun 10 12:02:58 CEST 2001 ust@alaska.cert.siemens.de:/usr/obj/work/src/RELENG_4/sys/alaska i386


>Description:

The ascii output of textproc/sgmlfmt does not handle references correctly,
mainly because groff is used in an old fashioned way which does not work any
more. This implies that non-html docs of some ports (I detetcted this when
trying to read the mutt manual) are generated with empty references.

>How-To-Repeat:
>Fix:

The attached patch use groff the right way and fixes some otherwise occuring
error messages.

diff -ruN sgmlformat/files/patch-01 sgmlformat.new/files/patch-01
--- sgmlformat/files/patch-01	Thu Jan  1 01:00:00 1970
+++ sgmlformat.new/files/patch-01	Thu Jun 14 15:39:18 2001
@@ -0,0 +1,25 @@
+--- sgmlfmt/sgmlfmt.pl.orig	Tue Sep 15 23:05:47 1998
++++ sgmlfmt/sgmlfmt.pl	Thu Jun 14 15:37:50 2001
+@@ -151,19 +151,14 @@
+     open (outfile, ">$fileroot.trf");
+     &sgmlparse(infile, "roff");
+     while (<infile>) {
++	s,\\\(ru,_,g if /^\.GET[HP]N/;
+ 	print outfile;
+     }
+     close(infile);
+     close(outfile);
++    system("groff -z -rRef=1 -T ${driver} -t ${fileroot}.trf 2>&1 | egrep '^\\.' > ${fileroot}.qrf");
+     system("groff -T ${driver} -t ${fileroot}.trf ${postproc} > ${fileroot}.${driver}");
+-
+-    # If foo.tmp has been created, then there are cross references
+-    # in the file and we need a second pass to resolve them correctly.
+-
+-    if (stat("${fileroot}.tmp")) {
+-        system("groff -T ${driver} -t ${fileroot}.trf ${postproc} > ${fileroot}.${driver}");
+-    	unlink("${fileroot}.qrf");
+-    }
++    unlink("${fileroot}.qrf");
+     unlink("${fileroot}.trf");
+ }
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106141418.f5EEI8886823>