mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
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
This commit is contained in:
parent
49a67b7234
commit
9e56b671c8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357760
1
MOVED
1
MOVED
@ -2058,7 +2058,6 @@ devel/c2man||2011-05-02|Has expired: Upstream disappeared and distfile is no lon
|
||||
devel/c_parser||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/cdoc||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/diffconvert||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/ecgi||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/error||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/excalibur-configuration||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/freelibiberty||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
|
@ -389,6 +389,7 @@
|
||||
SUBDIR += eblob
|
||||
SUBDIR += ebnf2yacc
|
||||
SUBDIR += ecb
|
||||
SUBDIR += ecgi
|
||||
SUBDIR += eclipse-eclemma
|
||||
SUBDIR += ecore
|
||||
SUBDIR += ecore-file
|
||||
|
40
devel/ecgi/Makefile
Normal file
40
devel/ecgi/Makefile
Normal file
@ -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>
|
2
devel/ecgi/distinfo
Normal file
2
devel/ecgi/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (ecgi-0.6.2.tar.xz) = e8d8f00a9209c2ef87e100d35c15bc0e54c3f778e34c9551703f66c88d29e331
|
||||
SIZE (ecgi-0.6.2.tar.xz) = 163836
|
75
devel/ecgi/files/patch-Makefile
Normal file
75
devel/ecgi/files/patch-Makefile
Normal file
@ -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
|
17
devel/ecgi/files/patch-html2h_Makefile
Normal file
17
devel/ecgi/files/patch-html2h_Makefile
Normal file
@ -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
|
29
devel/ecgi/files/patch-html2h_html2h.c
Normal file
29
devel/ecgi/files/patch-html2h_html2h.c
Normal file
@ -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
|
||||
+}
|
11
devel/ecgi/files/patch-src_ecgitk.c
Normal file
11
devel/ecgi/files/patch-src_ecgitk.c
Normal file
@ -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);
|
9
devel/ecgi/pkg-descr
Normal file
9
devel/ecgi/pkg-descr
Normal file
@ -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.
|
9
devel/ecgi/pkg-plist
Normal file
9
devel/ecgi/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user