Skip to content

Commit

Permalink
[fontconfig] Fix mingw build (microsoft#25389)
Browse files Browse the repository at this point in the history
* Fix mingw build

* Update versions
  • Loading branch information
dg0yt authored Jun 23, 2022
1 parent 613ee92 commit d3197c9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
13 changes: 13 additions & 0 deletions ports/fontconfig/fix-mingw-gperf-fallback.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index e5096bf..51c289f 100644
--- a/meson.build
+++ b/meson.build
@@ -268,7 +268,7 @@ sh = find_program('sh', required : false)

if not sh.found() # host_machine.system() == 'windows' or not sh.found()
# TODO: This is not always correct
- if cc.get_id() == 'msvc'
+ if host_machine.system() == 'windows'
gperf_len_type = 'size_t'
else
gperf_len_type = 'unsigned'
2 changes: 1 addition & 1 deletion ports/fontconfig/libgetopt.patch
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ index f616600..6d82a16 100644
+if host_machine.system() == 'windows'
+ conf.set('HAVE_GETOPT', 1)
+ conf.set('HAVE_GETOPT_LONG', 1)
+ getopt_dep = cc.find_library('getopt', required: true)
+ getopt_dep = cc.find_library('getopt', required: false)
+else
+ getopt_dep = dependency('', required: false)
+endif
Expand Down
1 change: 1 addition & 0 deletions ports/fontconfig/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_gitlab(
PATCHES
no-etc-symlinks.patch
libgetopt.patch
fix-mingw-gperf-fallback.patch
)

vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
Expand Down
2 changes: 1 addition & 1 deletion ports/fontconfig/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fontconfig",
"version": "2.14.0",
"port-version": 2,
"port-version": 3,
"description": "Library for configuring and customizing font access.",
"homepage": "https://www.freedesktop.org/wiki/Software/fontconfig",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@
},
"fontconfig": {
"baseline": "2.14.0",
"port-version": 2
"port-version": 3
},
"foonathan-memory": {
"baseline": "2019-07-21",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/fontconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "edebefba0511e2f8ee4018707fe611d0035c4dd4",
"version": "2.14.0",
"port-version": 3
},
{
"git-tree": "5c02d2ba027c9f390729a7e0899e63c853450dfb",
"version": "2.14.0",
Expand Down

0 comments on commit d3197c9

Please sign in to comment.