You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/gnome-extra/yelp-xsl/files/yelp-xsl-3.6.1-gawk.patch

60 lines
1.9 KiB

From 7dfe59cd3ed75a245804ea3081460988c4affdee Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Tue, 5 Feb 2013 22:41:14 -0500
Subject: [PATCH] Use gawk, not awk
Despite all attempts to be compatible with other awks, using some (e.g.
nawk) still results in syntax errors:
nawk: syntax error at source line 3 source file
doc/yelp-xsl/xsldoc-scan.awk
context is
# -*- indent-tabs-mode: nil -*- >>>
<<<
2 extra }'s
---
doc/yelp-xsl/mal2cache | 2 +-
doc/yelp-xsl/xsldoc-scan | 2 +-
doc/yelp-xsl/xsldoc-scan.awk | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/yelp-xsl/mal2cache b/doc/yelp-xsl/mal2cache
index a7a23ee..6beaa64 100755
--- a/doc/yelp-xsl/mal2cache
+++ b/doc/yelp-xsl/mal2cache
@@ -2,7 +2,7 @@
# -*- indent-tabs-mode: nil -*-
export LANG=C
urlencode() {
- echo "$1" | awk --posix '
+ echo "$1" | gawk --posix '
BEGIN {
for (i = 1; i <= 256; i++) {
bytes[sprintf("%c", i)] = i;
diff --git a/doc/yelp-xsl/xsldoc-scan b/doc/yelp-xsl/xsldoc-scan
index 63e713b..892bb3a 100755
--- a/doc/yelp-xsl/xsldoc-scan
+++ b/doc/yelp-xsl/xsldoc-scan
@@ -9,7 +9,7 @@ while [ "$#" != "0" ]; do
else
fullfile=$(cd $(dirname "$1") && pwd)/$(basename "$1")
outfile=$(basename "$1" .xsl)
- awk -f $(dirname "$0")/xsldoc-scan.awk "$1" | \
+ gawk -f $(dirname "$0")/xsldoc-scan.awk "$1" | \
xsltproc -o "$outdir/$outfile".page \
--stringparam xsldoc.id "$outfile" \
--stringparam xsldoc.xslt_file "$fullfile" \
diff --git a/doc/yelp-xsl/xsldoc-scan.awk b/doc/yelp-xsl/xsldoc-scan.awk
index a8859df..83e976a 100644
--- a/doc/yelp-xsl/xsldoc-scan.awk
+++ b/doc/yelp-xsl/xsldoc-scan.awk
@@ -1,4 +1,4 @@
-#!/bin/awk
+#!/usr/bin/env gawk
# -*- indent-tabs-mode: nil -*-
# xsldoc.awk - Convert inline documentation to XML suitable for xsldoc.xsl
# Copyright (C) 2006 Shaun McCance <shaunm@gnome.org>
--
1.8.1.2