39 lines
920 B
Python
39 lines
920 B
Python
from lib import cpp
|
|
from lib.make import *
|
|
|
|
|
|
version("1.18.0")
|
|
description("HTTP/3 library written in C")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_url("https://github.com/ngtcp2/nghttp3/releases/download/v1.18.0/nghttp3-1.18.0.tar.xz")
|
|
|
|
builddep("shortcut/c++")
|
|
builddep("shortcut/cmake")
|
|
builddep("libngtcp2-dev @target")
|
|
|
|
|
|
def build():
|
|
cpp.cmake([
|
|
"-DENABLE_LIB_ONLY=ON",
|
|
"-DCMAKE_INSTALL_PREFIX=/",
|
|
"-DBUILD_TESTING=OFF",
|
|
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libnghttp3')}/lib",
|
|
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libnghttp3-dev')}/include",
|
|
])
|
|
cpp.ninja()
|
|
cpp.ninja_install()
|
|
|
|
on_build(build)
|
|
|
|
|
|
package("libnghttp3")
|
|
dep("semi-libc @same-arch")
|
|
dep("libngtcp2 @same-arch")
|
|
cpp.use_auto_pack(["lib"])
|
|
|
|
package("libnghttp3-dev")
|
|
dep("libnghttp3 (same)")
|
|
dep("semi-libc-dev @same-arch")
|
|
dep("libngtcp2-dev @same-arch")
|
|
cpp.use_auto_pack(["dev"])
|