aboutsummaryrefslogtreecommitdiff
path: root/devel/ecgi
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-06-14 10:11:01 +0000
committerJohn Marino <marino@FreeBSD.org>2014-06-14 10:11:01 +0000
commit9e56b671c872b1c31287def7e1b535ded6fcc091 (patch)
tree0967d7c8da85bc88d68ddd69c79d75b4c6d80ae3 /devel/ecgi
parent49a67b7234a7c797bd0260829201471f7ef9e183 (diff)
downloadports-9e56b671c872b1c31287def7e1b535ded6fcc091.tar.gz
ports-9e56b671c872b1c31287def7e1b535ded6fcc091.zip
Resurrect devel/ecgi with stage support
The port had been essentially unmaintained since 2006 and was removed three years ago. It needs some TLC to bring it up to modern standards. Pass maintainership to submitter. PR: 189010 Submitted by: Chris Hutchinson Add'l fixes by: marino
Notes
Notes: svn path=/head/; revision=357760
Diffstat (limited to 'devel/ecgi')
-rw-r--r--devel/ecgi/Makefile40
-rw-r--r--devel/ecgi/distinfo2
-rw-r--r--devel/ecgi/files/patch-Makefile75
-rw-r--r--devel/ecgi/files/patch-html2h_Makefile17
-rw-r--r--devel/ecgi/files/patch-html2h_html2h.c29
-rw-r--r--devel/ecgi/files/patch-src_ecgitk.c11
-rw-r--r--devel/ecgi/pkg-descr9
-rw-r--r--devel/ecgi/pkg-plist9
8 files changed, 192 insertions, 0 deletions
diff --git a/devel/ecgi/Makefile b/devel/ecgi/Makefile
new file mode 100644
index 000000000000..48f2e0f8f6fc
--- /dev/null
+++ b/devel/ecgi/Makefile
@@ -0,0 +1,40 @@
+# Created by: George Reid <greid@ukug.uk.freebsd.org>
+# $FreeBSD$
+
+PORTNAME= ecgi
+PORTVERSION= 0.6.2
+PORTREVISION= 2
+CATEGORIES= devel
+MASTER_SITES= http://bsdforge.com/projects/source/devel/ecgi/
+
+MAINTAINER= portmaster@bsdforge.com
+COMMENT= Library for the creation of CGI-based Web applications
+
+LICENSE= BSD3CLAUSE
+
+USES= gmake tar:xz
+PORTDOCS= *
+HEADER_FILES= ecgi.h ecgitk.h include/memfile.h
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+pre-patch:
+ @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' ${WRKSRC}/src/memfile.c
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/libecgi.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/libecgi.so ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/html2h/html2h ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${PREFIX}/include/ecgi
+.for file in ${HEADER_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/include/ecgi
+.endfor
+
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/ecgitut.txt ${STAGEDIR}${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/ecgi/distinfo b/devel/ecgi/distinfo
new file mode 100644
index 000000000000..9339f2d777b2
--- /dev/null
+++ b/devel/ecgi/distinfo
@@ -0,0 +1,2 @@
+SHA256 (ecgi-0.6.2.tar.xz) = e8d8f00a9209c2ef87e100d35c15bc0e54c3f778e34c9551703f66c88d29e331
+SIZE (ecgi-0.6.2.tar.xz) = 163836
diff --git a/devel/ecgi/files/patch-Makefile b/devel/ecgi/files/patch-Makefile
new file mode 100644
index 000000000000..8966f66e0e89
--- /dev/null
+++ b/devel/ecgi/files/patch-Makefile
@@ -0,0 +1,75 @@
+--- Makefile.orig 2014-04-26 01:07:05.381866626 -0700
++++ Makefile 2014-04-26 01:19:01.457333201 -0700
+@@ -1,14 +1,14 @@
+ SHAREDOPT = -shared
+-LIBDIR = /usr/lib
+-INCDIR = /usr/include
++LIBDIR = $(PREFIX)/usr/lib
++INCDIR = $(PREFIX)/include
+ AR = ar
+-CC = gcc
++CC?= gcc
+ INCS = -Iinclude/ -I.
+-FLAGS = -Wall
++CFLAGS += -Wall
+
+ all: obj/ecgi.o obj/ecgitk.o libecgi.a
+- make -C html2h/
+- make libecgi.so
++ $(MAKE) -C html2h/
++ $(MAKE) libecgi.so
+
+ shared: libecgi.so
+ cp libecgi.so /usr/lib
+@@ -18,33 +18,42 @@
+ ar rs libecgi.a obj/ecgi.o obj/memfile.o obj/ecgitk.o
+ printf "\n\n***congratulations - compilation worked***\n*** run 'make install' now ***\n\n"
+
+-libecgi.so: obj/ecgi.o obj/ecgitk.o
+- gcc $(SHAREDOPT) obj/ecgi.o obj/memfile.o obj/ecgitk.o -o libecgi.so
++libecgi.so: obj/ecgi.So obj/ecgitk.So obj/memfile.So
++ $(CC) $(SHAREDOPT) obj/ecgi.So obj/memfile.So obj/ecgitk.So -o libecgi.so
+
+ install:
+ cp libecgi.a $(LIBDIR)
+ cp ecgi.h $(INCDIR)
+ cp include/memfile.h $(INCDIR)
+ cp ecgitk.h $(INCDIR)
+- make -C html2h/ install
++ $(MAKE) -C html2h/ install
+ cp libecgi.so $(LIBDIR)
+
+ tests: all
+- $(CC) tests/test.c -o tests/test.cgi $(INCS) $(FLAGS) libecgi.a
+- $(CC) tests/testload.c -o tests/testload libecgi.a $(INCS) $(FLAGS)
++ $(CC) tests/test.c -o tests/test.cgi $(INCS) $(CFLAGS) libecgi.a
++ $(CC) tests/testload.c -o tests/testload libecgi.a $(INCS) $(CFLAGS)
+
+ obj/ecgi.o: src/ecgi.c ecgi.h obj/memfile.o
+- $(CC) -c src/ecgi.c $(INCS) $(FLAGS) -o obj/ecgi.o
++ $(CC) -c src/ecgi.c $(INCS) $(CFLAGS) -o obj/ecgi.o
+
+ obj/memfile.o: src/memfile.c include/memfile.h
+- $(CC) -o obj/memfile.o -c src/memfile.c $(INCS) $(FLAGS)
++ $(CC) -o obj/memfile.o -c src/memfile.c $(INCS) $(CFLAGS)
+
+ obj/ecgitk.o: src/ecgitk.c ecgitk.h
+- $(CC) -c src/ecgitk.c $(INCS) $(FLAGS) -o obj/ecgitk.o
++ $(CC) -c src/ecgitk.c $(INCS) $(CFLAGS) -o obj/ecgitk.o
++
++obj/ecgi.So: src/ecgi.c ecgi.h obj/memfile.o
++ $(CC) -c src/ecgi.c $(INCS) $(CFLAGS) -fPIC -o obj/ecgi.So
++
++obj/memfile.So: src/memfile.c include/memfile.h
++ $(CC) -o obj/memfile.So -c src/memfile.c -fPIC $(INCS) $(CFLAGS)
++
++obj/ecgitk.So: src/ecgitk.c ecgitk.h
++ $(CC) -c src/ecgitk.c $(INCS) $(CFLAGS) -fPIC -o obj/ecgitk.So
+
+ clean:
+ rm -f obj/* *.a *.so -f tests/test.cgi tests/testload
+- make -C html2h/ clean
++ $(MAKE) -C html2h/ clean
+
+ zip: clean
+ rm -f ../ecgi-0.6.2.zip
diff --git a/devel/ecgi/files/patch-html2h_Makefile b/devel/ecgi/files/patch-html2h_Makefile
new file mode 100644
index 000000000000..9633da73e99d
--- /dev/null
+++ b/devel/ecgi/files/patch-html2h_Makefile
@@ -0,0 +1,17 @@
+--- html2h/Makefile.orig 2014-04-26 01:31:51.028376169 -0700
++++ html2h/Makefile 2014-04-26 01:38:06.265403221 -0700
+@@ -1,11 +1,11 @@
+-CC = gcc
++CC?= gcc
+ INCS = -I../include/ -I.
+-FLAGS = -Wall
++CFLAGS += -Wall
+
+ all: html2h
+
+ html2h: html2h.c html2h.h
+- $(CC) html2h.c -o html2h $(INCS) $(FLAGS) ../obj/memfile.o
++ $(CC) html2h.c -o html2h $(INCS) $(CFLAGS) ../obj/memfile.o
+
+ install: all
+ cp html2h /usr/bin
diff --git a/devel/ecgi/files/patch-html2h_html2h.c b/devel/ecgi/files/patch-html2h_html2h.c
new file mode 100644
index 000000000000..56860e4cded7
--- /dev/null
+++ b/devel/ecgi/files/patch-html2h_html2h.c
@@ -0,0 +1,29 @@
+--- html2h/html2h.c.orig 2014-04-26 08:44:43.000000000 +0000
++++ html2h/html2h.c
+@@ -6,15 +6,10 @@
+
+ void usage()
+ {
+- printf("
+-html2h v0.1
+-usage:
+- html2h input.html [output.h]
+-
+- if output is not set, input.h will be generated and overwritten!
+-
+- debug messages are written to stderr!
+-
++ printf("html2h v0.1\nusage:\n \
++ html2h input.html [output.h]\n\n \
++ if output is not set, input.h will be generated and overwritten!\n\n \
++ debug messages are written to stderr!\n\n \
+ ");
+
+ exit(0);
+@@ -415,4 +410,4 @@ void pexit(char *msg, const char *commen
+ {
+ fprintf(stderr, "%s%s\n", msg, comment);
+ exit(1);
+-}
+\ No newline at end of file
++}
diff --git a/devel/ecgi/files/patch-src_ecgitk.c b/devel/ecgi/files/patch-src_ecgitk.c
new file mode 100644
index 000000000000..60bd4565c41d
--- /dev/null
+++ b/devel/ecgi/files/patch-src_ecgitk.c
@@ -0,0 +1,11 @@
+--- src/ecgitk.c.orig 2014-04-26 08:53:43.000000000 +0000
++++ src/ecgitk.c
+@@ -23,7 +23,7 @@ int ctkRedirect(const char *format, ...)
+ {
+ char buf[4096];
+ int used;
+- va_list *ap;
++ va_list ap;
+
+ va_start(ap, (void*)format);
+ used=vsnprintf(buf, 4095, format, ap);
diff --git a/devel/ecgi/pkg-descr b/devel/ecgi/pkg-descr
new file mode 100644
index 000000000000..737d8e022854
--- /dev/null
+++ b/devel/ecgi/pkg-descr
@@ -0,0 +1,9 @@
+ecgi (easy CGI Libary) is an ANSI C library for the creation of
+CGI-based Web applications. It transparently supports the CGI methods
+GET and POST and also multipart/form-data file uploads. The user
+interface is designed to be as easy as possible and maintains full
+compatibility to cgic 0.5.
+
+It also contains a library independent introduction to CGI programming
+with C, a .html to .h HTML template preprocessor, and fast,
+block-allocating memory files.
diff --git a/devel/ecgi/pkg-plist b/devel/ecgi/pkg-plist
new file mode 100644
index 000000000000..baada68c858c
--- /dev/null
+++ b/devel/ecgi/pkg-plist
@@ -0,0 +1,9 @@
+bin/html2h
+lib/libecgi.a
+lib/libecgi.so
+include/ecgi/ecgi.h
+include/ecgi/ecgitk.h
+include/ecgi/memfile.h
+%%PORTDOCS%%share/doc/ecgi/ecgitut.txt
+%%PORTDOCS%%@dirrm share/doc/ecgi
+@dirrm include/ecgi