aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaeri <Haeri@users.noreply.github.com>2021-01-17 04:33:51 +0100
committerGitHub <noreply@github.com>2021-01-16 19:33:51 -0800
commit083c86d05e3ade6f5cf4ad144542d0b708775772 (patch)
treebb586476badc3de14dfffc6a41310f8d0e35f8bc
parentf89336d703bf3ffd2aa4f832f214b42a11c7d044 (diff)
downloadvcpkg-083c86d05e3ade6f5cf4ad144542d0b708775772.tar.gz
vcpkg-083c86d05e3ade6f5cf4ad144542d0b708775772.zip
[msdfgen] New port (#15427)
* initial * format * Update ports/msdfgen/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/msdfgen/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * using vcpkg_copy_tools * Compromise between renameing and UWP * added feature "tools" * forgot a check * Update ports/msdfgen/portfile.cmake * Update port_versions * Add msdfgen.json in port_versions Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
-rw-r--r--port_versions/baseline.json4
-rw-r--r--port_versions/m-/msdfgen.json9
-rw-r--r--ports/msdfgen/compatibility.patch15
-rw-r--r--ports/msdfgen/portfile.cmake44
-rw-r--r--ports/msdfgen/vcpkg.json14
5 files changed, 86 insertions, 0 deletions
diff --git a/port_versions/baseline.json b/port_versions/baseline.json
index c577ec1ee..4c76f975e 100644
--- a/port_versions/baseline.json
+++ b/port_versions/baseline.json
@@ -3848,6 +3848,10 @@
"baseline": "3.1.0",
"port-version": 0
},
+ "msdfgen": {
+ "baseline": "1.8",
+ "port-version": 0
+ },
"msgpack": {
"baseline": "3.3.0",
"port-version": 0
diff --git a/port_versions/m-/msdfgen.json b/port_versions/m-/msdfgen.json
new file mode 100644
index 000000000..1ae233d43
--- /dev/null
+++ b/port_versions/m-/msdfgen.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "8b15da4b26ea13caeba60337d49e6d5ec17c3e11",
+ "version-string": "1.8",
+ "port-version": 0
+ }
+ ]
+}
diff --git a/ports/msdfgen/compatibility.patch b/ports/msdfgen/compatibility.patch
new file mode 100644
index 000000000..f1662549a
--- /dev/null
+++ b/ports/msdfgen/compatibility.patch
@@ -0,0 +1,15 @@
+diff --git a/ext/import-font.cpp b/ext/import-font.cpp
+index 8f23620..ed26f54 100644
+--- a/ext/import-font.cpp
++++ b/ext/import-font.cpp
+@@ -7,10 +7,6 @@
+ #include FT_FREETYPE_H
+ #include FT_OUTLINE_H
+
+-#ifdef _WIN32
+- #pragma comment(lib, "freetype.lib")
+-#endif
+-
+ namespace msdfgen {
+
+ #define REQUIRE(cond) { if (!(cond)) return false; }
diff --git a/ports/msdfgen/portfile.cmake b/ports/msdfgen/portfile.cmake
new file mode 100644
index 000000000..cfe688c44
--- /dev/null
+++ b/ports/msdfgen/portfile.cmake
@@ -0,0 +1,44 @@
+# No symbols are exported in msdfgen source
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Chlumsky/msdfgen
+ REF 9af250c7d6780a41dcaf536c05e3e1987a1bdcd7
+ SHA512 6b1dadd386aedf1e2de927dc83fe1f7fd7e053b0e9829ea0609a193ab8d9f92ecf08d2a6225b76a4f7bf9344b2935f38bbd00c4cc0c6627c1d95f67d2db728fe
+ HEAD_REF master
+ PATCHES
+ compatibility.patch
+)
+
+set(BUILD_TOOLS OFF)
+if ("tools" IN_LIST FEATURES)
+ if (VCPKG_TARGET_IS_UWP)
+ message("Tools couldn't be built on UWP, disable it automatically.")
+ else()
+ set(BUILD_TOOLS ON)
+ endif()
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DMSDFGEN_BUILD_MSDFGEN_STANDALONE=${BUILD_TOOLS}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/msdfgen)
+
+# move exe to tools
+if(BUILD_TOOLS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ vcpkg_copy_tools(TOOL_NAMES msdfgen AUTO_CLEAN)
+endif()
+
+
+# cleanup
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# license
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/msdfgen/vcpkg.json b/ports/msdfgen/vcpkg.json
new file mode 100644
index 000000000..5c8d9628c
--- /dev/null
+++ b/ports/msdfgen/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "msdfgen",
+ "version-string": "1.8",
+ "description": "Multi-channel signed distance field generator",
+ "homepage": "https://github.com/Chlumsky/msdfgen",
+ "dependencies": [
+ "freetype"
+ ],
+ "features": {
+ "tools": {
+ "description": "Generates an executable inside the tools folder. Not supported on UWP."
+ }
+ }
+}