49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
from lib import arch, cpp
|
|
from lib.make import *
|
|
|
|
|
|
version("1.9.7")
|
|
description("A cross-platform, linkable library implementation of Git that you can use in your application.")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("github://libgit2/libgit2#v1.9.7")
|
|
|
|
builddep("shortcut/c")
|
|
builddep("shortcut/cmake")
|
|
builddep("aws-lc-dev @target")
|
|
builddep("libz-dev @target")
|
|
|
|
|
|
def build():
|
|
cpp.cmake([
|
|
"-DCMAKE_C_STANDARD=99",
|
|
"-DCMAKE_INSTALL_PREFIX=/",
|
|
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libgit2')}/lib",
|
|
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libgit2-dev')}/include",
|
|
"-DUSE_HTTPS=OpenSSL",
|
|
"-DUSE_SHA256=OpenSSL",
|
|
"-DUSE_BUNDLED_ZLIB=OFF",
|
|
"-DUSE_NTLMCLIENT=OFF",
|
|
])
|
|
cpp.ninja()
|
|
cpp.ninja_install()
|
|
|
|
on_build(build)
|
|
|
|
|
|
package("libgit2")
|
|
dep("semi-libc @same-arch")
|
|
dep("libssl @same-arch")
|
|
dep("libcrypto @same-arch")
|
|
cpp.use_auto_pack(["lib"])
|
|
|
|
package("git2")
|
|
dep("semi-libc @same-arch")
|
|
dep("libgit2 (same)")
|
|
cpp.use_auto_pack(["bin"])
|
|
|
|
package("libgit2-dev")
|
|
dep("libgit2 (same)")
|
|
dep("aws-lc-dev @same-arch")
|
|
dep("semi-libc-dev @same-arch")
|
|
cpp.use_auto_pack(["dev"])
|