diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-08-22 14:50:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-23 08:25:52 +0100 |
commit | 3755f6c4eb404b6218784ad21c3a56312c425cc2 (patch) | |
tree | 6f5631683801e44e6e6f059b35c1d37b8f2dae79 | |
parent | 79b7ce12c1bb474a9af5411886e11897032a230d (diff) | |
download | poky-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>
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd/0001-meson-add-with_zstd-to-meson_options.txt.patch | 27 | ||||
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb | 58 |
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 @@ | |||
1 | From f24bd105388c305beeead5d3fa0a028b82354f18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Glenn Strauss <gstrauss@gluelogic.com> | ||
3 | Date: Wed, 3 Feb 2021 00:35:34 -0500 | ||
4 | Subject: [PATCH] [meson] add with_zstd to meson_options.txt | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | meson_options.txt | 5 +++++ | ||
10 | 1 file changed, 5 insertions(+) | ||
11 | |||
12 | diff --git a/meson_options.txt b/meson_options.txt | ||
13 | index 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 | ||
16 | SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ | 16 | SRC_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 | ||
23 | SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5" | 24 | SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5" |
24 | 25 | ||
26 | DEPENDS = "virtual/crypt" | ||
27 | |||
25 | PACKAGECONFIG ??= "openssl pcre zlib \ | 28 | PACKAGECONFIG ??= "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 | ||
30 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" | 32 | PACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev" |
31 | PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap" | 33 | PACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb" |
32 | PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev" | 34 | PACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap" |
33 | PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb" | 35 | PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr" |
34 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" | 36 | PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl" |
35 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" | 37 | PACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5" |
36 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" | 38 | PACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre" |
37 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" | 39 | PACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib" |
38 | PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5" | 40 | PACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2" |
39 | PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" | 41 | PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3" |
40 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" | 42 | PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux" |
41 | PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" | 43 | PACKAGECONFIG[gdbm] = "-Dwith_gdbm=true,-Dwith_gdbm=false,gdbm" |
42 | PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3" | 44 | PACKAGECONFIG[memcache] = "-Dwith_memcached=true,-Dwith_memcached=false,libmemcached" |
43 | PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux" | 45 | PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua" |
44 | PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm" | 46 | PACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd" |
45 | PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached" | 47 | |
46 | PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua" | 48 | inherit meson pkgconfig update-rc.d gettext systemd |
47 | |||
48 | EXTRA_OECONF += "--enable-lfs --without-fam" | ||
49 | |||
50 | inherit autotools pkgconfig update-rc.d gettext systemd | ||
51 | 49 | ||
52 | INITSCRIPT_NAME = "lighttpd" | 50 | INITSCRIPT_NAME = "lighttpd" |
53 | INITSCRIPT_PARAMS = "defaults 70" | 51 | INITSCRIPT_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 | ||
74 | FILES:${PN} += "${sysconfdir} /www" | 72 | # bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split. |
73 | # So we re-do the variable. | ||
74 | FILES:${PN} = "${sysconfdir} /www ${sbindir}" | ||
75 | 75 | ||
76 | CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" | 76 | CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" |
77 | 77 | ||
78 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" | 78 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" |
79 | 79 | ||
80 | python populate_packages:prepend () { | 80 | python 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 | } |