[45033] trunk/dports/lang/pure

ryandesign at macports.org ryandesign at macports.org
Tue Jan 6 17:16:17 PST 2009


Revision: 45033
          http://trac.macports.org/changeset/45033
Author:   ryandesign at macports.org
Date:     2009-01-06 17:16:17 -0800 (Tue, 06 Jan 2009)
Log Message:
-----------
pure: upstream patch to fix build problem with bison 2.4

Modified Paths:
--------------
    trunk/dports/lang/pure/Portfile

Added Paths:
-----------
    trunk/dports/lang/pure/files/
    trunk/dports/lang/pure/files/patch-bison-2.4.diff

Modified: trunk/dports/lang/pure/Portfile
===================================================================
--- trunk/dports/lang/pure/Portfile	2009-01-07 01:07:15 UTC (rev 45032)
+++ trunk/dports/lang/pure/Portfile	2009-01-07 01:16:17 UTC (rev 45033)
@@ -36,6 +36,9 @@
     path:bin/llvm-config:llvm \
     port:readline
 
+patchfiles \
+    patch-bison-2.4.diff
+
 configure.args \
     --enable-gsl
 

Added: trunk/dports/lang/pure/files/patch-bison-2.4.diff
===================================================================
--- trunk/dports/lang/pure/files/patch-bison-2.4.diff	                        (rev 0)
+++ trunk/dports/lang/pure/files/patch-bison-2.4.diff	2009-01-07 01:16:17 UTC (rev 45033)
@@ -0,0 +1,189 @@
+This patch is basically upstream revision 582.
+--- lexerdefs.hh	(revision 0)
++++ lexerdefs.hh	(revision 582)
+@@ -0,0 +1,15 @@
++#ifndef LEXERDEFS_HH
++#define LEXERDEFS_HH
++
++#include "parserdefs.hh"
++#include "parser.hh"
++
++// Announce to Flex the prototype we want for lexing function, ...
++#define YY_DECL \
++  yy::parser::token_type						\
++  yylex (yy::parser::semantic_type* yylval,				\
++	 yy::parser::location_type* yylloc, interpreter& interp)
++// ... and declare it for the parser's sake.
++YY_DECL;
++
++#endif // ! LEXERDEFS_HH
+--- parser.yy	(revision 581)
++++ parser.yy	(revision 582)
+@@ -11,7 +11,7 @@
+ %{
+ #include <iostream>
+ #include <string>
+-#include "expr.hh"
++#include "parserdefs.hh"
+ #include "printer.hh"
+ #include "util.hh"
+ 
+@@ -52,34 +52,6 @@
+ 
+ // Symbols.
+ 
+-%{
+-struct sym_info {
+-  bool special, priv;
+-  prec_t prec;
+-  fix_t fix;
+-  sym_info(bool s, bool v, prec_t p, fix_t f) :
+-    special(s), priv(v), prec(p), fix(f) { }
+-};
+-struct rhs_info {
+-  expr *r, *q;
+-  rhs_info(expr *x) { assert(x); r = x; q = 0; }
+-  rhs_info(expr *x, expr *y) { assert(x); assert(y); r = x; q = y; }
+-  ~rhs_info() { assert(r); delete r; if (q) delete q; }
+-  expr rhs() { assert(r); return *r; }
+-  expr qual() { return q?*q:expr(); }
+-};
+-struct rule_info {
+-  exprl l;
+-  env e;
+-};
+-struct pat_rule_info {
+-  exprl l;
+-  rulel rl;
+-};
+-typedef pair<expr,expr> comp_clause;
+-typedef list<comp_clause> comp_clause_list;
+-%}
+-
+ %union
+ {
+   char    cval;
+@@ -104,6 +76,7 @@
+ };
+ 
+ %{
++#include "lexerdefs.hh"
+ #include "interpreter.hh"
+ %}
+ 
+--- pure.cc	(revision 581)
++++ pure.cc	(revision 582)
+@@ -14,6 +14,7 @@
+ #include <readline/history.h>
+ #include "interpreter.hh"
+ #include "runtime.h"
++#include "util.hh"
+ #include <llvm/Target/TargetOptions.h>
+ 
+ #include "config.h"
+--- interpreter.hh	(revision 581)
++++ interpreter.hh	(revision 582)
+@@ -20,6 +20,9 @@
+ #include "symtable.hh"
+ #include "runtime.h"
+ 
++#include "parserdefs.hh"
++#include "parser.hh"
++
+ /* Add some debugging output (disable in release version!). */
+ #ifndef DEBUG
+ #define DEBUG 1 // extra sanity checks
+@@ -53,16 +56,6 @@
+ 
+ class interpreter;
+ 
+-#include "parser.hh"
+-
+-// Announce to Flex the prototype we want for lexing function, ...
+-#define YY_DECL \
+-  yy::parser::token_type						\
+-  yylex (yy::parser::semantic_type* yylval,				\
+-	 yy::parser::location_type* yylloc, interpreter& interp)
+-// ... and declare it for the parser's sake.
+-YY_DECL;
+-
+ // verbosity levels, these can be ORed together
+ namespace verbosity {
+   enum { none = 0, defs = 0x1, envs = 0x2, code = 0x4, dump = 0x8,
+--- lexer.ll	(revision 581)
++++ lexer.ll	(revision 582)
+@@ -13,7 +13,7 @@
+ #include <sstream>
+ #include <fstream>
+ #include "interpreter.hh"
+-#include "parser.hh"
++#include "lexerdefs.hh"
+ #include "util.hh"
+ 
+ #include "config.h"
+--- interpreter.cc	(revision 581)
++++ interpreter.cc	(revision 582)
+@@ -1,5 +1,5 @@
+ #include "interpreter.hh"
+-#include "parser.hh"
++#include "util.hh"
+ #include <sstream>
+ #include <stdarg.h>
+ #include <errno.h>
+--- ChangeLog	(revision 581)
++++ ChangeLog	(revision 582)
+@@ -1,3 +1,13 @@
++2009-01-06  Albert Graef  <Dr.Graef at t-online.de>
++
++	* parserdefs.hh, lexerdefs.hh: Added new header files to properly
++	handle interdependencies between parser, lexer and interpreter, to
++	make bison 2.4 happy without breaking support for earlier bison
++	versions. Modified parser.yy, lexer.ll and interpreter.cc/hh
++	accordingly. This fixes issue #3 reported by mikko.sysikaski, as
++	well as a MacPorts compatibility issue already reported by Ryan
++	Schmidt some time ago.
++
+ 2008-12-16  Albert Graef  <Dr.Graef at t-online.de>
+ 
+ 	* 0.15 release.
+--- parserdefs.hh	(revision 0)
++++ parserdefs.hh	(revision 582)
+@@ -0,0 +1,38 @@
++#ifndef PARSERDEFS_HH
++#define PARSERDEFS_HH
++
++#include "expr.hh"
++
++class interpreter;
++
++struct sym_info {
++  bool special, priv;
++  prec_t prec;
++  fix_t fix;
++  sym_info(bool s, bool v, prec_t p, fix_t f) :
++    special(s), priv(v), prec(p), fix(f) { }
++};
++
++struct rhs_info {
++  expr *r, *q;
++  rhs_info(expr *x) { assert(x); r = x; q = 0; }
++  rhs_info(expr *x, expr *y) { assert(x); assert(y); r = x; q = y; }
++  ~rhs_info() { assert(r); delete r; if (q) delete q; }
++  expr rhs() { assert(r); return *r; }
++  expr qual() { return q?*q:expr(); }
++};
++
++struct rule_info {
++  exprl l;
++  env e;
++};
++
++struct pat_rule_info {
++  exprl l;
++  rulel rl;
++};
++
++typedef pair<expr,expr> comp_clause;
++typedef list<comp_clause> comp_clause_list;
++
++#endif // ! PARSERDEFS_HH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090106/249f0d92/attachment.html>


More information about the macports-changes mailing list