Merge pull request 'feat: add package libgit2' (#116) from sisungo/ports:libgit2 into main
Reviewed-on: #116
This commit is contained in:
commit
ffe2f975f0
1 file changed
+48
@@ -0,0 +1,48 @@
|
||||
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"])
|
||||
Reference in new issue
Block a user