From bad854d4133f751d7b2760b5d1e5729476033279 Mon Sep 17 00:00:00 2001 From: jtb Date: Tue, 18 Feb 2003 23:43:54 +0000 Subject: The yodl2texinfo-post script requires python. Make it python2.2 compatible and add a dependency. Bump version. --- textproc/yodl/Makefile | 4 +- textproc/yodl/distinfo | 5 ++- textproc/yodl/patches/patch-ab | 24 +++++++++- textproc/yodl/patches/patch-ac | 100 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 5 deletions(-) create mode 100644 textproc/yodl/patches/patch-ac (limited to 'textproc/yodl') diff --git a/textproc/yodl/Makefile b/textproc/yodl/Makefile index c615efc50df..a764a26b9d3 100644 --- a/textproc/yodl/Makefile +++ b/textproc/yodl/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2002/10/21 15:35:42 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2003/02/18 23:43:54 jtb Exp $ DISTNAME= yodl-1.31.18 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= ftp://ftp.lilypond.org/pub/yodl/development/ @@ -18,5 +19,6 @@ MAKEFILE= GNUmakefile do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} LDFLAGS="${LDFLAGS}" +.include "../../lang/python/application.mk" .include "../../devel/gettext-lib/buildlink2.mk" .include "../../mk/bsd.pkg.mk" diff --git a/textproc/yodl/distinfo b/textproc/yodl/distinfo index cd551e8a4fc..57d5d0a3501 100644 --- a/textproc/yodl/distinfo +++ b/textproc/yodl/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.2 2001/04/20 15:05:14 skrll Exp $ +$NetBSD: distinfo,v 1.3 2003/02/18 23:43:54 jtb Exp $ SHA1 (yodl-1.31.18.tar.gz) = 16f041cf8851027f96e5af82d0ac4f85a425553a Size (yodl-1.31.18.tar.gz) = 320053 bytes SHA1 (patch-aa) = ecb2e2f61d43e69b685b2821d9601e82cb0647ca -SHA1 (patch-ab) = 9c852b785b7a42e973d86939f07ac1e8e630dda9 +SHA1 (patch-ab) = 70ccc5bab03a079935507d59a0e2f4a93b27a4ab +SHA1 (patch-ac) = 8368ab00a5fac4fd6c9107119b29414eb9340e2a diff --git a/textproc/yodl/patches/patch-ab b/textproc/yodl/patches/patch-ab index 47e76e59599..82ec16df4d5 100644 --- a/textproc/yodl/patches/patch-ab +++ b/textproc/yodl/patches/patch-ab @@ -1,8 +1,28 @@ -$NetBSD: patch-ab,v 1.1.1.1 2001/03/26 22:43:57 jtb Exp $ +$NetBSD: patch-ab,v 1.2 2003/02/18 23:43:55 jtb Exp $ --- configure.orig Wed Nov 17 20:09:38 1999 +++ configure -@@ -1154,14 +1154,14 @@ +@@ -1014,8 +1014,8 @@ fi + fi + + +- # Extract the first word of "${PYTHON:-python}", so it can be a program name with args. +-set dummy ${PYTHON:-python}; ac_word=$2 ++ # Extract the first word of "${PYTHON:-python2.2}", so it can be a program name with args. ++set dummy ${PYTHON:-python2.2}; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:1021: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then +@@ -1067,7 +1067,7 @@ fi + result="`echo \"$PYTHON\" | grep echo`" + if test "x$PYTHON" = "xerror" -o "x$result" != "x"; then + +- echo "configure: warning: can\'t find python. You should install Python" 1>&2 ++ echo "configure: warning: can\'t find python2.2. You should install Python" 1>&2 + warn_b=yes + + fi +@@ -1154,14 +1154,14 @@ subdirs="stepmake" # Uncomment the configuration options your package needs. # -O is necessary to get inlining diff --git a/textproc/yodl/patches/patch-ac b/textproc/yodl/patches/patch-ac new file mode 100644 index 00000000000..c5f0d049419 --- /dev/null +++ b/textproc/yodl/patches/patch-ac @@ -0,0 +1,100 @@ +$NetBSD: patch-ac,v 1.1 2003/02/18 23:43:55 jtb Exp $ + +--- scripts/yodl2texinfo-post.py.orig Tue Feb 18 22:33:15 2003 ++++ scripts/yodl2texinfo-post.py +@@ -28,8 +28,7 @@ import sys + + import getopt + from string import * +-import regex +-import regsub ++import re + import time + + def program_id (): +@@ -141,16 +140,16 @@ class Pre_texinfo_file (Menu): + return n + + def eat_tag (this): +- i = regex.search ('@TAGSTART@', this.s) ++ i = re.search ('@TAGSTART@', this.s) + j = 0 + if i < 0: + return 0 +- j = regex.search ('@TAGEND@', this.s[i:]) ++ j = re.search ('@TAGEND@', this.s[i:]) + if j < 0: + raise 'huh?' + j = i + j + len ('@TAGEND@') + tag = this.s[i + len ('@TAGSTART@'):j - len ('@TAGEND@')] +- k = regex.search (' ', tag[1:]) + 1 ++ k = re.search (' ', tag[1:]) + 1 + tag_name = tag[1:k] + tag_string = tag[k:len (tag) - 1] + while tag_string[:1] == ' ': +@@ -161,13 +160,13 @@ class Pre_texinfo_file (Menu): + # various other characters in node names too + # + if urg_value: +- tag_string = regsub.gsub (not_in_node_set, '-', tag_string) +- tag_string = regsub.gsub ('--', '-', tag_string) ++ tag_string = re.sub (not_in_node_set, '-', tag_string) ++ tag_string = re.sub ('--', '-', tag_string) + # brr +- tag_string = regsub.gsub ('--', '-', tag_string) +- tag_string = regsub.gsub ('@code', '', tag_string) +- tag_string = regsub.gsub ('@emph', '', tag_string) +- tag_string = regsub.gsub ('@strong', '', tag_string) ++ tag_string = re.sub ('--', '-', tag_string) ++ tag_string = re.sub ('@code', '', tag_string) ++ tag_string = re.sub ('@emph', '', tag_string) ++ tag_string = re.sub ('@strong', '', tag_string) + if tag_name == 'menu': + this.default.top = 'Top' + n = this.new_node (i, tag_string) +@@ -214,23 +213,23 @@ class Pre_texinfo_file (Menu): + def create_node (this, n): + node = '@node ' + set = '' +- if not urg_value and regex.match (not_in_node, n.name) != -1: ++ if not urg_value and re.match (not_in_node, n.name) != -1: + set = set + "@set nodename " + n.name + "\n" + node = node + "@value{nodename}" + else: + node = node + n.name + if not simple_nodes: +- if not urg_value and regex.match (not_in_node, n.next) != -1: ++ if not urg_value and re.match (not_in_node, n.next) != -1: + set = set + "@set nextname " + n.next + "\n" + node = node + ", @value{nextname}" + else: + node = node + ", " + n.next +- if not urg_value and regex.match (not_in_node, n.prev) != -1: ++ if not urg_value and re.match (not_in_node, n.prev) != -1: + set = set + "@set prevname " + n.prev + "\n" + node = node + ", @value{prevname}" + else: + node = node + ", " + n.prev +- if not urg_value and regex.match (not_in_node, n.top) != -1: ++ if not urg_value and re.match (not_in_node, n.top) != -1: + set = set + "@set topname " + n.top + "\n" + node = node + ", @value{topname}" + else: +@@ -249,7 +248,7 @@ class Pre_texinfo_file (Menu): + d = n.description + if not d: + d = n.name +- if not urg_value and regex.match (not_in_node, n.name) != -1: ++ if not urg_value and re.match (not_in_node, n.name) != -1: + menu = menu + "@set nodename " + n.name + "\n" + menu = menu + "* @value{nodename}::" + menu = menu + ' ' * (TAB_POS - len (n.name)) + d + "\n" +@@ -309,7 +308,7 @@ class Pre_texinfo_file (Menu): + this.parse () + this.xrefs () + this.nodes_and_menus () +- this.s = regsub.gsub ('^\n\n', '\n', this.s) ++ this.s = re.sub ('^\n\n', '\n', this.s) + this.s = '\n' + this.s + infotitle = '' + basename = os.path.basename (os.path.splitext (this.filename)[0]) -- cgit v1.2.3