瀏覽代碼

upgrading package: ragel 4.2 -> 5.1

Ralf S. Engelschall 20 年之前
父節點
當前提交
d398a7d317
共有 2 個文件被更改,包括 162 次插入5 次删除
  1. 152 0
      ragel/ragel.patch
  2. 10 5
      ragel/ragel.spec

+ 152 - 0
ragel/ragel.patch

@@ -0,0 +1,152 @@
+Index: ragel/ragel.h
+--- ragel/ragel.h.orig	2005-12-17 04:50:57 +0100
++++ ragel/ragel.h	2005-12-27 18:57:00 +0100
+@@ -25,6 +25,7 @@
+ #include <stdio.h>
+ #include <iostream>
+ #include <fstream>
++#include <string>
+ #include "config.h"
+ 
+ #define PROGNAME "ragel"
+Index: rlcodegen/fsmcodegen.cpp
+--- rlcodegen/fsmcodegen.cpp.orig	2005-12-21 07:15:28 +0100
++++ rlcodegen/fsmcodegen.cpp	2005-12-27 18:57:00 +0100
+@@ -25,6 +25,7 @@
+ #include "fsmcodegen.h"
+ #include "redfsm.h"
+ #include "gendata.h"
++#include <climits>
+ #include <sstream>
+ 
+ /* Determine if a string is only whitespace. Code blocks that are only
+Index: rlcodegen/gendata.cpp
+--- rlcodegen/gendata.cpp.orig	2005-12-22 08:04:14 +0100
++++ rlcodegen/gendata.cpp	2005-12-27 18:57:00 +0100
+@@ -31,6 +31,7 @@
+ #include "fgotocodegen.h"
+ #include "ipgotocodegen.h"
+ 
++#include <climits>
+ #include <iostream>
+ 
+ using std::endl;
+Index: rlcodegen/xmlparse.y
+--- rlcodegen/xmlparse.y.orig	2005-12-22 08:04:14 +0100
++++ rlcodegen/xmlparse.y	2005-12-27 18:57:00 +0100
+@@ -175,7 +175,7 @@
+ 		else
+ 			sourceFileName = fileNameAttr->value;
+ 		openOutput( sourceFileName );
+-	}
++	};
+ 
+ AttributeList:
+ 	AttributeList Attribute {
+@@ -190,7 +190,7 @@
+ 	XML_Word '=' XML_Literal {
+ 		attrKey = $1;
+ 		attrValue = $3;
+-	}
++	};
+ 	
+ HostOrDefList:
+ 	HostOrDefList HostOrDef |
+@@ -204,7 +204,7 @@
+ 	'<' '/' TAG_host '>' {
+ 		if ( outputFormat == OutCCode || outputFormat == OutDCode )
+ 			*outStream << xmlData.data;
+-	}
++	};
+ 
+ TagHostHead:
+ 	'<' TAG_host AttributeList '>' {
+@@ -216,14 +216,14 @@
+ 			if ( outputFormat == OutCCode || outputFormat == OutDCode )
+ 				lineDirective( *outStream, sourceFileName, line );
+ 		}
+-	}
++	};
+ 
+ TagRagelDef:
+ 	RagelDefHead
+ 	RagelDefItemList
+ 	'<' '/' TAG_ragel_def '>' {
+ 		cgd->generate();
+-	}
++	};
+ 
+ RagelDefHead:
+ 	'<' TAG_ragel_def AttributeList '>' {
+@@ -303,7 +303,7 @@
+ 		else {
+ 			warning() << "unrecognized write option" << endl;
+ 		}
+-	}
++	};
+ 
+ 
+ TagAlphType:
+@@ -361,7 +361,7 @@
+ 	'<' '/' TAG_start_state '>' {
+ 		unsigned long startState = strtoul( xmlData.data, 0, 10 );
+ 		cgd->setStartState( startState );
+-	}
++	};
+ 
+ TagEntryPoints:
+ 	'<' TAG_entry_points AttributeList '>'
+@@ -370,7 +370,7 @@
+ 		Attribute *errorAttr = $3->find( "error" );
+ 		if ( errorAttr != 0 )
+ 			cgd->setForcedErrorState();
+-	}
++	};
+ 
+ EntryPointList:
+ 	EntryPointList TagEntry |
+@@ -462,7 +462,7 @@
+ 			cgd->initTransList( curState, length );
+ 			curTrans = 0;
+ 		}
+-	}
++	};
+ 
+ TransList:
+ 	TransList TagTrans |
+@@ -531,7 +531,7 @@
+ 	/* Nothing */ {
+ 		/* Start with empty list. */
+ 		$$ = new InlineList;
+-	}
++	};
+ 
+ InlineItem:
+ 	TagText |
+@@ -564,7 +564,7 @@
+ 	'<' '/' TAG_text '>' {
+ 		$$ = new InlineItem( InputLoc(), InlineItem::Text );
+ 		$$->data = strdup(xmlData.data);
+-	}
++	};
+ 
+ TagGoto:
+ 	'<' TAG_goto '>'
+@@ -772,7 +772,7 @@
+ 			cgd->initActionTableList( length );
+ 			curActionTable = 0;
+ 		}
+-	}
++	};
+ 
+ ActionTableList:
+ 	ActionTableList TagActionTable |
+@@ -806,7 +806,7 @@
+ 		}
+ 
+ 		curActionTable += 1;
+-	}
++	};
+ 
+ %%
+ 

+ 10 - 5
ragel/ragel.spec

@@ -32,16 +32,17 @@ Distribution: OpenPKG
 Class:        PLUS
 Group:        Compiler
 License:      GPL
-Version:      4.2
-Release:      20050916
+Version:      5.1
+Release:      20051227
 
 #   list of sources
 Source0:      http://www.elude.ca/ragel/ragel-%{version}.tar.gz
+Patch0:       ragel.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, flex, bison
+BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, flex, bison, gperf
 PreReq:       OpenPKG, openpkg >= 20040130
 AutoReq:      no
 AutoReqProv:  no
@@ -68,6 +69,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %patch -p0
 
 %build
     CC="%{l_cc}" \
@@ -77,7 +79,9 @@ AutoReqProv:  no
     ./configure \
         --prefix=%{l_prefix}
     %{l_make} %{l_mflags}
-    ( cd doc && %{l_make} ragel.1 ) || exit $?
+    ( cd doc
+      %{l_make} %{l_mflags} ragel.1 rlcodegen.1
+    ) || exit $?
 
 %install
     rm -rf $RPM_BUILD_ROOT
@@ -85,7 +89,8 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/bin \
         $RPM_BUILD_ROOT%{l_prefix}/man/man1
     %{l_shtool} install -c -s -m 755 \
-        ragel $RPM_BUILD_ROOT%{l_prefix}/bin/
+        ragel/ragel rlcodegen/rlcodegen \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/
     %{l_shtool} install -c -m 644 \
         doc/ragel.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}