aboutsummaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-06-11 10:55:16 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-06-11 10:55:16 +0000
commit5359f62bc1e6498ac5d70e570e1639bc79111cdd (patch)
tree21d6a8a11f6f6e580da06b7eff5d14e89f7a54ee /devel
parentf487bc432fae9f9b63527188b347bc93853cb47b (diff)
downloadports-5359f62bc1e6498ac5d70e570e1639bc79111cdd.tar.gz
ports-5359f62bc1e6498ac5d70e570e1639bc79111cdd.zip
Notes
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/tradcpp/Makefile21
-rw-r--r--devel/tradcpp/distinfo2
-rw-r--r--devel/tradcpp/files/patch-directive.c56
-rw-r--r--devel/tradcpp/files/patch-files.c20
-rw-r--r--devel/tradcpp/files/patch-output.c11
-rw-r--r--devel/tradcpp/pkg-descr8
7 files changed, 119 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index abafd270a195..e061443633d8 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4355,6 +4355,7 @@
SUBDIR += tortoisehg2
SUBDIR += tpasm
SUBDIR += trac-bitten
+ SUBDIR += tradcpp
SUBDIR += trio
SUBDIR += truc
SUBDIR += uatraits
diff --git a/devel/tradcpp/Makefile b/devel/tradcpp/Makefile
new file mode 100644
index 000000000000..db9315d73e85
--- /dev/null
+++ b/devel/tradcpp/Makefile
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+PORTNAME= tradcpp
+PORTVERSION= 0.1
+CATEGORIES= devel
+MASTER_SITES= http://ftp.NetBSD.org/pub/NetBSD/misc/dholland/
+
+MAINTAINER= bapt@FreeBSD.org
+COMMENT= Traditional (K&R-style) C preprocessor
+
+LICENSE= BSD
+
+PLIST_FILES= bin/tradcpp
+
+post-patch:
+ @${REINPLACE_CMD} 's/NOMAN/NO_MAN/' ${WRKSRC}/Makefile
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/devel/tradcpp/distinfo b/devel/tradcpp/distinfo
new file mode 100644
index 000000000000..f823672233b2
--- /dev/null
+++ b/devel/tradcpp/distinfo
@@ -0,0 +1,2 @@
+SHA256 (tradcpp-0.1.tar.gz) = b3f92103bbf5df833364cd80746c5c6d14b17581cb2a4fba09739cee01445fae
+SIZE (tradcpp-0.1.tar.gz) = 28288
diff --git a/devel/tradcpp/files/patch-directive.c b/devel/tradcpp/files/patch-directive.c
new file mode 100644
index 000000000000..9dcb782ca011
--- /dev/null
+++ b/devel/tradcpp/files/patch-directive.c
@@ -0,0 +1,56 @@
+--- ./directive.c.orig 2013-06-11 06:14:31.000000000 +0200
++++ ./directive.c 2013-06-11 14:19:53.281451337 +0200
+@@ -238,7 +238,7 @@
+
+ static
+ void
+-d_else(struct place *p, struct place *p2, char *line)
++d_else(struct place *p, struct place *p2 __unused, char *line __unused)
+ {
+ if (ifstate->seenelse) {
+ complain(p, "Multiple #else directives in one conditional");
+@@ -252,7 +252,7 @@
+
+ static
+ void
+-d_endif(struct place *p, struct place *p2, char *line)
++d_endif(struct place *p, struct place *p2 __unused, char *line __unused)
+ {
+ if (ifstate->prev == NULL) {
+ complain(p, "Unmatched #endif");
+@@ -267,7 +267,7 @@
+
+ static
+ void
+-d_define(struct place *p, struct place *p2, char *line)
++d_define(struct place *p __unused, struct place *p2, char *line)
+ {
+ size_t pos, argpos;
+ struct place p3, p4;
+@@ -330,7 +330,7 @@
+
+ static
+ void
+-d_undef(struct place *p, struct place *p2, char *line)
++d_undef(struct place *p __unused, struct place *p2, char *line)
+ {
+ uncomment(line);
+ oneword("#undef", p2, line);
+@@ -393,7 +393,7 @@
+
+ static
+ void
+-d_line(struct place *p, struct place *p2, char *line)
++d_line(struct place *p, struct place *p2 __unused, char *line __unused)
+ {
+ /* XXX */
+ complain(p, "Sorry, no #line yet");
+@@ -433,7 +433,7 @@
+
+ static
+ void
+-d_pragma(struct place *p, struct place *p2, char *line)
++d_pragma(struct place *p, struct place *p2 __unused, char *line)
+ {
+ complain(p, "#pragma %s", line);
+ complain_fail();
diff --git a/devel/tradcpp/files/patch-files.c b/devel/tradcpp/files/patch-files.c
new file mode 100644
index 000000000000..68978793b261
--- /dev/null
+++ b/devel/tradcpp/files/patch-files.c
@@ -0,0 +1,20 @@
+--- ./files.c.orig 2013-06-11 14:21:06.504446578 +0200
++++ ./files.c 2013-06-11 14:23:44.928830892 +0200
+@@ -340,6 +340,17 @@
+
+ assert(place != NULL);
+
++ if (name[0] == '/') {
++ fd = file_tryopen(name);
++ if (fd >= 0) {
++ pf = place_addfile(place, name, true);
++ file_read(pf, fd, name, false);
++ close(fd);
++ return;
++ }
++ complain(place, "Include file %s not found", name);
++ complain_fail();
++ }
+ num = incdirarray_num(path);
+ for (i=0; i<num; i++) {
+ id = incdirarray_get(path, i);
diff --git a/devel/tradcpp/files/patch-output.c b/devel/tradcpp/files/patch-output.c
new file mode 100644
index 000000000000..56740d31b8a1
--- /dev/null
+++ b/devel/tradcpp/files/patch-output.c
@@ -0,0 +1,11 @@
+--- ./output.c.orig 2013-06-11 06:14:31.000000000 +0200
++++ ./output.c 2013-06-11 14:19:53.285452684 +0200
+@@ -96,7 +96,7 @@
+
+ static
+ void
+-filter_output(const struct place *p, const char *buf, size_t len)
++filter_output(const struct place *p __unused, const char *buf, size_t len)
+ {
+ size_t pos, start;
+ bool inesc = false;
diff --git a/devel/tradcpp/pkg-descr b/devel/tradcpp/pkg-descr
new file mode 100644
index 000000000000..cfc616c0efe5
--- /dev/null
+++ b/devel/tradcpp/pkg-descr
@@ -0,0 +1,8 @@
+tradcpp is a traditional (K&R-style) preprocessor.
+
+It has the particular property that it doesn't (for the most part)
+trash whitespace, so it can be used on makefiles.
+
+This is only release 0.1; it is missing some features and doubtless
+has quite a few bugs, but it's capable of building at least some
+packages when used with imake.