From owner-svn-ports-all@FreeBSD.ORG Mon Aug 4 14:25:45 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5455EAF9 for ; Mon, 4 Aug 2014 14:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35522262A for ; Mon, 4 Aug 2014 14:25:45 +0000 (UTC) Received: from sem (uid 1024) (envelope-from sem@FreeBSD.org) id 5a4f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 14:25:44 +0000 From: Sergey Matveychuk Date: Mon, 4 Aug 2014 14:25:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364013 - in head/www: . mongoose mongoose/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53df97e8.5a4f.726acd95@svn.freebsd.org> X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 14:25:45 -0000 Author: sem Date: Mon Aug 4 14:25:43 2014 New Revision: 364013 URL: http://svnweb.freebsd.org/changeset/ports/364013 QAT: https://qat.redports.org/buildarchive/r364013/ Log: A new port: www/mongoose Added: head/www/mongoose/ head/www/mongoose/Makefile (contents, props changed) head/www/mongoose/distinfo (contents, props changed) head/www/mongoose/files/ head/www/mongoose/files/mongoose.in (contents, props changed) head/www/mongoose/files/patch-mongoose.c (contents, props changed) head/www/mongoose/pkg-descr (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Mon Aug 4 14:21:40 2014 (r364012) +++ head/www/Makefile Mon Aug 4 14:25:43 2014 (r364013) @@ -539,6 +539,7 @@ SUBDIR += mohawk SUBDIR += moinmoin SUBDIR += monast + SUBDIR += mongoose SUBDIR += mongrel2 SUBDIR += moodle24 SUBDIR += moodle25 Added: head/www/mongoose/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/mongoose/Makefile Mon Aug 4 14:25:43 2014 (r364013) @@ -0,0 +1,89 @@ +# Created by: Boris Lytochkin (lytboris@gmail.com) +# $FreeBSD$ + +PORTNAME= mongoose +PORTVERSION= 5.3 +CATEGORIES= www + +MAINTAINER= lytboris@gmail.com +COMMENT= Small, fast, embeddable web server with CGI, SSL, Authorization + +LICENSE= GPLv2 + +USE_GITHUB= yes +GH_ACCOUNT= cesanta +GH_TAGNAME= ${GH_COMMIT} +GH_COMMIT= 30a7965 + +USES= gmake dos2unix + +ALL_TARGET= server +MAKE_ENV= LIBS=-lpthread +BUILD_WRKSRC= ${WRKSRC}/examples + +USE_RC_SUBR= mongoose + +NO_OPTIONS_SORT= YES + +FS_DESC=Filesystem options + +OPTIONS_MONGOOSE=AUTH CGI DAV DIRECTORY_LISTING LOGGING SSI +OPTIONS_NS=SSL IPV6 DEBUG +OPTIONS_DEFINE=${OPTIONS_MONGOOSE} ${OPTIONS_NS} DEBUG_HEXDUMP THREADS +OPTIONS_DEFAULT=${OPTIONS_DEFINE:NDEBUG*} + +POPEN_DESC= Enable process execute in SSI +CGI_DESC= Enable CGI +AUTH_DESC= Enable authentication +DAV_DESC= Enable DAV (requires DIRECTORY_LISTING) +DIRECTORY_LISTING_DESC= Enable directory listing +LOGGING_DESC= Enable logging +SSI_DESC= Enable SSI +THREADS_DESC= Enable threads +SSL_DESC= Enable SSL +IPV6_DESC= Enable IPv6 support +DEBUG_DESC= Build with debug enabled +DEBUG_HEXDUMP_DESC= Enable hexdump of sent and received traffic + +.include + +CFLAGS_EXTRA= + +.for FLAG in ${OPTIONS_MONGOOSE} +. if !${PORT_OPTIONS:M${FLAG}} +CFLAGS_EXTRA+=-DMONGOOSE_NO_${FLAG} +. endif +.endfor + +.for FLAG in ${OPTIONS_NS} +. if ${PORT_OPTIONS:M${FLAG}} +CFLAGS_EXTRA+=-DNS_ENABLE_${FLAG} +. endif +.endfor + +.if !${PORT_OPTIONS:MTHREADS} +CFLAGS_EXTRA+=-DNS_DISABLE_THREADS -DMONGOOSE_NO_THREADS +.endif + +.if ${PORT_OPTIONS:MDEBUG_HEXDUMP} +CFLAGS_EXTRA+=-DNS_ENABLE_HEXDUMP +.endif + +.if ${PORT_OPTIONS:MSSL} +USE_OPENSSL= YES +CFLAGS_EXTRA+= -lssl +.endif + +.if !empty(PORT_OPTIONS:MDAV) && empty(PORT_OPTIONS:MDIRECTORY_LISTING) +BROKEN= DAV requires DIRECTORY_LISTING +.endif + +MAKE_ENV+= CFLAGS_EXTRA="-DMONGOOSE_NO_WEBSOCKET ${CFLAGS_EXTRA}" + +PLIST_FILES= bin/mongoose + +do-install: + ${MV} ${BUILD_WRKSRC}/server ${BUILD_WRKSRC}/mongoose + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/mongoose ${STAGEDIR}${PREFIX}/bin + +.include Added: head/www/mongoose/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/mongoose/distinfo Mon Aug 4 14:25:43 2014 (r364013) @@ -0,0 +1,2 @@ +SHA256 (mongoose-5.3.tar.gz) = 3ced399521edfa75a020f2b9457c5b4ba40c518139bb5237c1d88e4b2c85de16 +SIZE (mongoose-5.3.tar.gz) = 109908 Added: head/www/mongoose/files/mongoose.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/mongoose/files/mongoose.in Mon Aug 4 14:25:43 2014 (r364013) @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mongoose +# REQUIRE: daemon + +# Define these mongoose_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/mongoose +# +# mongoose_enable Set to "YES" to run mongoose. +# mongoose_flags Flags passed to mongoose, see mongoose --help + +. /etc/rc.subr + +name="mongoose" +rcvar=mongoose_enable +command="%%PREFIX%%/bin/mongoose" + +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +mongoose_enable=${mongoose_enable-"NO"} +mongoose_flags=${mongoose_flags-"/var/empty"} +mongoose_pidfile=${mongoose_pidfile-"/var/run/mongoose"} + +start_cmd="mongoose_start" + +load_rc_config $name + +mongoose_start () { + echo "Starting mongoose." + /usr/sbin/daemon -p $mongoose_pidfile $command $mongoose_flags >/dev/null 2>&1 +} + +run_rc_command "$1" Added: head/www/mongoose/files/patch-mongoose.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/mongoose/files/patch-mongoose.c Mon Aug 4 14:25:43 2014 (r364013) @@ -0,0 +1,65 @@ +--- mongoose.c ++++ mongoose.c +@@ -1162,19 +1162,6 @@ typedef pid_t process_id_t; + #define MONGOOSE_IDLE_TIMEOUT_SECONDS 30 + #endif + +-#ifdef MONGOOSE_NO_SOCKETPAIR +-#define MONGOOSE_NO_CGI +-#endif +- +-#ifdef MONGOOSE_NO_FILESYSTEM +-#define MONGOOSE_NO_AUTH +-#define MONGOOSE_NO_CGI +-#define MONGOOSE_NO_DAV +-#define MONGOOSE_NO_DIRECTORY_LISTING +-#define MONGOOSE_NO_LOGGING +-#define MONGOOSE_NO_SSI +-#endif +- + struct vec { + const char *ptr; + int len; +--- mongoose.h ++++ mongoose.h +@@ -22,6 +22,40 @@ + + #define MONGOOSE_VERSION "5.4" + ++#ifdef MONGOOSE_NO_SOCKETPAIR ++#ifndef MONGOOSE_NO_CGI ++#define MONGOOSE_NO_CGI ++#endif ++#endif ++ ++#ifdef MONGOOSE_NO_FILESYSTEM ++#ifndef MONGOOSE_NO_AUTH ++#define MONGOOSE_NO_AUTH ++#endif ++#ifndef MONGOOSE_NO_CGI ++#define MONGOOSE_NO_CGI ++#endif ++#ifndef MONGOOSE_NO_DAV ++#define MONGOOSE_NO_DAV ++#endif ++#ifndef MONGOOSE_NO_DIRECTORY_LISTING ++#define MONGOOSE_NO_DIRECTORY_LISTING ++#endif ++#ifndef MONGOOSE_NO_LOGGING ++#define MONGOOSE_NO_LOGGING ++#endif ++#ifndef MONGOOSE_NO_SSI ++#define MONGOOSE_NO_SSI ++#endif ++#endif ++ ++// DAV requires MONGOOSE_NO_DIRECTORY_LISTING ++#ifndef MONGOOSE_NO_DAV ++#ifdef MONGOOSE_NO_DIRECTORY_LISTING ++#undef MONGOOSE_NO_DIRECTORY_LISTING ++#endif ++#endif ++ + #include // required for FILE + #include // required for size_t + Added: head/www/mongoose/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/mongoose/pkg-descr Mon Aug 4 14:25:43 2014 (r364013) @@ -0,0 +1,9 @@ +Mongoose is a small, fast and easy to use web server. It supports +CGI, SSI, SSL, Digest auth, Websocket, WEbDAV, Resumed download, URL +rewrite, file blacklist. Having SHTTPD as a predecessor, another +feature of mongoose is the ability to embed it into existing C/C++ +applications. Embedded API is very clean and simple. +Mongoose has small memory footprint. Use it when other +web servers like Apache are too heavy for your tasks. + +WWW: https://github.com/cesanta/mongoose