aboutsummaryrefslogtreecommitdiffstats
path: root/devel/cbind
diff options
context:
space:
mode:
authorlaszlof <laszlof@FreeBSD.org>2006-11-09 21:56:24 +0800
committerlaszlof <laszlof@FreeBSD.org>2006-11-09 21:56:24 +0800
commit2ca242f330bb4a981c6955171cc47e5a94d4de17 (patch)
treed966cbe347f8863d723b229a6fcc364c3505dd27 /devel/cbind
parent6f5bea4149cb3b3f5f12d248da22a324e62228c4 (diff)
downloadfreebsd-ports-gnome-2ca242f330bb4a981c6955171cc47e5a94d4de17.tar.gz
freebsd-ports-gnome-2ca242f330bb4a981c6955171cc47e5a94d4de17.tar.zst
freebsd-ports-gnome-2ca242f330bb4a981c6955171cc47e5a94d4de17.zip
New Port: devel/cbind
This tool is designed to aid in the creation of Ada bindings to C. PR: ports/105182 Submitted By: "John Merryweather Cooper" <john_m_cooper@yahoo.com> Approved By: flz (mentor)
Diffstat (limited to 'devel/cbind')
-rw-r--r--devel/cbind/Makefile41
-rw-r--r--devel/cbind/distinfo3
-rw-r--r--devel/cbind/files/patch-Makefile22
-rw-r--r--devel/cbind/files/patch-allocate.c11
-rw-r--r--devel/cbind/files/patch-buffer.c11
-rw-r--r--devel/cbind/files/patch-cbind.c11
-rw-r--r--devel/cbind/files/patch-cdep.c10
-rw-r--r--devel/cbind/files/patch-errors.c115
-rw-r--r--devel/cbind/files/patch-files.c18
-rw-r--r--devel/cbind/files/patch-hostinfo11
-rw-r--r--devel/cbind/files/patch-htype.c17
-rw-r--r--devel/cbind/files/patch-nodeop.c87
-rw-r--r--devel/cbind/files/patch-units.c10
-rw-r--r--devel/cbind/pkg-descr15
-rw-r--r--devel/cbind/pkg-plist6
15 files changed, 388 insertions, 0 deletions
diff --git a/devel/cbind/Makefile b/devel/cbind/Makefile
new file mode 100644
index 000000000000..65e91ddef69a
--- /dev/null
+++ b/devel/cbind/Makefile
@@ -0,0 +1,41 @@
+# New ports collection makefile for: cbind
+# Date created: 23 December 2002
+# Whom: David Holm <david@realityrift.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cbind
+PORTVERSION= 6
+CATEGORIES= devel
+MASTER_SITES= ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/cdrom/ase02_02/tools/cbind/ \
+ ftp://ftp.cnam.fr/pub2/Ada/PAL/swtools/cbind/
+DISTNAME= ${PORTNAME}${PORTVERSION}
+
+MAINTAINER= david@realityrift.com
+COMMENT= Translator for "thin" Ada bindings to C
+
+USE_ZIP= yes
+
+MAN1= cbind.1
+
+${WRKSRC}= ${WRKDIR}/${PORTNAME}
+
+.if !defined(NOPORTDOCS)
+PLIST_SUB+= PORTDOCS=""
+.else
+PLIST_SUB+= PORTDOCS="@comment "
+.endif
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/cbind ${PREFIX}/bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/cbfe ${PREFIX}/bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/cbpp ${PREFIX}/bin
+ @${INSTALL_DATA} ${WRKSRC}/cbind.1 ${PREFIX}/man/man1
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/DOCS ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/cbind/distinfo b/devel/cbind/distinfo
new file mode 100644
index 000000000000..01d45a865ef9
--- /dev/null
+++ b/devel/cbind/distinfo
@@ -0,0 +1,3 @@
+MD5 (cbind6.zip) = 250a2db4799376d3586070c175d6c279
+SHA256 (cbind6.zip) = 206566d6981a100b7a9b0b7006eb87e6f11f5665a2ff97c6a917250b42d0b3ff
+SIZE (cbind6.zip) = 101939
diff --git a/devel/cbind/files/patch-Makefile b/devel/cbind/files/patch-Makefile
new file mode 100644
index 000000000000..fd9fc1f13a8d
--- /dev/null
+++ b/devel/cbind/files/patch-Makefile
@@ -0,0 +1,22 @@
+--- Makefile.orig Fri Sep 22 12:21:32 1995
++++ Makefile Sun Nov 5 13:48:50 2006
+@@ -1,8 +1,8 @@
+ VERSION = 6
+
+-CFLAGS= -g -DPUBLIC
++CFLAGS+= -DPUBLIC
+ LIBS =
+-LINKER = cc
++LINKER = $(CC)
+
+ MAKEFILE= Makefile
+
+@@ -139,7 +139,7 @@
+ touch:; touch $(GENED_SRC)
+
+ hostinfo.h: htype hostinfo
+- hostinfo $@
++ ./hostinfo $@
+
+ c_perf.c: c.prf
+ gperf -N c_rsvd -t -p c.prf > $@
diff --git a/devel/cbind/files/patch-allocate.c b/devel/cbind/files/patch-allocate.c
new file mode 100644
index 000000000000..8491e56be3b7
--- /dev/null
+++ b/devel/cbind/files/patch-allocate.c
@@ -0,0 +1,11 @@
+--- allocate.c.orig Fri May 19 16:53:10 1995
++++ allocate.c Mon Dec 23 08:38:17 2002
+@@ -4,7 +4,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "ansi.h"
+ #include "config.h"
+ #include "allocate.h"
diff --git a/devel/cbind/files/patch-buffer.c b/devel/cbind/files/patch-buffer.c
new file mode 100644
index 000000000000..50d4cdcef34b
--- /dev/null
+++ b/devel/cbind/files/patch-buffer.c
@@ -0,0 +1,11 @@
+--- buffer.c.orig Fri May 19 16:53:44 1995
++++ buffer.c Mon Dec 23 08:38:17 2002
+@@ -5,7 +5,7 @@
+ */
+
+ #include <sys/types.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "ansi.h"
+ #include "buffer.h"
+ #include "allocate.h"
diff --git a/devel/cbind/files/patch-cbind.c b/devel/cbind/files/patch-cbind.c
new file mode 100644
index 000000000000..849a6650356a
--- /dev/null
+++ b/devel/cbind/files/patch-cbind.c
@@ -0,0 +1,11 @@
+--- cbind.c.orig Fri May 19 17:17:06 1995
++++ cbind.c Mon Dec 23 08:38:17 2002
+@@ -6,7 +6,7 @@
+ #include <sys/types.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <malloc.h>
++#include <stdlib.h>
+
+ #undef NULL
+ #define NULL 0
diff --git a/devel/cbind/files/patch-cdep.c b/devel/cbind/files/patch-cdep.c
new file mode 100644
index 000000000000..9b07e9d61eab
--- /dev/null
+++ b/devel/cbind/files/patch-cdep.c
@@ -0,0 +1,10 @@
+--- cdep.c.orig Fri May 19 19:19:36 1995
++++ cdep.c Mon Dec 23 08:38:17 2002
+@@ -12,6 +12,7 @@
+ #include "cpp.h"
+ #include "cpp_hide.h"
+ #include "allocate.h"
++#include "host.h"
+
+ #undef NULL
+ #define NULL 0
diff --git a/devel/cbind/files/patch-errors.c b/devel/cbind/files/patch-errors.c
new file mode 100644
index 000000000000..dd7b990f1f61
--- /dev/null
+++ b/devel/cbind/files/patch-errors.c
@@ -0,0 +1,115 @@
+--- errors.c.orig Fri Oct 28 19:44:44 1994
++++ errors.c Sat Nov 4 22:03:45 2006
+@@ -1,5 +1,5 @@
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <errno.h>
+
+ int Num_Errors;
+@@ -33,75 +33,63 @@
+ }
+
+ void
+-fatal(f, l, fmt, va_alist)
+- char *f, *fmt;
+- int l;
+- va_dcl
++fatal(char *f, int l, char *fmt, ...)
+ {
+- va_list args;
++ va_list ap;
+
+- va_start(args);
++ va_start(ap, fmt);
+
+ prefix(f,l,"Internal error");
+- vfprintf(stderr, fmt, args);
++ vfprintf(stderr, fmt, ap);
+ endmsg();
+
+- va_end(args);
++ va_end(ap);
+
+ exit(1);
+ }
+
+ void
+-error(f, l, fmt, va_alist)
+- char *f, *fmt;
+- int l;
+- va_dcl
++error(char *f, int l, char *fmt, ...)
+ {
+- va_list args;
++ va_list ap;
+
+- va_start(args);
++ va_start(ap, fmt);
+
+ Num_Errors++;
+ prefix(f,l,"Error");
+- vfprintf(stderr, fmt, args);
++ vfprintf(stderr, fmt, ap);
+ endmsg();
+
+- va_end(args);
++ va_end(ap);
+ }
+
+ void
+-warning(f, l, fmt, va_alist)
+- char *f, *fmt;
+- int l;
+- va_dcl
++warning(char *f, int l, char *fmt, ...)
+ {
+- va_list args;
++ va_list ap;
+
+- va_start(args);
++ va_start(ap, fmt);
+
+ Num_Warnings++;
+ prefix(f,l,"Warning");
+- vfprintf(stderr, fmt, args);
++ vfprintf(stderr, fmt, ap);
+ endmsg();
+
+- va_end(args);
++ va_end(ap);
+ }
+
+ void
+-inform(f, l, fmt, va_alist)
+- char *f, *fmt;
+- int l;
+- va_dcl
++inform(char *f, int l, char *fmt, ...)
+ {
+- va_list args;
++ va_list ap;
+
+- va_start(args);
++ va_start(ap, fmt);
+
+ prefix(f,l,"Info");
+- vfprintf(stderr, fmt, args);
++ vfprintf(stderr, fmt, ap);
+ endmsg();
+
+- va_end(args);
++ va_end(ap);
+ }
+
+ void
+@@ -118,9 +106,6 @@
+ static void
+ unix_error()
+ {
+- extern char *sys_errlist[];
+- extern int sys_nerr;
+-
+ if (errno != 0) {
+ if (errno > 0 && errno < sys_nerr) {
+ fputs(sys_errlist[errno], stderr);
diff --git a/devel/cbind/files/patch-files.c b/devel/cbind/files/patch-files.c
new file mode 100644
index 000000000000..9b368b2ac2a8
--- /dev/null
+++ b/devel/cbind/files/patch-files.c
@@ -0,0 +1,18 @@
+--- files.c.orig Fri May 19 16:45:30 1995
++++ files.c Mon Dec 23 08:38:17 2002
+@@ -1,5 +1,6 @@
+ #include "ansi.h"
+ #include "hostinfo.h"
++#include "host.h"
+ #include "config.h"
+
+ #include <sys/types.h>
+@@ -11,7 +12,7 @@
+ #include <sys/mman.h>
+ #else
+ #include <unistd.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #endif
+
+ #undef NULL
diff --git a/devel/cbind/files/patch-hostinfo b/devel/cbind/files/patch-hostinfo
new file mode 100644
index 000000000000..a48d1c7e5dc5
--- /dev/null
+++ b/devel/cbind/files/patch-hostinfo
@@ -0,0 +1,11 @@
+--- hostinfo.orig Thu Apr 7 15:03:16 1994
++++ hostinfo Mon Dec 23 08:38:17 2002
+@@ -4,7 +4,7 @@
+
+ echo '/* This file is automatically generated */' > $1
+ echo '#define _H_HOSTINFO_' >> $1
+-htype >> $1
++./htype >> $1
+
+ cat > llchk.c << _STOP
+ main()
diff --git a/devel/cbind/files/patch-htype.c b/devel/cbind/files/patch-htype.c
new file mode 100644
index 000000000000..2399a7478644
--- /dev/null
+++ b/devel/cbind/files/patch-htype.c
@@ -0,0 +1,17 @@
+--- htype.c.orig Fri May 19 16:52:08 1995
++++ htype.c Mon Dec 23 08:38:17 2002
+@@ -132,10 +132,14 @@
+ printf("\n#define CHARS_ARE_%sSIGNED\n", (((char)-1) < 0) ? "" : "UN");
+
+ if (*p == 1) {
++ puts("#ifndef BIG_ENDIAN");
+ puts("#define BIG_ENDIAN");
++ puts("#endif");
+ }
+ else {
++ puts("#ifndef LITTLE_ENDIAN");
+ puts("#define LITTLE_ENDIAN");
++ puts("#endif");
+ }
+
+ return 0;
diff --git a/devel/cbind/files/patch-nodeop.c b/devel/cbind/files/patch-nodeop.c
new file mode 100644
index 000000000000..6c23eb48b11b
--- /dev/null
+++ b/devel/cbind/files/patch-nodeop.c
@@ -0,0 +1,87 @@
+--- nodeop.c.orig Fri May 19 16:50:54 1995
++++ nodeop.c Sun Nov 5 13:39:44 2006
+@@ -1,5 +1,5 @@
+ #include <sys/types.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <stdio.h>
+ #include "ansi.h"
+ #include "host.h"
+@@ -85,52 +85,50 @@
+ }
+
+ node_t*
+-new_node(kind, va_alist)
+- node_kind_t kind;
+- va_dcl
++new_node(node_kind_t kind, ...)
+ {
+- va_list args;
++ va_list ap;
+ node_t *n;
+
+- va_start(args);
++ va_start(ap, kind);
+
+ n = alloc_node(kind);
+
+ switch (node_classof(kind)) {
+ case _Binary:
+- n->node.binary.l = va_arg(args, node_t*);
+- n->node.binary.r = va_arg(args, node_t*);
++ n->node.binary.l = va_arg(ap, node_t*);
++ n->node.binary.r = va_arg(ap, node_t*);
+ break;
+ case _Unary:
+- n->node.unary = va_arg(args, node_t*);
++ n->node.unary = va_arg(ap, node_t*);
+ break;
+ case _Pointer:
+- n->node.id.name = va_arg(args, char*);
++ n->node.id.name = va_arg(ap, char*);
+ break;
+ case _Other:
+ switch (kind) {
+ case _Elipsis:
+ break;
+ case _String:
+- n->node.str.form = va_arg(args, char*);
+- n->node.str.len = va_arg(args, int);
++ n->node.str.form = va_arg(ap, char*);
++ n->node.str.len = va_arg(ap, int);
+ break;
+ case _Sym:
+- n->node.sym = va_arg(args, symbol_t*);
++ n->node.sym = va_arg(ap, symbol_t*);
+ break;
+ case _Type:
+- n->node.typ = va_arg(args, typeinfo_t*);
++ n->node.typ = va_arg(ap, typeinfo_t*);
+ break;
+ case _Cond:
+- n->node.cond.bool = va_arg(args, node_t*);
+- n->node.cond.tru = va_arg(args, node_t*);
+- n->node.cond.fals = va_arg(args, node_t*);
++ n->node.cond.bool = va_arg(ap, node_t*);
++ n->node.cond.tru = va_arg(ap, node_t*);
++ n->node.cond.fals = va_arg(ap, node_t*);
+ break;
+ case _FP_Number:
+- n->node.fval = va_arg(args, host_float_t);
++ n->node.fval = va_arg(ap, host_float_t);
+ break;
+ case _Int_Number:
+- n->node.ival = va_arg(args, host_int_t);
++ n->node.ival = va_arg(ap, host_int_t);
+ break;
+ default:
+ fatal(__FILE__,__LINE__,"Unandled noded - (%d)", kind);
+@@ -142,7 +140,7 @@
+ break;
+ }
+
+- va_end(args);
++ va_end(ap);
+
+ return n;
+ }
diff --git a/devel/cbind/files/patch-units.c b/devel/cbind/files/patch-units.c
new file mode 100644
index 000000000000..efafae2ab62c
--- /dev/null
+++ b/devel/cbind/files/patch-units.c
@@ -0,0 +1,10 @@
+--- units.c.orig Fri Sep 22 12:06:46 1995
++++ units.c Mon Dec 23 08:38:17 2002
+@@ -2,6 +2,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdio.h>
++#include "host.h"
+ #include "ansi.h"
+ #include "files.h"
+ #include "units.h"
diff --git a/devel/cbind/pkg-descr b/devel/cbind/pkg-descr
new file mode 100644
index 000000000000..e4d0576187ec
--- /dev/null
+++ b/devel/cbind/pkg-descr
@@ -0,0 +1,15 @@
+This tool is designed to AID in the creation of Ada bindings to C.
+The code is provided "as is" without any warranty whatsoever. The
+code is NOT copyrighted but is instead published to the public domain
+as free software. Any attempt to copyright the tool will be refutable
+in a court of law.
+
+I am NOT intending to imply that the bindings generated by this
+translator will be complete. This tool MAY/MAY NOT be useful as an
+AID to generating bindings. Hopefully it can do a lot of the grunt
+work for you.
+
+WWW: ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/cdrom/ase02_02/tools/cbind/
+
+- David Holm
+david@realityrift.com
diff --git a/devel/cbind/pkg-plist b/devel/cbind/pkg-plist
new file mode 100644
index 000000000000..2af53d00c846
--- /dev/null
+++ b/devel/cbind/pkg-plist
@@ -0,0 +1,6 @@
+bin/cbfe
+bin/cbind
+bin/cbpp
+%%PORTDOCS%%%%DOCSDIR%%/DOCS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%