Skip to content

Commit

Permalink
[libunibreak] Add the missing header files (#37794)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored Apr 1, 2024
1 parent 34742e1 commit 91e4c13
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ports/libunibreak/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set(libunibreak_srcs
src/graphemebreak.c
src/graphemebreakdata.c
src/emojidef.c
src/eastasianwidthdef.c
src/eastasianwidthdata.c
src/unibreakbase.c
src/unibreakdef.c
)
Expand All @@ -30,6 +32,9 @@ if(NOT DISABLE_INSTALL_HEADERS)
install(
FILES
src/emojidef.h
src/eastasianwidthdef.h
src/unibreakbase.h
src/unibreakdef.h
src/graphemebreak.h
src/graphemebreakdef.h
src/linebreak.h
Expand Down
23 changes: 23 additions & 0 deletions ports/libunibreak/fix_export.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/src/eastasianwidthdef.h b/src/eastasianwidthdef.h
index 67a41aa..c081a02 100644
--- a/src/eastasianwidthdef.h
+++ b/src/eastasianwidthdef.h
@@ -26,6 +26,9 @@

#include "unibreakdef.h"

+#ifdef __cplusplus
+extern "C" {
+#endif
/**
* East Asian Width (ea) class. This is defined in Unicode Standard
* Annex 11.
@@ -52,5 +55,8 @@ struct EastAsianWidthProperties
};

enum EastAsianWidthClass ub_get_char_eaw_class(utf32_t ch);
+#ifdef __cplusplus
+}
+#endif

#endif /* EASTASIANWIDTHDEF_H */
4 changes: 3 additions & 1 deletion ports/libunibreak/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ vcpkg_from_github(
REF "libunibreak_${MAJOR}_${MINOR}"
SHA512 a85333d59c78b67b1c05d33ab99c069ba493780d6a98ad5ab00e33235c454b8b33515cac4e815de35533f235be7cf5473550b3a6389f7581ba2f6216d42d38e1
HEAD_REF master
PATCHES
fix_export.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
Expand All @@ -22,4 +24,4 @@ vcpkg_cmake_install()
configure_file("${CMAKE_CURRENT_LIST_DIR}/libunibreak-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/libunibreak-config.cmake" @ONLY)

file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
1 change: 1 addition & 0 deletions ports/libunibreak/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libunibreak",
"version": "6.1",
"port-version": 1,
"description": "an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information.",
"homepage": "https://github.com/adah1972/libunibreak",
"license": "zlib-acknowledgement",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5070,7 +5070,7 @@
},
"libunibreak": {
"baseline": "6.1",
"port-version": 0
"port-version": 1
},
"libunifex": {
"baseline": "0.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libunibreak.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4970494282744de3fbdc2e964fa9d96ad3ddc27e",
"version": "6.1",
"port-version": 1
},
{
"git-tree": "cf6623da9e4002c21327a8ea1451fccc0f54a5ce",
"version": "6.1",
Expand Down

0 comments on commit 91e4c13

Please sign in to comment.