Skip to content

Instantly share code, notes, and snippets.

@drscream
Last active May 4, 2019 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drscream/e496fe3f1ef290dacdd565a85fa0b232 to your computer and use it in GitHub Desktop.
Save drscream/e496fe3f1ef290dacdd565a85fa0b232 to your computer and use it in GitHub Desktop.
diff --git a/www/apache24/PLIST b/www/apache24/PLIST
index 8f93d6af634..76fe58c7881 100644
--- a/www/apache24/PLIST
+++ b/www/apache24/PLIST
@@ -95,6 +95,7 @@ lib/httpd/mod_authz_host.so
lib/httpd/mod_authz_owner.so
lib/httpd/mod_authz_user.so
lib/httpd/mod_autoindex.so
+${PLIST.brotli}lib/httpd/mod_brotli.so
lib/httpd/mod_buffer.so
lib/httpd/mod_cache.so
lib/httpd/mod_cache_disk.so
diff --git a/www/apache24/options.mk b/www/apache24/options.mk
index a5d143cc357..11f9272ef78 100644
--- a/www/apache24/options.mk
+++ b/www/apache24/options.mk
@@ -2,9 +2,9 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.apache
PKG_SUPPORTED_OPTIONS= apache-mpm-event apache-mpm-prefork apache-mpm-worker \
- lua http2 suexec
+ brotli lua http2 suexec
PKG_SUGGESTED_OPTIONS= apache-mpm-event apache-mpm-prefork \
- apache-mpm-worker http2
+ apache-mpm-worker brotli http2
.if ${OPSYS} == "SunOS" && !empty(OS_VERSION:M5.1[0-9])
PKG_SUPPORTED_OPTIONS+= privileges
@@ -25,7 +25,7 @@ PKG_SUPPORTED_OPTIONS+= privileges
# worker hybrid multi-threaded multi-process web server
#
PLIST_VARS+= worker prefork event only-prefork not-only-prefork
-PLIST_VARS+= http2 lua privileges suexec
+PLIST_VARS+= http2 lua privileges suexec brotli
.if !empty(PKG_OPTIONS:Mapache-mpm-event)
MPMS+= event
@@ -105,6 +105,13 @@ CONFIGURE_ARGS+= --enable-privileges
PLIST.privileges= yes
.endif
+.if !empty(PKG_OPTIONS:Mbrotli)
+.include "../../archivers/brotli/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-brotli
+CONFIGURE_ARGS+= --with-brotli=${PREFIX}
+PLIST.brotli= yes
+.endif
+
# DTrace support is manifest, but actually not implemented at all
#.if !empty(PKG_OPTIONS:Mdtrace)
#CONFIGURE_ARGS+= --enable-dtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment