null, 'libev' => null, 'jemalloc' => null, ]; if ($this->builder instanceof LinuxBuilder) { $available = [...$available, ...[ 'zlib' => null, 'libxml2' => null, ]]; } $args = $this->builder->makeAutoconfArgs(static::NAME, $available); if ($this->builder instanceof MacOSBuilder) { $args = str_replace('=yes', '=' . BUILD_ROOT_PATH, $args); } shell()->cd($this->source_dir) ->setEnv([ 'CFLAGS' => $this->getLibExtraCFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags(), 'LIBS' => $this->getLibExtraLibs(), ]) ->execWithEnv( './configure ' . '--enable-static ' . '--disable-shared ' . '--with-pic ' . '--enable-lib-only ' . $args . ' ' . '--prefix=' ) ->execWithEnv('make clean') ->execWithEnv("make -j{$this->builder->concurrency}") ->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH); $this->patchPkgconfPrefix(['libngtcp2.pc']); $this->patchPkgconfPrefix(['libngtcp2_crypto_ossl.pc']); } }