aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/libunibreak/CMakeLists.txt35
-rw-r--r--ports/libunibreak/CONTROL3
-rw-r--r--ports/libunibreak/portfile.cmake24
3 files changed, 62 insertions, 0 deletions
diff --git a/ports/libunibreak/CMakeLists.txt b/ports/libunibreak/CMakeLists.txt
new file mode 100644
index 000000000..9ee5437d3
--- /dev/null
+++ b/ports/libunibreak/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.8.0)
+
+project(libunibreak)
+
+set(libunibreak_srcs
+ src/linebreakdata.c
+ src/linebreakdef.c
+ src/wordbreak.c
+ src/graphemebreak.c
+ src/unibreakbase.c
+ src/unibreakdef.c
+)
+
+
+include_directories(src)
+
+add_library(libunibreak ${libunibreak_srcs})
+
+install(
+ TARGETS libunibreak
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(
+ FILES
+ src/linebreak.h
+ src/linebreakdef.h
+ src/wordbreak.h
+ src/wordbreakdef.h
+ DESTINATION include
+ )
+endif()
diff --git a/ports/libunibreak/CONTROL b/ports/libunibreak/CONTROL
new file mode 100644
index 000000000..b8a96abd4
--- /dev/null
+++ b/ports/libunibreak/CONTROL
@@ -0,0 +1,3 @@
+Source: libunibreak
+Version: 4.0
+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.
diff --git a/ports/libunibreak/portfile.cmake b/ports/libunibreak/portfile.cmake
new file mode 100644
index 000000000..6ec8bdd74
--- /dev/null
+++ b/ports/libunibreak/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO adah1972/libunibreak
+ REF libunibreak_4_0
+ SHA512 f11295133a1c65f365a5287f7377f69ac7998f19b06d44818fb55c8a5ba3edabc36de8d1b7c0d38db9d982f0e443d0a751f6d51841865094122df4cd74c9af3b
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright)