git: 77eff838c2c3 - main - misc/silicon: fix build on ARM / POWER

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 25 Apr 2023 09:15:47 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=77eff838c2c35bc1ee67fe824aa88ace83d7f9a4

commit 77eff838c2c35bc1ee67fe824aa88ace83d7f9a4
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-04-25 09:14:35 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-04-25 09:15:31 +0000

    misc/silicon: fix build on ARM / POWER
    
    error[E0308]: mismatched types
       --> src/hb_wrapper.rs:17:17
        |
    16  |             hb_feature_from_string(
        |             ---------------------- arguments to this function are incorrect
    17  |                 tag.as_ptr() as *const i8,
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
        |
        = note: expected raw pointer `*const u8`
                   found raw pointer `*const i8`
---
 misc/silicon/files/patch-src_hb__wrapper.rs | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/misc/silicon/files/patch-src_hb__wrapper.rs b/misc/silicon/files/patch-src_hb__wrapper.rs
new file mode 100644
index 000000000000..9380bc9b5786
--- /dev/null
+++ b/misc/silicon/files/patch-src_hb__wrapper.rs
@@ -0,0 +1,28 @@
+--- src/hb_wrapper.rs.orig	2023-04-25 09:08:05 UTC
++++ src/hb_wrapper.rs
+@@ -6,6 +6,7 @@ use font_kit::loaders::freetype::NativeFont;
+ // use harfbuzz for shaping ligatures
+ pub use harfbuzz::*;
+ use harfbuzz_sys as harfbuzz;
++use std::os::raw::c_char;
+ use std::mem;
+ 
+ /// font feature tag
+@@ -14,7 +15,7 @@ pub fn feature_from_tag(tag: &str) -> Result<hb_featur
+         let mut feature = mem::zeroed();
+         ensure!(
+             hb_feature_from_string(
+-                tag.as_ptr() as *const i8,
++                tag.as_ptr() as *const c_char,
+                 tag.len() as i32,
+                 &mut feature as *mut _
+             ) != 0,
+@@ -88,7 +89,7 @@ impl HBBuffer {
+         unsafe {
+             hb_buffer_add_utf8(
+                 self.buffer,
+-                s.as_ptr() as *const i8,
++                s.as_ptr() as *const c_char,
+                 s.len() as i32,
+                 0,
+                 s.len() as i32,