upgpkg(main/gitoxide): 0.32.0
This commit is contained in:
parent
e75b5e7662
commit
27da9bcaf1
|
@ -1,41 +0,0 @@
|
|||
+++ ./build.rs
|
||||
@@ -1,4 +1,6 @@
|
||||
use std::process::Command;
|
||||
+use std::env;
|
||||
+use glob::glob;
|
||||
|
||||
fn main() {
|
||||
let version = Command::new(if cfg!(windows) { "git.exe" } else { "git" })
|
||||
@@ -8,6 +10,21 @@
|
||||
.and_then(|out| parse_describe(&out.stdout))
|
||||
.unwrap_or_else(|| env!("CARGO_PKG_VERSION").into());
|
||||
|
||||
+ // builtins for android-x86_64
|
||||
+ let target = env::var("TARGET").unwrap();
|
||||
+ if target == "x86_64-linux-android" {
|
||||
+ let ndk_home = env::var("ANDROID_NDK_HOME").expect("ANDROID_NDK_HOME not set");
|
||||
+ let link_search_glob = format!("{}/toolchains/llvm/prebuilt/linux-x86_64/**/clang/**/lib/linux", ndk_home);
|
||||
+ // there will be different version so just pick first, there likely shouldn't be multiple anyways
|
||||
+ let link_search_path = glob(&link_search_glob)
|
||||
+ .expect("failed to read link_search_glob")
|
||||
+ .next()
|
||||
+ .expect("failed to find link_search_path")
|
||||
+ .expect("link_search_path glob result failed");
|
||||
+ println!("cargo:rustc-link-lib=static=clang_rt.builtins-x86_64-android");
|
||||
+ println!("cargo:rustc-link-search={}", link_search_path.display());
|
||||
+ }
|
||||
+
|
||||
println!("cargo:rustc-env=GITOXIDE_VERSION={version}");
|
||||
}
|
||||
|
||||
+++ ./Cargo.toml
|
||||
@@ -160,6 +160,9 @@
|
||||
|
||||
|
||||
+[build-dependencies]
|
||||
+glob = "0.3.1"
|
||||
+
|
||||
[dependencies]
|
||||
anyhow = "1.0.42"
|
||||
|
||||
gitoxide-core = { version = "^0.33.1", path = "gitoxide-core" }
|
|
@ -3,14 +3,13 @@ TERMUX_PKG_DESCRIPTION="Rust implementation of Git"
|
|||
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
|
||||
TERMUX_PKG_LICENSE_FILE="LICENSE-APACHE, LICENSE-MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="0.31.1"
|
||||
TERMUX_PKG_VERSION="0.32.0"
|
||||
TERMUX_PKG_SRCURL=https://github.com/Byron/gitoxide/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=639c366d3767f5391e055a985de0ac9142fd56f76a1920bacd920b25dabc3b64
|
||||
TERMUX_PKG_SHA256=5a17da0379254bd996fe1888de4104d551a41bdd8bd4b93034f9d0757382fa75
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
|
||||
TERMUX_PKG_DEPENDS="resolv-conf"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_RUST_VERSION=1.73.0
|
||||
|
||||
termux_step_pre_configure() {
|
||||
termux_setup_cmake
|
||||
|
@ -18,8 +17,6 @@ termux_step_pre_configure() {
|
|||
|
||||
: "${CARGO_HOME:=$HOME/.cargo}"
|
||||
export CARGO_HOME
|
||||
export ANDROID_NDK_HOME=$NDK
|
||||
echo ANDROID_NDK_HOME=$ANDROID_NDK_HOME
|
||||
|
||||
cargo fetch --target "${CARGO_TARGET_NAME}"
|
||||
|
||||
|
@ -28,6 +25,10 @@ termux_step_pre_configure() {
|
|||
$TERMUX_PKG_BUILDER_DIR/trust-dns-resolver.diff \
|
||||
| patch --silent -p1 -d ${d} || :
|
||||
done
|
||||
|
||||
if [ "$TERMUX_ARCH" == "x86_64" ]; then
|
||||
RUSTFLAGS+=" -C link-arg=$($CC -print-libgcc-file-name)"
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
|
@ -43,4 +44,3 @@ termux_step_make_install() {
|
|||
install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/gix
|
||||
install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/ein
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
From e2e17c60008f287796c6c10e1fa8a64a3d4a9105 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Thiel <sebastian.thiel@icloud.com>
|
||||
Date: Thu, 7 Dec 2023 18:57:38 +0100
|
||||
Subject: [PATCH] fix: builds on 32bit android now work.
|
||||
|
||||
Thanks to new CI tests, these should keep working as well.
|
||||
---
|
||||
gix-index/src/fs.rs | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gix-index/src/fs.rs b/gix-index/src/fs.rs
|
||||
index ed048942d9..02842f5536 100644
|
||||
--- a/gix-index/src/fs.rs
|
||||
+++ b/gix-index/src/fs.rs
|
||||
@@ -44,7 +44,7 @@ impl Metadata {
|
||||
pub fn is_dir(&self) -> bool {
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
- (self.0.st_mode & libc::S_IFMT) == libc::S_IFDIR
|
||||
+ (self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFDIR as u32
|
||||
}
|
||||
#[cfg(windows)]
|
||||
self.0.is_dir()
|
||||
@@ -133,7 +133,8 @@ impl Metadata {
|
||||
pub fn is_executable(&self) -> bool {
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
- (self.0.st_mode & libc::S_IFMT) == libc::S_IFREG && self.0.st_mode & libc::S_IXUSR == libc::S_IXUSR
|
||||
+ (self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFREG as u32
|
||||
+ && self.0.st_mode as u32 & libc::S_IXUSR as u32 == libc::S_IXUSR as u32
|
||||
}
|
||||
#[cfg(windows)]
|
||||
gix_fs::is_executable(&self.0)
|
||||
@@ -143,7 +144,7 @@ impl Metadata {
|
||||
pub fn is_symlink(&self) -> bool {
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
- (self.0.st_mode & libc::S_IFMT) == libc::S_IFLNK
|
||||
+ (self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFLNK as u32
|
||||
}
|
||||
#[cfg(windows)]
|
||||
self.0.is_symlink()
|
||||
@@ -153,7 +154,7 @@ impl Metadata {
|
||||
pub fn is_file(&self) -> bool {
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
- (self.0.st_mode & libc::S_IFMT) == libc::S_IFREG
|
||||
+ (self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFREG as u32
|
||||
}
|
||||
#[cfg(windows)]
|
||||
self.0.is_file()
|
Loading…
Reference in New Issue