summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lighttpd
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-08-22 14:50:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-23 08:25:52 +0100
commit3755f6c4eb404b6218784ad21c3a56312c425cc2 (patch)
tree6f5631683801e44e6e6f059b35c1d37b8f2dae79 /meta/recipes-extended/lighttpd
parent79b7ce12c1bb474a9af5411886e11897032a230d (diff)
downloadpoky-3755f6c4eb404b6218784ad21c3a56312c425cc2.tar.gz
lighttpd: convert from autotools to meson
virtual/crypt is a hard dependency in meson builds. ipv6 support is determined automatically. The rest of the options are converted where available; not every autoconf option exists in meson. Modules are now packaged in /usr/lib/lighttpd, so adjust packaging accordingly. (From OE-Core rev: a0a34524016050a78cb49d6657fcca5a2261d7fe) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/lighttpd')
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/0001-meson-add-with_zstd-to-meson_options.txt.patch27
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb58
2 files changed, 56 insertions, 29 deletions
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-meson-add-with_zstd-to-meson_options.txt.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-meson-add-with_zstd-to-meson_options.txt.patch
new file mode 100644
index 0000000000..ceedccbd11
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/0001-meson-add-with_zstd-to-meson_options.txt.patch
@@ -0,0 +1,27 @@
1From f24bd105388c305beeead5d3fa0a028b82354f18 Mon Sep 17 00:00:00 2001
2From: Glenn Strauss <gstrauss@gluelogic.com>
3Date: Wed, 3 Feb 2021 00:35:34 -0500
4Subject: [PATCH] [meson] add with_zstd to meson_options.txt
5
6Upstream-Status: Backport
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 meson_options.txt | 5 +++++
10 1 file changed, 5 insertions(+)
11
12diff --git a/meson_options.txt b/meson_options.txt
13index 51bea44d..f6687159 100644
14--- a/meson_options.txt
15+++ b/meson_options.txt
16@@ -148,6 +148,11 @@ option('with_zlib',
17 value: true,
18 description: 'with deflate-support for mod_deflate [default: on]',
19 )
20+option('with_zstd',
21+ type: 'boolean',
22+ value: false,
23+ description: 'with zstd-support for mod_deflate [default: off]',
24+)
25
26 option('build_extra_warnings',
27 type: 'boolean',
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb
index f97c5913b8..f74016f834 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb
@@ -14,40 +14,38 @@ RRECOMMENDS:${PN} = "lighttpd-module-access \
14 lighttpd-module-accesslog" 14 lighttpd-module-accesslog"
15 15
16SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ 16SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
17 file://index.html.lighttpd \ 17 file://index.html.lighttpd \
18 file://lighttpd.conf \ 18 file://lighttpd.conf \
19 file://lighttpd \ 19 file://lighttpd \
20 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ 20 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
21 " 21 file://0001-meson-add-with_zstd-to-meson_options.txt.patch \
22 "
22 23
23SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5" 24SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5"
24 25
26DEPENDS = "virtual/crypt"
27
25PACKAGECONFIG ??= "openssl pcre zlib \ 28PACKAGECONFIG ??= "openssl pcre zlib \
26 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
27 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ 29 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
28" 30"
29 31
30PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" 32PACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev"
31PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap" 33PACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb"
32PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev" 34PACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap"
33PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb" 35PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr"
34PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" 36PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl"
35PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" 37PACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5"
36PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" 38PACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre"
37PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" 39PACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib"
38PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5" 40PACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2"
39PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" 41PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3"
40PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" 42PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux"
41PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" 43PACKAGECONFIG[gdbm] = "-Dwith_gdbm=true,-Dwith_gdbm=false,gdbm"
42PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3" 44PACKAGECONFIG[memcache] = "-Dwith_memcached=true,-Dwith_memcached=false,libmemcached"
43PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux" 45PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua"
44PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm" 46PACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd"
45PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached" 47
46PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua" 48inherit meson pkgconfig update-rc.d gettext systemd
47
48EXTRA_OECONF += "--enable-lfs --without-fam"
49
50inherit autotools pkgconfig update-rc.d gettext systemd
51 49
52INITSCRIPT_NAME = "lighttpd" 50INITSCRIPT_NAME = "lighttpd"
53INITSCRIPT_PARAMS = "defaults 70" 51INITSCRIPT_PARAMS = "defaults 70"
@@ -71,13 +69,15 @@ do_install:append() {
71 ln -sf ${localstatedir}/tmp ${D}/www/var 69 ln -sf ${localstatedir}/tmp ${D}/www/var
72} 70}
73 71
74FILES:${PN} += "${sysconfdir} /www" 72# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split.
73# So we re-do the variable.
74FILES:${PN} = "${sysconfdir} /www ${sbindir}"
75 75
76CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" 76CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
77 77
78PACKAGES_DYNAMIC += "^lighttpd-module-.*" 78PACKAGES_DYNAMIC += "^lighttpd-module-.*"
79 79
80python populate_packages:prepend () { 80python populate_packages:prepend () {
81 lighttpd_libdir = d.expand('${libdir}') 81 lighttpd_libdir = d.expand('${prefix}/lib/lighttpd')
82 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') 82 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
83} 83}