Skip to content

Commit 96fa626

Browse files
authored
Update Fontconfig to v2.15.0 (#557)
* Update Fontconfig to v2.14.0 * Use `install` command when installing wasm bins Ensures correct permissions are set at destination. * Use fontconfig v2.15.0 * Update NEWS.md
1 parent 8ff3a09 commit 96fa626

File tree

8 files changed

+36
-30
lines changed

8 files changed

+36
-30
lines changed

NEWS.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# webR (development version)
22

3-
## Bug Fixes
4-
5-
* (Regression, again) Fix linking to the FreeType library when building webR (See #504 for details).
6-
73
## New features
84

95
* Support sharing URLs and initial editor file population in the webR application. See `src/examples/embed/` for an example of iframe embedding with `postMessage()`. (#554)
106

7+
## Breaking changes
8+
9+
* Updated Fontconfig to version 2.15.0 (#544).
10+
11+
## Bug Fixes
12+
13+
* (Regression, again) Fix linking to the FreeType library when building webR (See #504 for details).
14+
1115
# webR 0.5.3
1216

1317
## Bug Fixes

libs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ $(EM_PKG_CONFIG_PATH)/%.pc: recipes/**/%.pc
6161

6262
$(DEFAULT_WASM_BINS_INST): $(DEFAULT_WASM_LIBS)
6363
@mkdir -p $(HOST)/bin
64-
cp "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@"
64+
install "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@"
6565

6666
$(OPTIONAL_WASM_BINS_INST): $(OPTIONAL_WASM_LIBS)
6767
@mkdir -p $(HOST)/bin
68-
cp "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@"
68+
install "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@"
6969

7070
.PHONY: clean-bins
7171
clean-bins:

libs/recipes/fontconfig/rules.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FC_VERSION = 2.12.5
2-
FC_TARBALL = $(DOWNLOAD)/fontconfig-$(FC_VERSION).tar.gz
3-
FC_URL = https://www.freedesktop.org/software/fontconfig/release/fontconfig-$(FC_VERSION).tar.gz
1+
FC_VERSION = 2.15.0
2+
FC_TARBALL = $(DOWNLOAD)/fontconfig-$(FC_VERSION).tar.xz
3+
FC_URL = https://www.freedesktop.org/software/fontconfig/release/fontconfig-$(FC_VERSION).tar.xz
44

55
.PHONY: fontconfig
66
fontconfig: $(FC_DEPS)
@@ -12,7 +12,7 @@ $(FC_TARBALL):
1212
$(FC_DEPS): $(FC_TARBALL) $(LIBXML2_WASM_LIB) $(EM_PKG_CONFIG_PATH)/freetype2.pc
1313
rm -rf $(BUILD)/fontconfig-$(FC_VERSION)
1414
mkdir -p $(BUILD)/fontconfig-$(FC_VERSION)/build
15-
tar -C $(BUILD) -xf $(FC_TARBALL) --exclude=fcobjshash.h
15+
tar -C $(BUILD) -xf $(FC_TARBALL)
1616
cp -r "$(WEBR_ROOT)/patches/fontconfig-$(FC_VERSION)/." \
1717
"$(BUILD)/fontconfig-$(FC_VERSION)/patches"
1818
cd $(BUILD)/fontconfig-$(FC_VERSION)/build && quilt push -a && \

libs/recipes/freetype2/freetype2.pc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: freetype
22
Description: Emscripten ports version of freetype library
3-
Version: 18.0.12
3+
Version: 26.2.20
44
Cflags: --use-port=freetype
55
Libs: --use-port=freetype

patches/fontconfig-2.12.5/fix-double-sysroot.diff

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Index: fontconfig-2.15.0/src/fccfg.c
2+
===================================================================
3+
--- fontconfig-2.15.0.orig/src/fccfg.c
4+
+++ fontconfig-2.15.0/src/fccfg.c
5+
@@ -2716,10 +2716,7 @@ FcConfigGetFilename (FcConfig *conf
6+
{
7+
FcChar8 *s;
8+
9+
- if (sysroot)
10+
- s = FcStrBuildFilename (sysroot, *p, NULL);
11+
- else
12+
- s = *p;
13+
+ s = FcStrdup(*p);
14+
file = FcConfigFileExists (s, url);
15+
if (sysroot)
16+
FcStrFree (s);
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Index: fontconfig-2.12.5/src/fccache.c
1+
Index: fontconfig-2.15.0/src/fccache.c
22
===================================================================
3-
--- fontconfig-2.12.5.orig/src/fccache.c
4-
+++ fontconfig-2.12.5/src/fccache.c
5-
@@ -584,7 +584,7 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, st
3+
--- fontconfig-2.15.0.orig/src/fccache.c
4+
+++ fontconfig-2.15.0/src/fccache.c
5+
@@ -842,7 +842,7 @@ FcCacheTimeValid (FcConfig *config, FcCa
66
printf ("FcCacheTimeValid dir \"%s\" cache checksum %d dir checksum %d\n",
77
FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime);
88
#endif
99
-
1010
+ if (strcmp(FcCacheDir(cache), "/usr/share/fonts") == 0) return FcTrue;
11-
return cache->checksum == (int) dir_stat->st_mtime && fnano;
11+
return dir_stat->st_mtime == 0 || (cache->checksum == (int) dir_stat->st_mtime && fnano);
1212
}
1313

0 commit comments

Comments
 (0)