summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-06-06 13:38:43 +0000
committernia <nia@pkgsrc.org>2021-06-06 13:38:43 +0000
commit487f041cc197c0effc7faf7a45f5c9a7e54c40ab (patch)
tree9f3f751a93f524dc0b4a5cdaecec67f86d9ce7aa
parent8ed797184730289b6bd6568001aade63b1c2aad1 (diff)
downloadpkgsrc-487f041cc197c0effc7faf7a45f5c9a7e54c40ab.tar.gz
bozohttpd: define LICENSE, add lua and ssl options, honor CFLAGS
-rw-r--r--www/bozohttpd/Makefile18
-rw-r--r--www/bozohttpd/options.mk23
2 files changed, 30 insertions, 11 deletions
diff --git a/www/bozohttpd/Makefile b/www/bozohttpd/Makefile
index 85bf5c9611a..fe671ac61d9 100644
--- a/www/bozohttpd/Makefile
+++ b/www/bozohttpd/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.96 2021/03/03 10:09:13 mrg Exp $
+# $NetBSD: Makefile,v 1.97 2021/06/06 13:38:43 nia Exp $
#
DISTNAME= bozohttpd-20210227
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tar.bz2
@@ -9,14 +10,22 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= mrg@eterna.com.au
HOMEPAGE= http://www.eterna.com.au/bozohttpd/
COMMENT= Bozotic HTTP server; small and secure
+LICENSE= 2-clause-bsd
-.include "options.mk"
+BOZO_CFLAGS+= -DNO_BLOCKLIST_SUPPORT
+BOZO_CFLAGS+= -D_GNU_SOURCE -D_DEFAULT_SOURCE
-# This package is IP family agnostic.
-BUILD_DEFS+= IPV6_READY
+.include "options.mk"
MAKE_FILE= Makefile.boot
+# Honor pkgsrc's optimization settings, necessary when
+# combined with FORTIFY_SOURCE on e.g. Linux.
+MAKE_FLAGS+= OPT=${CFLAGS:Q}
+
+# Apply our settings.
+MAKE_FLAGS+= LOCAL_CFLAGS=${BOZO_CFLAGS:Q}
+
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing paths in manual page.
SUBST_STAGE.paths= pre-build
@@ -32,5 +41,4 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/bozohttpd.8 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
-.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/bozohttpd/options.mk b/www/bozohttpd/options.mk
index 772b636c6ff..f1a027c3f6b 100644
--- a/www/bozohttpd/options.mk
+++ b/www/bozohttpd/options.mk
@@ -1,17 +1,28 @@
-# $NetBSD: options.mk,v 1.3 2014/01/02 09:02:22 mrg Exp $
+# $NetBSD: options.mk,v 1.4 2021/06/06 13:38:43 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.bozohttpd
-PKG_SUPPORTED_OPTIONS= bozohttpd-do-htpasswd
+PKG_SUPPORTED_OPTIONS= lua ssl
+PKG_SUGGESTED_OPTIONS= lua ssl
.include "../../mk/bsd.options.mk"
###
-### Support Apache's .htpasswd files.
+### Support for Lua
###
-.if !empty(PKG_OPTIONS:Mbozohttpd-do-htpasswd)
-CPPFLAGS+= -DDO_HTPASSWD
+.if !empty(PKG_OPTIONS:Mlua)
+. include "../../lang/lua/buildlink3.mk"
+MAKE_FLAGS+= EXTRALIBS="-llua"
+.else
+BOZO_CFLAGS+= -DNO_LUA_SUPPORT
.endif
###
-### Support for lua -- missing
+### Support for SSL
###
+.if !empty(PKG_OPTIONS:Mssl)
+CPPFLAGS+= -DDO_HTPASSWD
+. include "../../security/openssl/buildlink3.mk"
+.else
+BOZO_CFLAGS+= -DNO_SSL_SUPPORT
+MAKE_FLAGS+= CRYPTOLIBS=""
+.endif