From 279abb6d87f92fb599901de9b19575add915429b Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 16 Jan 2024 17:10:29 +0800 Subject: [PATCH 1/3] [73_6] Use libgit2-dev on ubuntu --- xmake-requires.lock | 118 ++++++++++++++++++++++++++++++++++++++++++++ xmake/packages.lua | 2 +- 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/xmake-requires.lock b/xmake-requires.lock index bb0b5ec4d5..5a23f4979c 100644 --- a/xmake-requires.lock +++ b/xmake-requires.lock @@ -2,6 +2,124 @@ __meta__ = { version = "1.0" }, + ["linux|loongarch64"] = { + ["apt::libgit2-dev#31fecfc4"] = { + version = "latest" + }, + ["apt::libjpeg62-turbo-dev#31fecfc4"] = { + version = "latest" + }, + ["apt::libpng-dev#31fecfc4"] = { + version = "latest" + }, + ["cmake#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "3.26.4" + }, + ["cpr#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.10.5" + }, + ["freetype#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "2.12.1" + }, + ["libaesgm#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "2013.1.1" + }, + ["libcurl#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "8.4.0" + }, + ["libjpeg#31fecfc4"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.5.2" + }, + ["libpng#31fecfc4"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.6.36" + }, + ["lolly#31fecfc4"] = { + version = "v1.3.16" + }, + ["openssl#31fecfc4"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.1.1d" + }, + ["pdfhummus 4.6.2#23149c54"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "v4.6.2" + }, + ["pkg-config#31fecfc4"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "0.29" + }, + ["s7 2023.04.13#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "2023.04.13" + }, + ["tbox#31fecfc4"] = { + repo = { + branch = "master", + commit = "4008de50367abe3554f52460fc5f09a744073cec", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "v1.7.5" + }, + ["zlib#31fecfc4"] = { + repo = { + branch = "master", + commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.2.11" + } + }, ["linux|x86_64"] = { ["apt::libcurl4-openssl-dev#31fecfc4"] = { version = "latest" diff --git a/xmake/packages.lua b/xmake/packages.lua index 550017d96b..7eb14e56c3 100644 --- a/xmake/packages.lua +++ b/xmake/packages.lua @@ -148,7 +148,7 @@ function add_requires_of_mogan() end -- package: libgit2 - if is_plat ("linux") and using_apt() and (not (linuxos.name() == "uos")) then + if is_plat ("linux") and using_apt() then add_requires("apt::libgit2-dev", {alias="libgit2"}) elseif not is_plat("wasm") then add_requires("libgit2 "..LIBGIT2_VERSION, {system=false}) From da90315e9ab3d821783cb454a72266f4866eb9a8 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 16 Jan 2024 17:15:00 +0800 Subject: [PATCH 2/3] wip --- xmake/packages.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/packages.lua b/xmake/packages.lua index 7eb14e56c3..550017d96b 100644 --- a/xmake/packages.lua +++ b/xmake/packages.lua @@ -148,7 +148,7 @@ function add_requires_of_mogan() end -- package: libgit2 - if is_plat ("linux") and using_apt() then + if is_plat ("linux") and using_apt() and (not (linuxos.name() == "uos")) then add_requires("apt::libgit2-dev", {alias="libgit2"}) elseif not is_plat("wasm") then add_requires("libgit2 "..LIBGIT2_VERSION, {system=false}) From ecace82b0570fa765ffedbd938cf0ce49b95ef35 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 16 Jan 2024 17:41:24 +0800 Subject: [PATCH 3/3] wip --- src/Plugins/Git/git.cpp | 6 +++++- xmake-requires.lock | 10 +++++----- xmake/packages.lua | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Plugins/Git/git.cpp b/src/Plugins/Git/git.cpp index fced330995..d21b860b79 100644 --- a/src/Plugins/Git/git.cpp +++ b/src/Plugins/Git/git.cpp @@ -23,8 +23,12 @@ libgit2_version () { static void show_git_last_error (int error) { +#if (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR <= 27) + const git_error* e= giterr_last (); +#else const git_error* e= git_error_last (); - debug_io << "libgit2 error " << error << "/" << e->klass << ": " << e->message +#endif + debug_io << "libgit2 error " << error // << "/" << e->klass << ": " << e->message << LF; } diff --git a/xmake-requires.lock b/xmake-requires.lock index 5a23f4979c..150f10c8bb 100644 --- a/xmake-requires.lock +++ b/xmake-requires.lock @@ -55,7 +55,7 @@ ["libjpeg#31fecfc4"] = { repo = { branch = "master", - commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + commit = "4008de50367abe3554f52460fc5f09a744073cec", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.5.2" @@ -63,7 +63,7 @@ ["libpng#31fecfc4"] = { repo = { branch = "master", - commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + commit = "4008de50367abe3554f52460fc5f09a744073cec", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.6.36" @@ -74,7 +74,7 @@ ["openssl#31fecfc4"] = { repo = { branch = "master", - commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + commit = "4008de50367abe3554f52460fc5f09a744073cec", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.1.1d" @@ -90,7 +90,7 @@ ["pkg-config#31fecfc4"] = { repo = { branch = "master", - commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + commit = "4008de50367abe3554f52460fc5f09a744073cec", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "0.29" @@ -114,7 +114,7 @@ ["zlib#31fecfc4"] = { repo = { branch = "master", - commit = "bdce2febf9d26219840fe93f2e6b9ff676d565f7", + commit = "4008de50367abe3554f52460fc5f09a744073cec", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.2.11" diff --git a/xmake/packages.lua b/xmake/packages.lua index 550017d96b..7eb14e56c3 100644 --- a/xmake/packages.lua +++ b/xmake/packages.lua @@ -148,7 +148,7 @@ function add_requires_of_mogan() end -- package: libgit2 - if is_plat ("linux") and using_apt() and (not (linuxos.name() == "uos")) then + if is_plat ("linux") and using_apt() then add_requires("apt::libgit2-dev", {alias="libgit2"}) elseif not is_plat("wasm") then add_requires("libgit2 "..LIBGIT2_VERSION, {system=false})