Index: www/Makefile =================================================================== --- www/Makefile +++ www/Makefile @@ -81,6 +81,7 @@ SUBDIR += choqok-kde4 SUBDIR += chpasswd SUBDIR += chromium + SUBDIR += civetweb SUBDIR += ckeditor SUBDIR += cl-lml SUBDIR += cl-lml-sbcl Index: www/civetweb/Makefile =================================================================== --- /dev/null +++ www/civetweb/Makefile @@ -0,0 +1,55 @@ +# $FreeBSD$ + +PORTNAME= civetweb +DISTVERSIONPREFIX= v +DISTVERSION= 1.11 +CATEGORIES= www devel + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Embedded C/C++ web server library and standalone binary + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +# XXX: gsed is required until upstream uses more portable syntax. +BUILD_DEPENDS= gsed:textproc/gsed + +USES= gmake + +USE_GITHUB= yes + +BINARY_ALIAS= sed=gsed + +# Notes: +# - CAN_INSTALL has to be set before the building system to install anything. +# - DOCUMENT_ROOT has to be set to DOCSDIR as it is hardcoded in configuration +# files. +MAKE_ARGS= \ + CAN_INSTALL="1" \ + DOCUMENT_ROOT="${DOCSDIR}" + +# XXX: Some options required by prometheus-cpp are probably missing. +# XXX: Not every knob available in the civetweb's build system is represented +# here by an option (for example Lua support). +OPTIONS_DEFINE= CPP DEBUG DOCS IPV6 SERVER_BINARY +OPTIONS_DEFAULT=CPP IPV6 SERVER_BINARY +OPTIONS_SUB= yes + +CPP_DESC= Install C++ interface headers +# Note: Upstream does not install headers with their default "install" target. +CPP_INSTALL_TARGET+= install-headers +CPP_MAKE_ARGS+= WITH_CPP="1" + +DEBUG_MAKE_ARGS+= WITH_DEBUG="1" + +IPV6_DESC= Build with IPv6 support +IPV6_MAKE_ARGS+= WITH_IPV6="1" + +SERVER_BINARY_DESC= Install a standalone server binary +SERVER_BINARY_BUILD_TARGET+= build +SERVER_BINARY_INSTALL_TARGET+= install + +BUILD_TARGET= lib +INSTALL_TARGET= install-lib + +.include Index: www/civetweb/distinfo =================================================================== --- /dev/null +++ www/civetweb/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1536831140 +SHA256 (civetweb-civetweb-v1.11_GH0.tar.gz) = de7d5e7a2d9551d325898c71e41d437d5f7b51e754b242af897f7be96e713a42 +SIZE (civetweb-civetweb-v1.11_GH0.tar.gz) = 11421650 Index: www/civetweb/files/patch-Makefile =================================================================== --- /dev/null +++ www/civetweb/files/patch-Makefile @@ -0,0 +1,37 @@ +--- Makefile.orig 2018-09-10 18:26:23 UTC ++++ Makefile +@@ -19,10 +19,10 @@ BUILD_DIR = out + # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html + PREFIX ?= /usr/local + EXEC_PREFIX = $(PREFIX) +-BINDIR = $(EXEC_PREFIX)/bin +-DATAROOTDIR = $(PREFIX)/share ++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin ++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share + DOCDIR = $(DATAROOTDIR)/doc/$(CPROG) +-SYSCONFDIR = $(PREFIX)/etc ++SYSCONFDIR = $(DESTDIR)$(PREFIX)/etc + HTMLDIR = $(DOCDIR) + INCLUDEDIR = $(DESTDIR)$(PREFIX)/include + LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib +@@ -270,6 +270,7 @@ build: $(CPROG) $(CXXPROG) + unit_test: $(UNIT_TEST_PROG) + + ifeq ($(CAN_INSTALL),1) ++ + install: $(HTMLDIR)/index.html $(SYSCONFDIR)/civetweb.conf + install -d -m 755 "$(DOCDIR)" + install -m 644 *.md "$(DOCDIR)" +@@ -300,9 +301,9 @@ $(HTMLDIR)/index.html: + # as it may be an upgrade + $(SYSCONFDIR)/civetweb.conf: + install -d -m 755 "$(SYSCONFDIR)" +- install -m 644 resources/civetweb.conf "$(SYSCONFDIR)/" +- @sed -i 's#^document_root.*$$#document_root $(DOCUMENT_ROOT)#' "$(SYSCONFDIR)/civetweb.conf" +- @sed -i 's#^listening_ports.*$$#listening_ports $(PORTS)#' "$(SYSCONFDIR)/civetweb.conf" ++ sed -e 's#^document_root.*$$#document_root $(DOCUMENT_ROOT)#' -e 's#^listening_ports.*$$#listening_ports $(PORTS)#' "resources/civetweb.conf" > "resources/civetweb.conf.tmp" ++ install -m 644 resources/civetweb.conf.tmp "$(SYSCONFDIR)/civetweb.conf" ++ $(RMF) resources/civetweb.conf.tmp + + else + install: Index: www/civetweb/pkg-descr =================================================================== --- /dev/null +++ www/civetweb/pkg-descr @@ -0,0 +1,11 @@ +CivetWeb is an easy to use, powerful, C/C++ embeddable web server with optional +CGI, SSL and Lua support. + +CivetWeb can be used by developers as a library, to add web server +functionality to an existing application. CivetWeb uses an MIT license. + +It can also be used by end users as a stand-alone web server. It is available +as single executable, no installation is required. + +The current stable version is 1.10 - release notes +WWW: http://civetweb.github.io/civetweb/ Index: www/civetweb/pkg-plist =================================================================== --- /dev/null +++ www/civetweb/pkg-plist @@ -0,0 +1,11 @@ +%%SERVER_BINARY%%bin/civetweb +etc/civetweb.conf +lib/libcivetweb.a +%%PORTDOCS%%%%DOCSDIR%%/CREDITS.md +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.md +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES.md +%%PORTDOCS%%%%DOCSDIR%%/civetweb_64x64.png +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%CPP%%include/CivetServer.h +%%CPP%%include/civetweb.h