]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
depends: add utf8proc
authortobtoht <tob@featherwallet.org>
Tue, 10 Oct 2023 12:56:22 +0000 (14:56 +0200)
committertobtoht <tob@featherwallet.org>
Tue, 10 Oct 2023 12:56:22 +0000 (14:56 +0200)
contrib/depends/packages/utf8proc.mk [new file with mode: 0644]
contrib/depends/patches/utf8proc/force_static.patch [new file with mode: 0644]

diff --git a/contrib/depends/packages/utf8proc.mk b/contrib/depends/packages/utf8proc.mk
new file mode 100644 (file)
index 0000000..1205538
--- /dev/null
@@ -0,0 +1,28 @@
+package=utf8proc
+$(package)_version=2.8.0
+$(package)_download_path=https://github.com/JuliaStrings/utf8proc/archive/refs/tags/
+$(package)_download_file=v$($(package)_version).tar.gz
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=a0a60a79fe6f6d54e7d411facbfcc867a6e198608f2cd992490e46f04b1bcecc
+$(package)_patches=force_static.patch
+
+define $(package)_preprocess_cmds
+  patch -p1 < $($(package)_patch_dir)/force_static.patch
+endef
+
+define $(package)_config_cmds
+    echo "$($(package)_cmake)" && \
+    mkdir build && \
+    cd build && \
+    $($(package)_cmake) ..
+endef
+
+define $(package)_build_cmds
+    cd build && \
+    $(MAKE)
+endef
+
+define $(package)_stage_cmds
+    cd build && \
+    $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/patches/utf8proc/force_static.patch b/contrib/depends/patches/utf8proc/force_static.patch
new file mode 100644 (file)
index 0000000..49a030f
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/utf8proc.h b/utf8proc.h
+index 7ec591d..024343b 100644
+--- a/utf8proc.h
++++ b/utf8proc.h
+@@ -120,21 +120,7 @@ typedef bool utf8proc_bool;
+ #endif
+ #include <limits.h>
+-#ifdef UTF8PROC_STATIC
+ #  define UTF8PROC_DLLEXPORT
+-#else
+-#  ifdef _WIN32
+-#    ifdef UTF8PROC_EXPORTS
+-#      define UTF8PROC_DLLEXPORT __declspec(dllexport)
+-#    else
+-#      define UTF8PROC_DLLEXPORT __declspec(dllimport)
+-#    endif
+-#  elif __GNUC__ >= 4
+-#    define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default")))
+-#  else
+-#    define UTF8PROC_DLLEXPORT
+-#  endif
+-#endif
+ #ifdef __cplusplus
+ extern "C" {