diff mbox series

[v2,3/6] package/lighttpd: add brotli support

Message ID 20220123095957.492671-3-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [v2,1/6] package/lighttpd: reorder alphabetically options | expand

Commit Message

Fabrice Fontaine Jan. 23, 2022, 9:59 a.m. UTC
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...uild-meson-fix-typo-in-variable-name.patch | 25 +++++++++++++++++++
 package/lighttpd/Config.in                    |  6 +++++
 package/lighttpd/lighttpd.mk                  |  8 +++++-
 3 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 package/lighttpd/0002-build-meson-fix-typo-in-variable-name.patch
diff mbox series

Patch

diff --git a/package/lighttpd/0002-build-meson-fix-typo-in-variable-name.patch b/package/lighttpd/0002-build-meson-fix-typo-in-variable-name.patch
new file mode 100644
index 0000000000..d338979d46
--- /dev/null
+++ b/package/lighttpd/0002-build-meson-fix-typo-in-variable-name.patch
@@ -0,0 +1,25 @@ 
+From 876a1e1b2cc21282a0df5245004197cdffe1d380 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Thu, 20 Jan 2022 07:04:51 -0500
+Subject: [PATCH] [build] meson: fix typo in variable name
+
+[Retrieved from:
+https://github.com/lighttpd/lighttpd1.4/commit/876a1e1b2cc21282a0df5245004197cdffe1d380]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index 4ee163468..b35c1037f 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -266,7 +266,7 @@ endif
+ libbrotli = []
+ if get_option('with_brotli')
+ 	libbrotli = [ compiler.find_library('brotlienc') ]
+-	if compiler.has_function('BrotliEncoderCreateInstance', args: defs, dependencies: libbrotlienc, prefix: '#include <brotli/encode.h>')
++	if compiler.has_function('BrotliEncoderCreateInstance', args: defs, dependencies: libbrotli, prefix: '#include <brotli/encode.h>')
+ 		conf_data.set('HAVE_BROTLI_ENCODE_H', true)
+ 		conf_data.set('HAVE_BROTLI', true)
+ 	else
diff --git a/package/lighttpd/Config.in b/package/lighttpd/Config.in
index 05a7c84961..f3e252d850 100644
--- a/package/lighttpd/Config.in
+++ b/package/lighttpd/Config.in
@@ -21,6 +21,12 @@  config BR2_PACKAGE_LIGHTTPD
 
 if BR2_PACKAGE_LIGHTTPD
 
+config BR2_PACKAGE_LIGHTTPD_BROTLI
+	bool "brotli support"
+	select BR2_PACKAGE_BROTLI
+	help
+	  Enable brotli support for lighttpd mod_deflate.
+
 config BR2_PACKAGE_LIGHTTPD_BZIP2
 	bool "bzip2 support"
 	select BR2_PACKAGE_BZIP2
diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
index 4f05db4e29..22db1a7348 100644
--- a/package/lighttpd/lighttpd.mk
+++ b/package/lighttpd/lighttpd.mk
@@ -13,7 +13,6 @@  LIGHTTPD_LICENSE_FILES = COPYING
 LIGHTTPD_CPE_ID_VENDOR = lighttpd
 LIGHTTPD_DEPENDENCIES = host-pkgconf xxhash
 LIGHTTPD_CONF_OPTS = \
-	-Dwith_brotli=false \
 	-Dwith_dbi=false \
 	-Dwith_fam=false \
 	-Dwith_gnutls=false \
@@ -36,6 +35,13 @@  LIGHTTPD_CONF_OPTS = \
 	-Dbuild_static=false \
 	-Dmoduledir=lib/lighttpd
 
+ifeq ($(BR2_PACKAGE_LIGHTTPD_BROTLI),y)
+LIGHTTPD_DEPENDENCIES += brotli
+LIGHTTPD_CONF_OPTS += -Dwith_brotli=true
+else
+LIGHTTPD_CONF_OPTS += -Dwith_brotli=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y)
 LIGHTTPD_DEPENDENCIES += bzip2
 LIGHTTPD_CONF_OPTS += -Dwith_bzip=true