make the renamed patches actually produce the same accumulative changes
as the mess before did
This commit is contained in:
parent
2ef17219c4
commit
d4fdb91205
@ -1,7 +1,15 @@
|
||||
$OpenBSD: patch-sgmlfmt_sgmlfmt_pl,v 1.1 2007/10/26 21:29:30 jasper Exp $
|
||||
--- sgmlfmt/sgmlfmt.pl.orig Fri Oct 26 23:26:37 2007
|
||||
+++ sgmlfmt/sgmlfmt.pl Fri Oct 26 23:26:37 2007
|
||||
@@ -45,7 +45,7 @@ $sgmldir = "##PREFIX##/share/sgml";
|
||||
$OpenBSD: patch-sgmlfmt_sgmlfmt_pl,v 1.2 2007/11/03 16:26:34 naddy Exp $
|
||||
--- sgmlfmt/sgmlfmt.pl.orig Tue Sep 15 23:05:47 1998
|
||||
+++ sgmlfmt/sgmlfmt.pl Sat Nov 3 17:22:00 2007
|
||||
@@ -26,6 +26,7 @@
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
+# $XFree86: doctools/sgmlformat/sgmlfmt/sgmlfmt.pl,v 1.4 1998/04/12 03:13:03 dawes Exp $
|
||||
|
||||
# Format an sgml document tagged according to the linuxdoc DTD.
|
||||
# by John Fieber <jfieber@freebsd.org> for the FreeBSD documentation
|
||||
@@ -44,7 +45,7 @@ $sgmldir = "##PREFIX##/share/sgml";
|
||||
# The SGML parser, and translation engine.
|
||||
#
|
||||
|
||||
@ -10,3 +18,128 @@ $OpenBSD: patch-sgmlfmt_sgmlfmt_pl,v 1.1 2007/10/26 21:29:30 jasper Exp $
|
||||
$instant = "instant";
|
||||
|
||||
#
|
||||
@@ -68,13 +69,25 @@ $SIG{'INT'} = 'sighandler';
|
||||
$SIG{'QUIT'} = 'sighandler';
|
||||
|
||||
#
|
||||
+# Check if a command we've run returned an error status. If so, remove
|
||||
+# scratch files and exit.
|
||||
+#
|
||||
+sub exitiferror {
|
||||
+ local($ret) = @_;
|
||||
+ if ($ret >> 8 != 0) {
|
||||
+ unlink @cleanfiles;
|
||||
+ exit($ret >> 8);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#
|
||||
# Display a usage message.
|
||||
#
|
||||
|
||||
sub usage {
|
||||
print "Usage:\n";
|
||||
print "sgmlfmt [-d <doctype>] -f <format> [-i <namea> ...] [-links]\n";
|
||||
- print " [-e encoding] [-hdr file] [-ftr file] file\n";
|
||||
+ print " [-e encoding] [-hdr file] [-ftr file] [-b] file\n";
|
||||
print "where <doctype> is one of: linuxdoc (default), docbook.\n";
|
||||
print "and <format> is one of: ascii, html, koi8-r, latin1, ps, roff\n";
|
||||
}
|
||||
@@ -119,6 +132,7 @@ sub sgmlparse {
|
||||
if ($defines ne "") {
|
||||
$defines = "-i $defines";
|
||||
}
|
||||
+
|
||||
open($ifhandle, "$sgmls $defines $decl $file | " .
|
||||
"sed -e 's/^f\<OSFILE\>/f/' | " .
|
||||
"$instant -Dfilename=$fileroot $instantopts " .
|
||||
@@ -138,6 +152,7 @@ sub gen_roff {
|
||||
}
|
||||
close(infile);
|
||||
close(outfile);
|
||||
+ &exitiferror($?);
|
||||
}
|
||||
|
||||
#
|
||||
@@ -155,16 +170,22 @@ sub do_groff {
|
||||
}
|
||||
close(infile);
|
||||
close(outfile);
|
||||
- system("groff -T ${driver} -t ${fileroot}.trf ${postproc} > ${fileroot}.${driver}");
|
||||
+ &exitiferror($?);
|
||||
+
|
||||
+ system("groff -T ${driver} -t -M ${sgmldir}/tmac ${fileroot}.trf" .
|
||||
+ " ${postproc} > ${fileroot}.${driver}");
|
||||
+ &exitiferror($?);
|
||||
|
||||
# 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}");
|
||||
+ system("groff -T ${driver} -t -M ${sgmldir}/tmac ${fileroot}.trf" .
|
||||
+ " ${postproc} > ${fileroot}.${driver}");
|
||||
unlink("${fileroot}.qrf");
|
||||
}
|
||||
unlink("${fileroot}.trf");
|
||||
+ &exitiferror($?);
|
||||
}
|
||||
|
||||
#
|
||||
@@ -303,6 +324,8 @@ sub gen_html {
|
||||
}
|
||||
}
|
||||
close(bar);
|
||||
+ close(foo);
|
||||
+ &exitiferror($?);
|
||||
|
||||
open(foofile, $tmpfile);
|
||||
&html2html(foofile, "boo");
|
||||
@@ -623,6 +646,7 @@ sub docbook_html {
|
||||
}
|
||||
close(infile);
|
||||
close(outfile);
|
||||
+ &exitiferror($?);
|
||||
}
|
||||
|
||||
# extlink
|
||||
@@ -655,7 +679,8 @@ sub extlink {
|
||||
|
||||
sub main {
|
||||
# Check arguments
|
||||
- if (!&NGetOpt('d=s', 'f=s', 'links', 'i:s@', 'hdr=s', 'ftr=s', 'e=s')) {
|
||||
+ if (!&NGetOpt('d=s', 'f=s', 'links', 'i:s@', 'hdr=s', 'ftr=s', 'e=s',
|
||||
+ 'b')) {
|
||||
&usage;
|
||||
exit 1;
|
||||
}
|
||||
@@ -681,6 +706,12 @@ sub main {
|
||||
$decl = "-c " . $sgmldir . "/linuxdoc/catalog";
|
||||
}
|
||||
|
||||
+ if ($opt_b) {
|
||||
+ $colcmd = "col -b";
|
||||
+ }
|
||||
+ else {
|
||||
+ $colcmd = "col";
|
||||
+ }
|
||||
# Generate the output
|
||||
if ($opt_f eq 'html') {
|
||||
# Set the character encoding
|
||||
@@ -705,13 +736,13 @@ sub main {
|
||||
&gen_roff();
|
||||
}
|
||||
elsif ($opt_f eq 'ascii') {
|
||||
- &do_groff("ascii", "| col");
|
||||
+ &do_groff("ascii", "| $colcmd");
|
||||
}
|
||||
elsif ($opt_f eq 'latin1') {
|
||||
- &do_groff("latin1", "| col");
|
||||
+ &do_groff("latin1", "| $colcmd");
|
||||
}
|
||||
elsif ($opt_f eq 'koi8-r') {
|
||||
- &do_groff("koi8-r", "| col");
|
||||
+ &do_groff("koi8-r", "| $colcmd");
|
||||
}
|
||||
elsif ($opt_f eq 'ps') {
|
||||
&do_groff("ps", "");
|
||||
|
16
textproc/sgmlformat/patches/patch-transpec_Makefile
Normal file
16
textproc/sgmlformat/patches/patch-transpec_Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-transpec_Makefile,v 1.3 2007/11/03 16:26:34 naddy Exp $
|
||||
--- transpec/Makefile.orig Wed Aug 20 23:37:13 1997
|
||||
+++ transpec/Makefile Sat Nov 3 17:22:00 2007
|
||||
@@ -10,10 +10,10 @@ NOOBJ= noobj
|
||||
all clean cleandir depend lint tags:
|
||||
|
||||
beforeinstall:
|
||||
- @mkdir -p ${TRANSPEC_DIR}
|
||||
+ @mkdir -p ${DESTDIR}${TRANSPEC_DIR}
|
||||
|
||||
afterinstall:
|
||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
||||
- ${TRANSPEC_DIR}
|
||||
+ ${DESTDIR}${TRANSPEC_DIR}
|
||||
|
||||
.include <bsd.prog.mk>
|
Loading…
Reference in New Issue
Block a user