|
5 | 5 |
|
6 | 6 | return function (Preprocessor $p) { |
7 | 7 | $nghttp2_prefix = NGHTTP2_PREFIX; |
| 8 | + $cares_prefix = CARES_PREFIX; |
| 9 | + $openssl_prefix =OPENSSL_PREFIX; |
8 | 10 | $p->addLibrary( |
9 | 11 | (new Library('nghttp2')) |
10 | 12 | ->withHomePage('https://github.com/nghttp2/nghttp2.git') |
11 | 13 | ->withManual('https://nghttp2.org/') |
12 | 14 | ->withLicense('https://github.com/nghttp2/nghttp2/blob/master/COPYING', Library::LICENSE_MIT) |
13 | | - ->withUrl('https://github.com/nghttp2/nghttp2/releases/download/v1.57.0/nghttp2-1.57.0.tar.gz') |
14 | | - ->withFileHash('md5', 'd4c92d9a85e551bb084964d2be05929c') |
| 15 | + ->withUrl('https://github.com/nghttp2/nghttp2/releases/download/v1.68.0/nghttp2-1.68.0.tar.gz') |
| 16 | + ->withFileHash('md5', 'e0d023d49a8d07d4d7ff8c5a93725720') |
15 | 17 | ->withPrefix($nghttp2_prefix) |
16 | | - ->withConfigure( |
| 18 | + ->withBuildScript( |
17 | 19 | <<<EOF |
18 | | - ./configure --help |
19 | | - packages="zlib libxml-2.0 libcares openssl " # jansson libev libbpf libelf libngtcp2 libnghttp3 |
20 | | - CPPFLAGS="$(pkg-config --cflags-only-I --static \$packages )" \ |
21 | | - LDFLAGS="$(pkg-config --libs-only-L --static \$packages )" \ |
22 | | - LIBS="$(pkg-config --libs-only-l --static \$packages )" \ |
23 | | - ./configure --prefix={$nghttp2_prefix} \ |
24 | | - --enable-static=yes \ |
25 | | - --enable-shared=no \ |
26 | | - --enable-lib-only \ |
27 | | - --with-libxml2 \ |
28 | | - --with-zlib \ |
29 | | - --with-libcares \ |
30 | | - --with-openssl \ |
31 | | - --disable-http3 \ |
32 | | - --disable-python-bindings \ |
33 | | - --without-jansson \ |
34 | | - --without-libevent-openssl \ |
35 | | - --without-libev \ |
36 | | - --without-cunit \ |
37 | | - --without-jemalloc \ |
38 | | - --without-mruby \ |
39 | | - --without-neverbleed \ |
40 | | - --without-cython \ |
41 | | - --without-libngtcp2 \ |
42 | | - --without-libnghttp3 \ |
43 | | - --without-libbpf \ |
44 | | - --with-boost=no |
| 20 | + mkdir -p build |
| 21 | + cd build |
| 22 | +
|
| 23 | + cmake .. \ |
| 24 | + -DCMAKE_INSTALL_PREFIX={$nghttp2_prefix} \ |
| 25 | + -DCMAKE_BUILD_TYPE=Release \ |
| 26 | + -DBUILD_SHARED_LIBS=OFF \ |
| 27 | + -DBUILD_STATIC_LIBS=ON \ |
| 28 | + -DENABLE_LIB_ONLY=ON \ |
| 29 | + -DCMAKE_PREFIX_PATH="{$openssl_prefix};{$cares_prefix}" \ |
| 30 | + -DOPENSSL_ROOT_DIR={$openssl_prefix} \ |
| 31 | + -DENABLE_APP=OFF \ |
| 32 | + -DENABLE_DOC=OFF \ |
| 33 | + -DWITH_LIBXML2=ON \ |
| 34 | + -DBUILD_TESTING=OFF \ |
| 35 | + -DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2=ON \ |
| 36 | + -DCMAKE_DISABLE_FIND_PACKAGE_Systemd=ON \ |
| 37 | + -DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2=ON \ |
| 38 | + -DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON \ |
| 39 | + -DCMAKE_DISABLE_FIND_PACKAGE_Jansson=ON \ |
| 40 | + -DCMAKE_DISABLE_FIND_PACKAGE_Jemalloc=ON \ |
| 41 | + -DCMAKE_DISABLE_FIND_PACKAGE_Libevent=ON \ |
| 42 | + -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON |
| 43 | +
|
| 44 | + cmake --build . --target install |
45 | 45 | EOF |
46 | 46 | ) |
47 | 47 | ->withPkgName('libnghttp2') |
|
0 commit comments