Add recipe for lighttpd.

* Needed by WebKit to run "http" tests (or php-based ones)
* Lots of failing tests, but seems to be roughly working
This commit is contained in:
Adrien Destugues
2014-10-17 11:13:03 +02:00
parent 821635ab3c
commit 9cdeaa3e5f
2 changed files with 198 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
SUMMARY="an open-source web server for speed-critical environments"
DESCRIPTION="Security, speed, compliance, and flexibility -- all of these \
describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a \
webserver; as it is designed and optimized for high performance environments. \
With a small memory footprint compared to other web-servers, effective \
management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, \
Output-Compression, URL-Rewriting and many more) lighttpd is the perfect \
solution for every server that is suffering load problems.
"
HOMEPAGE="http://www.lighttpd.net/"
COPYRIGHT="2003-2014 Jan Kneschke"
REVISION="1"
ARCHITECTURES="x86_gcc2"
LICENSE="BSD (3-clause)"
SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.35.tar.gz"
CHECKSUM_SHA256="62c23de053fd82e1bf64f204cb6c6e44ba3c16c01ff1e09da680d982802ef1cc"
PATCHES="lighttpd-1.4.35.patchset"
PROVIDES="
lighttpd = $portVersion
cmd:lighttpd
cmd:lighttpd_angel
lib:mod_access
lib:mod_accesslog
lib:mod_alias
lib:mod_auth
lib:mod_cgi
lib:mod_cml
lib:mod_compress
lib:mod_dirlisting
lib:mod_evasive
lib:mod_evhost
lib:mod_expire
lib:mod_extforward
lib:mod_fastcgi
lib:mod_flv_streaming
lib:mod_indexfile
lib:mod_magnet
lib:mod_mysql_vhost
lib:mod_proxy
lib:mod_redirect
lib:mod_rewrite
lib:mod_rrdtool
lib:mod_scgi
lib:mod_secdownload
lib:mod_setenv
lib:mod_simple_vhost
lib:mod_ssi
lib:mod_staticfile
lib:mod_status
lib:mod_trigger_b4_dl
lib:mod_userdir
lib:mod_usertrack
lib:mod_webdav
"
REQUIRES="
haiku >= $haikuVersion
lib:libbz2
lib:libpcre
lib:libz
"
BUILD_REQUIRES="
devel:libbz2
devel:libpcre
devel:libz
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:aclocal
cmd:autom4te
cmd:automake
cmd:awk
cmd:gcc
cmd:git
cmd:make
cmd:perl
cmd:pkg_config
cmd:which
"
BUILD()
{
aclocal
automake
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs mod_access mod_accesslog mod_alias mod_auth \
mod_cgi mod_cml mod_compress mod_dirlisting mod_evasive mod_evhost \
mod_expire mod_extforward mod_fastcgi mod_flv_streaming mod_indexfile \
mod_magnet mod_mysql_vhost mod_proxy mod_redirect mod_rewrite \
mod_rrdtool mod_scgi mod_secdownload mod_setenv mod_simple_vhost \
mod_ssi mod_staticfile mod_status mod_trigger_b4_dl mod_userdir \
mod_usertrack mod_webdav
packageEntries devel $developDir
}
TEST()
{
make check
}
PROVIDES_devel="
lighttpd_devel = $portVersion
devel:mod_access
devel:mod_accesslog
devel:mod_alias
devel:mod_auth
devel:mod_cgi
devel:mod_cml
devel:mod_compress
devel:mod_dirlisting
devel:mod_evasive
devel:mod_evhost
devel:mod_expire
devel:mod_extforward
devel:mod_fastcgi
devel:mod_flv_streaming
devel:mod_indexfile
devel:mod_magnet
devel:mod_mysql_vhost
devel:mod_proxy
devel:mod_redirect
devel:mod_rewrite
devel:mod_rrdtool
devel:mod_scgi
devel:mod_secdownload
devel:mod_setenv
devel:mod_simple_vhost
devel:mod_ssi
devel:mod_staticfile
devel:mod_status
devel:mod_trigger_b4_dl
devel:mod_userdir
devel:mod_usertrack
devel:mod_webdav
"
REQUIRES_devel="
lighttpd == $portVersion base
"

View File

@@ -0,0 +1,47 @@
From 2f4d3088b5d2984a9ead2d24d4d9997068a6ccca Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 17 Oct 2014 11:03:53 +0200
Subject: build fixes.
diff --git a/configure.ac b/configure.ac
index 682023b..3efa39b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -613,7 +613,7 @@ AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
dnl check for extra compiler options (warning options)
if test "${GCC}" = "yes"; then
- CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
+ CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu9x"
fi
AC_ARG_ENABLE(extra-warnings,
diff --git a/src/network.c b/src/network.c
index ebde43b..d5e843d 100644
--- a/src/network.c
+++ b/src/network.c
@@ -356,15 +356,15 @@ static int network_server_init(server *srv, buffer *host_token, specific_config
goto error_free_socket;
}
memcpy(srv_socket->addr.un.sun_path, host, hostlen);
- }
- srv_socket->addr.un.sun_family = AF_UNIX;
+ srv_socket->addr.un.sun_family = AF_UNIX;
#ifdef SUN_LEN
- addr_len = SUN_LEN(&srv_socket->addr.un);
+ addr_len = SUN_LEN(&srv_socket->addr.un);
#else
- /* stevens says: */
- addr_len = hostlen + sizeof(srv_socket->addr.un.sun_family);
+ /* stevens says: */
+ addr_len = hostlen + sizeof(srv_socket->addr.un.sun_family);
#endif
+ }
/* check if the socket exists and try to connect to it. */
if (-1 != (fd = connect(srv_socket->fd, (struct sockaddr *) &(srv_socket->addr), addr_len))) {
--
1.8.3.4