diff --git a/NEWS.md b/NEWS.md index 07b422c0..a0dd294a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,13 +1,17 @@ # webR (development version) -## Bug Fixes - -* (Regression, again) Fix linking to the FreeType library when building webR (See #504 for details). - ## New features * 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) +## Breaking changes + +* Updated Fontconfig to version 2.15.0 (#544). + +## Bug Fixes + +* (Regression, again) Fix linking to the FreeType library when building webR (See #504 for details). + # webR 0.5.3 ## Bug Fixes diff --git a/libs/Makefile b/libs/Makefile index a2607089..32998750 100644 --- a/libs/Makefile +++ b/libs/Makefile @@ -61,11 +61,11 @@ $(EM_PKG_CONFIG_PATH)/%.pc: recipes/**/%.pc $(DEFAULT_WASM_BINS_INST): $(DEFAULT_WASM_LIBS) @mkdir -p $(HOST)/bin - cp "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@" + install "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@" $(OPTIONAL_WASM_BINS_INST): $(OPTIONAL_WASM_LIBS) @mkdir -p $(HOST)/bin - cp "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@" + install "$(patsubst $(HOST)/bin/%,$(WASM)/bin/%,$@)" "$@" .PHONY: clean-bins clean-bins: diff --git a/libs/recipes/fontconfig/rules.mk b/libs/recipes/fontconfig/rules.mk index 3c7f0b33..26f92f18 100644 --- a/libs/recipes/fontconfig/rules.mk +++ b/libs/recipes/fontconfig/rules.mk @@ -1,6 +1,6 @@ -FC_VERSION = 2.12.5 -FC_TARBALL = $(DOWNLOAD)/fontconfig-$(FC_VERSION).tar.gz -FC_URL = https://www.freedesktop.org/software/fontconfig/release/fontconfig-$(FC_VERSION).tar.gz +FC_VERSION = 2.15.0 +FC_TARBALL = $(DOWNLOAD)/fontconfig-$(FC_VERSION).tar.xz +FC_URL = https://www.freedesktop.org/software/fontconfig/release/fontconfig-$(FC_VERSION).tar.xz .PHONY: fontconfig fontconfig: $(FC_DEPS) @@ -12,7 +12,7 @@ $(FC_TARBALL): $(FC_DEPS): $(FC_TARBALL) $(LIBXML2_WASM_LIB) $(EM_PKG_CONFIG_PATH)/freetype2.pc rm -rf $(BUILD)/fontconfig-$(FC_VERSION) mkdir -p $(BUILD)/fontconfig-$(FC_VERSION)/build - tar -C $(BUILD) -xf $(FC_TARBALL) --exclude=fcobjshash.h + tar -C $(BUILD) -xf $(FC_TARBALL) cp -r "$(WEBR_ROOT)/patches/fontconfig-$(FC_VERSION)/." \ "$(BUILD)/fontconfig-$(FC_VERSION)/patches" cd $(BUILD)/fontconfig-$(FC_VERSION)/build && quilt push -a && \ diff --git a/libs/recipes/freetype2/freetype2.pc b/libs/recipes/freetype2/freetype2.pc index fdd79457..e8c31f65 100644 --- a/libs/recipes/freetype2/freetype2.pc +++ b/libs/recipes/freetype2/freetype2.pc @@ -1,5 +1,5 @@ Name: freetype Description: Emscripten ports version of freetype library -Version: 18.0.12 +Version: 26.2.20 Cflags: --use-port=freetype Libs: --use-port=freetype diff --git a/patches/fontconfig-2.12.5/fix-double-sysroot.diff b/patches/fontconfig-2.12.5/fix-double-sysroot.diff deleted file mode 100644 index 20ed6a5f..00000000 --- a/patches/fontconfig-2.12.5/fix-double-sysroot.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: fontconfig-2.12.5/src/fcxml.c -=================================================================== ---- fontconfig-2.12.5.orig/src/fcxml.c -+++ fontconfig-2.12.5/src/fcxml.c -@@ -3372,9 +3372,6 @@ FcConfigParseAndLoad (FcConfig *config, - ret = FcTrue; - goto bail0; - } -- if (sysroot) -- filename = FcStrBuildFilename (sysroot, f, NULL); -- else - filename = FcStrdup (f); - FcStrFree (f); - diff --git a/patches/fontconfig-2.15.0/fix-double-sysroot.diff b/patches/fontconfig-2.15.0/fix-double-sysroot.diff new file mode 100644 index 00000000..5c2214fb --- /dev/null +++ b/patches/fontconfig-2.15.0/fix-double-sysroot.diff @@ -0,0 +1,16 @@ +Index: fontconfig-2.15.0/src/fccfg.c +=================================================================== +--- fontconfig-2.15.0.orig/src/fccfg.c ++++ fontconfig-2.15.0/src/fccfg.c +@@ -2716,10 +2716,7 @@ FcConfigGetFilename (FcConfig *conf + { + FcChar8 *s; + +- if (sysroot) +- s = FcStrBuildFilename (sysroot, *p, NULL); +- else +- s = *p; ++ s = FcStrdup(*p); + file = FcConfigFileExists (s, url); + if (sysroot) + FcStrFree (s); diff --git a/patches/fontconfig-2.12.5/series b/patches/fontconfig-2.15.0/series similarity index 100% rename from patches/fontconfig-2.12.5/series rename to patches/fontconfig-2.15.0/series diff --git a/patches/fontconfig-2.12.5/syscache-always-valid.diff b/patches/fontconfig-2.15.0/syscache-always-valid.diff similarity index 52% rename from patches/fontconfig-2.12.5/syscache-always-valid.diff rename to patches/fontconfig-2.15.0/syscache-always-valid.diff index 15645e41..4745e4a9 100644 --- a/patches/fontconfig-2.12.5/syscache-always-valid.diff +++ b/patches/fontconfig-2.15.0/syscache-always-valid.diff @@ -1,13 +1,13 @@ -Index: fontconfig-2.12.5/src/fccache.c +Index: fontconfig-2.15.0/src/fccache.c =================================================================== ---- fontconfig-2.12.5.orig/src/fccache.c -+++ fontconfig-2.12.5/src/fccache.c -@@ -584,7 +584,7 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, st +--- fontconfig-2.15.0.orig/src/fccache.c ++++ fontconfig-2.15.0/src/fccache.c +@@ -842,7 +842,7 @@ FcCacheTimeValid (FcConfig *config, FcCa printf ("FcCacheTimeValid dir \"%s\" cache checksum %d dir checksum %d\n", FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime); #endif - + if (strcmp(FcCacheDir(cache), "/usr/share/fonts") == 0) return FcTrue; - return cache->checksum == (int) dir_stat->st_mtime && fnano; + return dir_stat->st_mtime == 0 || (cache->checksum == (int) dir_stat->st_mtime && fnano); }