diff --git a/contrib/depends/packages/utf8proc.mk b/contrib/depends/packages/utf8proc.mk new file mode 100644 index 0000000..1205538 --- /dev/null +++ b/contrib/depends/packages/utf8proc.mk @@ -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 index 0000000..49a030f --- /dev/null +++ b/contrib/depends/patches/utf8proc/force_static.patch @@ -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 + +-#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" {