From eaeaf75d096812a81af1773319f865a68988132b Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 3 Sep 2009 13:14:10 +0000 Subject: DESTDIR support. Fix getline issues. --- lang/p2c/Makefile | 6 +++- lang/p2c/distinfo | 5 ++- lang/p2c/patches/patch-ac | 85 +++++++++++++++++++++++++++++++++++++++++++++++ lang/p2c/patches/patch-ad | 13 ++++++++ lang/p2c/patches/patch-ae | 13 ++++++++ 5 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 lang/p2c/patches/patch-ac create mode 100644 lang/p2c/patches/patch-ad create mode 100644 lang/p2c/patches/patch-ae (limited to 'lang/p2c') diff --git a/lang/p2c/Makefile b/lang/p2c/Makefile index 38e47f34bff..9776ce4c0ea 100644 --- a/lang/p2c/Makefile +++ b/lang/p2c/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2009/08/20 15:24:58 jwise Exp $ +# $NetBSD: Makefile,v 1.11 2009/09/03 13:14:10 joerg Exp $ DISTNAME= p2c-1.20 CATEGORIES= lang @@ -8,7 +8,11 @@ EXTRACT_SUFX= .tar.Z MAINTAINER= pkgsrc-users@NetBSD.org COMMENT= Pascal to C compiler (translates Pascal to C) +PKG_DESTDIR_SUPPORT= user-destdir + WRKSRC= ${WRKDIR}/src CFLAGS+= -Dunix=1 +INSTALL_MAKE_FLAGS= PREFIX=${DESTDIR}${PREFIX} + .include "../../mk/bsd.pkg.mk" diff --git a/lang/p2c/distinfo b/lang/p2c/distinfo index ed625bd1823..5fc6612037f 100644 --- a/lang/p2c/distinfo +++ b/lang/p2c/distinfo @@ -1,7 +1,10 @@ -$NetBSD: distinfo,v 1.3 2005/02/24 09:03:10 agc Exp $ +$NetBSD: distinfo,v 1.4 2009/09/03 13:14:10 joerg Exp $ SHA1 (p2c-1.20.tar.Z) = 797c5394d50567d5195548d3919c5a66ab90f680 RMD160 (p2c-1.20.tar.Z) = 9917ef3f501b1506f2992d572f439398862fba4c Size (p2c-1.20.tar.Z) = 579294 bytes SHA1 (patch-aa) = 0cd351023774bd4ffa50d10b1a02bf37cb54f781 SHA1 (patch-ab) = 852981992cefacd660ae8f136d64e22fb323fb03 +SHA1 (patch-ac) = 25003bcfdaa806bc556c182f33d6c0b95eda83f3 +SHA1 (patch-ad) = 54368e2cead224e1b696d7a1f1c8b0152d7783f1 +SHA1 (patch-ae) = a9299dc05cd831e6ca9977a2fb4c14a09c8f8b24 diff --git a/lang/p2c/patches/patch-ac b/lang/p2c/patches/patch-ac new file mode 100644 index 00000000000..06ab5bde23f --- /dev/null +++ b/lang/p2c/patches/patch-ac @@ -0,0 +1,85 @@ +$NetBSD: patch-ac,v 1.1 2009/09/03 13:14:10 joerg Exp $ + +--- lex.c.orig 1991-04-24 22:30:40.000000000 +0200 ++++ lex.c +@@ -969,7 +969,7 @@ void progress() + + + +-void getline() ++void my_getline() + { + char *cp, *cp2; + +@@ -995,7 +995,7 @@ void getline() + infname = stralloc(cp); + infname[cp2 - cp] = 0; + } +- getline(); ++ my_getline(); + return; + } + if (copysource && *inbuf) { +@@ -1012,7 +1012,7 @@ void getline() + fprintf(stderr, "\n"); + if (inputkind == INP_INCFILE) { + pop_input(); +- getline(); ++ my_getline(); + } else + strcpy(inbuf, "\001"); + } +@@ -1103,7 +1103,7 @@ char *fname; + infname = fname; + inf_lnum = 0; + } else +- inf_lnum--; /* adjust for extra getline() */ ++ inf_lnum--; /* adjust for extra my_getline() */ + *inbuf = 0; + inbufptr = inbuf; + gettok(); +@@ -2206,7 +2206,7 @@ int starparen; /* 0={ }, 1=(* *), 2=C + else + commentline(CMT_POST); + trailing = 0; +- getline(); ++ my_getline(); + i = 0; + for (;;) { + if (*inbufptr == ' ') { +@@ -2258,7 +2258,7 @@ char *getinlinepart() + if (isspace(*inbufptr)) { + inbufptr++; + } else if (!*inbufptr) { +- getline(); ++ my_getline(); + } else if (*inbufptr == '{') { + inbufptr++; + comment(0); +@@ -2352,7 +2352,7 @@ void leadingcomments() + switch (*inbufptr++) { + + case 0: +- getline(); ++ my_getline(); + break; + + case ' ': +@@ -2559,7 +2559,7 @@ void gettok() + case 0: + if (commenting_flag) + saveinputcomment(inbufptr-1); +- getline(); ++ my_getline(); + cp = curtokbuf; + for (;;) { + inbufindent = 0; +@@ -2576,7 +2576,7 @@ void gettok() + } + if (!*inbufptr && !commenting_flag) { /* blank line */ + *cp++ = '\001'; +- getline(); ++ my_getline(); + } else + break; + } diff --git a/lang/p2c/patches/patch-ad b/lang/p2c/patches/patch-ad new file mode 100644 index 00000000000..2aef62fd83b --- /dev/null +++ b/lang/p2c/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2009/09/03 13:14:10 joerg Exp $ + +--- p2c.hdrs.orig 2009-09-03 14:57:47.000000000 +0200 ++++ p2c.hdrs +@@ -163,7 +163,7 @@ extern Symbol *findsymbol_opt PP( ( + extern Symbol *findsymbol PP( (char *name) ); + extern void clearprogress PV(); + extern void progress PV(); +-extern void getline PV(); ++extern void my_getline PV(); + extern void push_input_file PP( (FILE *fp, char *fname, int isinclude) ); + extern void include_as_import PV(); + extern void push_input_strlist PP( (Strlist *sp, char *fname) ); diff --git a/lang/p2c/patches/patch-ae b/lang/p2c/patches/patch-ae new file mode 100644 index 00000000000..e0a0308ba96 --- /dev/null +++ b/lang/p2c/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2009/09/03 13:14:10 joerg Exp $ + +--- parse.c.orig 2009-09-03 14:57:44.000000000 +0200 ++++ parse.c +@@ -3769,7 +3769,7 @@ Token blkind; + out_include(fname, 1); + outsection(majorspace); + pop_input(); +- getline(); ++ my_getline(); + gettok(); + } + -- cgit v1.2.3