瀏覽代碼

upgrading package: re2c 0.9.1 -> 0.9.2

Ralf S. Engelschall 21 年之前
父節點
當前提交
84f1930cdb
共有 2 個文件被更改,包括 9 次插入165 次删除
  1. 0 157
      re2c/re2c.patch
  2. 9 8
      re2c/re2c.spec

+ 0 - 157
re2c/re2c.patch

@@ -1,157 +0,0 @@
-Index: Makefile
---- Makefile.orig	1999-08-27 05:46:32.000000000 +0200
-+++ Makefile	2004-05-08 10:01:19.000000000 +0200
-@@ -11,7 +11,7 @@
- %.cc : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
- 
- %.cc:	%.re
--	re2c -s $< >$@
-+	./re2c -s $< >$@
- 
- SOURCES	= code.cc dfa.cc main.cc parser.y actions.cc scanner.re substr.cc\
- 	translate.cc
-@@ -29,7 +29,7 @@
- 	rm -f *.o *.s y.tab.c y.tab.h scanner.cc parser.cc .version version.h re2c
- 
- parser.cc:	parser.y
--	yacc -d parser.y
-+	$(YACC) -d parser.y
- 	mv -f y.tab.c parser.cc
- 
- re2c:	$(OBJS)
-Index: parser.cc
---- parser.cc.orig	1999-08-27 05:46:32.000000000 +0200
-+++ parser.cc	2004-05-08 10:01:04.000000000 +0200
-@@ -13,7 +13,7 @@
- #include <time.h>
- #include <iostream.h>
- #include <string.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include "globals.h"
- #include "parser.h"
- int yyparse();
-Index: parser.y
---- parser.y.orig	1999-08-27 05:46:32.000000000 +0200
-+++ parser.y	2004-05-08 10:01:04.000000000 +0200
-@@ -3,7 +3,7 @@
- #include <time.h>
- #include <iostream.h>
- #include <string.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include "globals.h"
- #include "parser.h"
- int yyparse();
-Index: scanner.cc
---- scanner.cc.orig	1999-08-27 05:46:32.000000000 +0200
-+++ scanner.cc	2004-05-08 10:01:04.000000000 +0200
-@@ -12,7 +12,7 @@
- 
- #define	BSIZE	8192
- 
--#define	YYCTYPE		uchar
-+#define	YYCTYPE		char
- #define	YYCURSOR	cursor
- #define	YYLIMIT		lim
- #define	YYMARKER	ptr
-@@ -27,7 +27,7 @@
-     ;
- }
- 
--uchar *Scanner::fill(uchar *cursor){
-+char *Scanner::fill(char *cursor){
-     if(!eof){
- 	uint cnt = tok - bot;
- 	if(cnt){
-@@ -39,7 +39,7 @@
- 	    lim -= cnt;
- 	}
- 	if((top - lim) < BSIZE){
--	    uchar *buf = new uchar[(lim - bot) + BSIZE];
-+	    char *buf = new char[(lim - bot) + BSIZE];
- 	    memcpy(buf, tok, lim - tok);
- 	    tok = buf;
- 	    ptr = &buf[ptr - bot];
-@@ -62,7 +62,7 @@
- 
- 
- int Scanner::echo(ostream &out){
--    uchar *cursor = cur;
-+    char *cursor = cur;
-     tok = cursor;
- echo:
- {
-@@ -117,7 +117,7 @@
- 
- 
- int Scanner::scan(){
--    uchar *cursor = cur;
-+    char *cursor = cur;
-     uint depth;
- 
- scan:
-Index: scanner.h
---- scanner.h.orig	1999-08-27 05:46:32.000000000 +0200
-+++ scanner.h	2004-05-08 10:01:04.000000000 +0200
-@@ -6,10 +6,10 @@
- class Scanner {
-   private:
-     int			in;
--    uchar		*bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
-+    char		*bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
-     uint		tchar, tline, cline;
-   private:
--    uchar *fill(uchar*);
-+    char *fill(char*);
-   public:
-     Scanner(int);
-     int echo(ostream&);
-Index: scanner.re
---- scanner.re.orig	1999-08-27 05:46:32.000000000 +0200
-+++ scanner.re	2004-05-08 10:01:04.000000000 +0200
-@@ -10,7 +10,7 @@
- 
- #define	BSIZE	8192
- 
--#define	YYCTYPE		uchar
-+#define	YYCTYPE		char
- #define	YYCURSOR	cursor
- #define	YYLIMIT		lim
- #define	YYMARKER	ptr
-@@ -25,7 +25,7 @@
-     ;
- }
- 
--uchar *Scanner::fill(uchar *cursor){
-+char *Scanner::fill(char *cursor){
-     if(!eof){
- 	uint cnt = tok - bot;
- 	if(cnt){
-@@ -37,7 +37,7 @@
- 	    lim -= cnt;
- 	}
- 	if((top - lim) < BSIZE){
--	    uchar *buf = new uchar[(lim - bot) + BSIZE];
-+	    char *buf = new char[(lim - bot) + BSIZE];
- 	    memcpy(buf, tok, lim - tok);
- 	    tok = buf;
- 	    ptr = &buf[ptr - bot];
-@@ -68,7 +68,7 @@
- */
- 
- int Scanner::echo(ostream &out){
--    uchar *cursor = cur;
-+    char *cursor = cur;
-     tok = cursor;
- echo:
- /*!re2c
-@@ -85,7 +85,7 @@
- 
- 
- int Scanner::scan(){
--    uchar *cursor = cur;
-+    char *cursor = cur;
-     uint depth;
- 
- scan:

+ 9 - 8
re2c/re2c.spec

@@ -33,12 +33,11 @@ Distribution: OpenPKG
 Class:        EVAL
 Group:        Compiler
 License:      GPL
-Version:      0.9.1
-Release:      20040508
+Version:      0.9.2
+Release:      20040526
 
 #   list of sources
 Source0:      http://osdn.dl.sourceforge.net/sourceforge/re2c/re2c-%{version}.tar.gz
-Patch0:       re2c.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -66,13 +65,15 @@ AutoReqProv:  no
 
 %prep
     %setup -q
-    %patch -p0
 
 %build
-    %{l_make} %{l_mflags} \
-        CC="%{l_cxx}" \
-        CFLAGS="%{l_cflags -O} -I. -Wno-unused -Wno-parentheses -Wno-deprecated" \
-        LEX="flex" YACC="bison -y"
+    CC="%{l_cc}" \
+    CFLAGS="%{l_cflags -O}" \
+    CPPFLAGS="%{l_cppflags}" \
+    CXXFLAGS="%{l_cxxflags -O} -I. -Wno-unused -Wno-parentheses -Wno-deprecated" \
+    ./configure \
+        --prefix=%{l_prefix}
+    %{l_make} %{l_mflags -O}
 
 %install
     rm -rf $RPM_BUILD_ROOT