upgpkg(main/silicon): 0.5.1

Co-Authored-By: Kevin Williams <admin@utermux.dev>
This commit is contained in:
Yaksh Bariya 2022-10-15 08:48:40 +05:30
parent a9d64807d4
commit 8a17f122ee
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 36 additions and 2 deletions

View File

@ -2,11 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://github.com/Aloxaf/silicon
TERMUX_PKG_DESCRIPTION="Silicon is an alternative to Carbon implemented in Rust"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
TERMUX_PKG_VERSION=0.4.3
TERMUX_PKG_VERSION=0.5.1
TERMUX_PKG_SRCURL=https://github.com/Aloxaf/silicon/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=68d64ade34ac571cf2d092f9a6f124e2c7d0441a91e3ba00ca1c8edcdd008630
TERMUX_PKG_SHA256=784a6f99001f2000422b676e637fe83a5dc27f5fc55ad33e227c882ce20e6439
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BUILD_DEPENDS="fontconfig, freetype, harfbuzz"
TERMUX_PKG_BLACKLISTED_ARCHES="arm"
termux_step_pre_configure() {

View File

@ -0,0 +1,33 @@
commit 416417bc7574a905865b44c3d7e169b658b278cc
Author: Yaksh Bariya <yakshbari4@gmail.com>
Date: Sat Oct 15 08:36:11 2022 +0530
fix: do not hardcode string pointer types
Some platforms may have different types than '*const i8'
For example Android has '*const u8', better just rely on
std::os::raw::c_char for the type
diff --git a/src/hb_wrapper.rs b/src/hb_wrapper.rs
index 771254f..7d3bee0 100644
--- a/src/hb_wrapper.rs
+++ b/src/hb_wrapper.rs
@@ -14,7 +14,7 @@ pub fn feature_from_tag(tag: &str) -> Result<hb_feature_t> {
let mut feature = mem::zeroed();
ensure!(
hb_feature_from_string(
- tag.as_ptr() as *const i8,
+ tag.as_ptr() as *const ::std::os::raw::c_char,
tag.len() as i32,
&mut feature as *mut _
) != 0,
@@ -88,7 +88,7 @@ impl HBBuffer {
unsafe {
hb_buffer_add_utf8(
self.buffer,
- s.as_ptr() as *const i8,
+ s.as_ptr() as *const ::std::os::raw::c_char,
s.len() as i32,
0,
s.len() as i32,