Build libmicrohttpd with meson
This commit is contained in:
parent
23a6b93fcc
commit
6c8a9540bd
|
@ -1,4 +1,4 @@
|
|||
from .base import Dependency, ReleaseDownload, MakeBuilder
|
||||
from .base import Dependency, ReleaseDownload, MakeBuilder, NoopBuilder
|
||||
|
||||
from kiwixbuild.utils import Remotefile, run_command
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from .base import Dependency, ReleaseDownload, MakeBuilder
|
||||
from .base import Dependency, ReleaseDownload, MesonBuilder
|
||||
|
||||
from kiwixbuild.utils import Remotefile
|
||||
|
||||
|
@ -7,17 +7,23 @@ class MicroHttpd(Dependency):
|
|||
name = "libmicrohttpd"
|
||||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile(
|
||||
src_archive = Remotefile(
|
||||
"libmicrohttpd-0.9.76.tar.gz",
|
||||
"f0b1547b5a42a6c0f724e8e1c1cb5ce9c4c35fb495e7d780b9930d35011ceb4c",
|
||||
"https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.76.tar.gz",
|
||||
)
|
||||
meson_archive = Remotefile(
|
||||
"libmicrohttpd_0.9.16-3_patch.zip",
|
||||
"0954c094a0d4cfe0dd799d8df8a04face6669f7b4d51a7386a9c3e2d37b9c3b3",
|
||||
"https://wrapdb.mesonbuild.com/v2/libmicrohttpd_0.9.76-3/get_patch",
|
||||
)
|
||||
archives = [src_archive, meson_archive]
|
||||
patches = ["libmicrohttpd_meson_pkgconfig.patch"]
|
||||
|
||||
class Builder(MakeBuilder):
|
||||
class Builder(MesonBuilder):
|
||||
configure_options = [
|
||||
"--disable-https",
|
||||
"--without-libgcrypt",
|
||||
"--without-libcurl",
|
||||
"--disable-doc",
|
||||
"--disable-examples",
|
||||
"-Dgnutls=disabled",
|
||||
"-Dgcrypt=disabled",
|
||||
"-Dcurl=disabled",
|
||||
"-Dexpat=disabled",
|
||||
]
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
diff '--color=auto' -ur libmicrohttpd-0.9.76_orig/meson.build libmicrohttpd-0.9.76/meson.build
|
||||
--- libmicrohttpd-0.9.76_orig/meson.build 2024-08-18 14:55:29.372805433 +0200
|
||||
+++ libmicrohttpd-0.9.76/meson.build 2024-08-18 17:19:44.087444728 +0200
|
||||
@@ -6,6 +6,8 @@
|
||||
default_options: ['warning_level=1'],
|
||||
)
|
||||
|
||||
+pkg = import('pkgconfig')
|
||||
+
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
|
||||
incdirs = include_directories('src/include')
|
||||
@@ -267,6 +269,16 @@
|
||||
install: true,
|
||||
)
|
||||
|
||||
+install_headers(
|
||||
+ 'src/include/microhttpd.h',
|
||||
+)
|
||||
+
|
||||
+pkg.generate(
|
||||
+ libmicrohttpd,
|
||||
+ description: 'Libmicrohttpd',
|
||||
+ name: 'libmicrohttpd',
|
||||
+)
|
||||
+
|
||||
depinc = include_directories('.', 'src/include')
|
||||
libmicrohttpd_dep = declare_dependency(
|
||||
include_directories: depinc,
|
Loading…
Reference in New Issue