================================ pccts:source=1.33.33-1 cvc rdiff pccts -1 /weasel.rpath.org@wgl:3-devel/1.33.33-1 ================================ 1.33.33-1 Filip Brcic (brcha@xxxxxxxxxxxx) Sun Jun 13 20:59:39 2010 pccts 1.33.33 pccts.recipe: new --- /dev/null +++ pccts.recipe @@ -0,0 +73 @@ +# +# Copyright (c) 2010 Weasel GNU/Linux [Filip Brcic (brcha@xxxxxxxxxxxx)] +# Distributed under the terms of the GNU General Public License v3 +# + +class Pccts(CPackageRecipe): + name = 'pccts' + version = '1.33.33' + + buildRequires = [ + 'unzip:runtime', + ] + + shortDesc = 'Purdue Compiler Construction Tool Set is an embedded C/C++ parser generator' + longDesc = """ +PCCTS, the Purdue Compiler Construction Tool Set, is a set of +public-domain software tools designed to facilitate the construction +of compilers and other translation systems. Although originally +developed primarily for internal use within Purdue University, these +tools are now everywhere. While working on his MS and PhD under +Prof. Hank Dietz, T. Parr was the primary developer of PCCTS, and he +has continued to maintain and extend it. +""" + url = 'http://www.polhode.com/' + licenses = [ 'BSD' ] + categories = [ 'Development/Utilities' ] + + def setup(r): + r.addArchive('http://www.polhode.com/pccts133mr33.zip') + + r.addPatch('pccts-1.33.33-gentoo.diff') + + r.Make( + ' CC="%(cc)s"' + ' COPT="%(cflags)s"' + ) + + # main binaries + r.Install('bin/{antlr,dlg,genmk,sor}', + '%(bindir)s/') + + # .c and .cpp files go into /usr/include/pccts also, + # because genmk looks for them for being included in output-files + # (which are c/c++) generated from grammar-files + # right now i include _everything_ just to make sure + # it doesn't break pccts-based projects + # + # if i dive further into the details of genmk.c + # it should be possible to put that stuff into /usr/share/pccts + # + # the M$ and MAC specific stuff gets _not_ included + # + # main includes + r.Install('h/*.{h,c,cpp}', + '%(includedir)s/pccts/') + + # sorcerer includes + r.Install('sorcerer/h/*.h', + '%(includedir)s/pccts/sorcerer/') + + # sorcerer libraries + r.Install('sorcerer/lib/*.{h,c,cpp}', + '%(includedir)s/pccts/sorcerer/lib/') + + # documentation + # leaving out the M$ and MAC stuff + r.Doc('CHANGES*', 'KNOWN_PROBLEMS*', 'README', 'RIGHTS', + 'history.txt', 'history.ps') + r.Doc('sorcerer/README', 'sorcerer/UPDATES', dir='sorcerer') + + # manual pages + r.Install('dlg/dlg.1', '%(mandir)s/man1/') + r.Install('antlr/antlr.1', '%(mandir)s/man1/') pccts133mr33.zip: new pccts-1.33.33-gentoo.diff: new --- /dev/null +++ pccts-1.33.33-gentoo.diff @@ -0,0 +69 @@ +--- pccts/support/genmk/genmk.c Fri Aug 3 17:12:51 2001 ++++ pccts/support/genmk/genmk-gentoo.c Fri Aug 3 17:12:14 2001 +@@ -7,6 +7,11 @@ + * U of MN + */ + ++/* modified 20010803 by Peter Kadau ++ * for better fhs-compliance ++ * i.e. from "none" to "hmmm soso" ;-) ++ */ ++ + #include <stdio.h> + #include <string.h> + #include "pcctscfg.h" /* be sensitive to what ANTLR/DLG call the files */ +@@ -65,7 +70,7 @@ + static int nondef_comp = 0; /* 1=compiler is non default */ + static char *compilerCCC="CC"; + static char *compilerCC="cc"; +-static char *pccts_path="/usr/local/pccts"; ++static char *pccts_path="/usr/include/pccts"; + + #ifdef __STDC__ + void help(void); +@@ -356,7 +361,7 @@ + { "-cfiles",1,pCFiles, "Additional files in C or C++ to compile"}, + { "-sor",0,pSor, "Start of sorcerer group"}, + { "-pccts_path",1,ppccts_path, +- "Path for $PCCTS directory (default is /usr/local/pccts)"}, ++ "Path for $PCCTS directory (default is /usr/include/pccts)"}, + { "-compiler",1,pCompiler, + "Default compiler (default is CC/cc)"}, + { "*", 0,pFile, "" }, /* anything else is a file */ +@@ -495,13 +500,13 @@ + else printf("SCAN = %s%s\n", DIR(), dlg_class); + + printf("PCCTS = %s\n",pccts_path); +- printf("ANTLR_H = $(PCCTS)%sh\n", DirectorySymbol); ++ printf("ANTLR_H = $(PCCTS)\n"); + if (num_sors>0) { +- printf("SOR_H = $(PCCTS)%ssorcerer%sh\n", DirectorySymbol, DirectorySymbol); ++ printf("SOR_H = $(PCCTS)%ssorcerer\n", DirectorySymbol); + printf("SOR_LIB = $(PCCTS)%ssorcerer%slib\n", + DirectorySymbol, DirectorySymbol); + } +- printf("BIN = $(PCCTS)%sbin\n", DirectorySymbol); ++ printf("BIN = %susr%sbin\n", DirectorySymbol, DirectorySymbol); + printf("ANTLR = $(BIN)%santlr\n", DirectorySymbol); + printf("DLG = $(BIN)%sdlg\n", DirectorySymbol); + if (num_sors>0) printf("SOR = $(BIN)%ssor\n", DirectorySymbol); +--- pccts/sorcerer/lib/sorlist.c 1999-06-30 03:15:56.000000000 +0200 ++++ pccts/sorcerer/lib/sorlist.c.new 2003-05-23 11:11:09.000000000 +0200 +@@ -28,6 +28,7 @@ + */ + #include <stdio.h> + #include <setjmp.h> ++#include "pcctscfg.h" + + #ifdef PCCTS_USE_STDARG + #include <stdarg.h> +--- pccts/sorcerer/lib/sintstack.c 1999-06-30 15:08:06.000000000 +0200 ++++ pccts/sorcerer/lib/sintstack.c.new 2003-05-23 12:54:26.000000000 +0200 +@@ -28,6 +28,7 @@ + */ + #include <stdio.h> + #include <setjmp.h> ++#include "pcctscfg.h" + + #ifdef PCCTS_USE_STDARG + #include <stdarg.h> Committed by: brcha