Skip to content

Commit 2297c39

Browse files
committed
Link to FreeType in R/Makefile
1 parent a1ef342 commit 2297c39

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
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+
37
# webR 0.5.3
48

59
## Bug Fixes

R/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ STAGE2_LDFLAGS += $(WASM_OPT)
102102
STAGE2_LDFLAGS += -L$(WASM)/lib
103103
STAGE2_LDFLAGS += -fwasm-exceptions
104104
STAGE2_LDFLAGS += -s SUPPORT_LONGJMP=wasm
105+
STAGE2_LDFLAGS += --use-port=freetype # See r-wasm/webr#504, 56069e2
105106

106107
STAGE2_FFLAGS := $(STAGE2_FFLAGS)
107108
STAGE2_FFLAGS += --target=wasm32-unknown-emscripten
@@ -207,6 +208,10 @@ $(BUILD)/state/R-$(R_VERSION)/r-stage2: $(BUILD)/state/R-$(R_VERSION)/r-stage1 $
207208
sed -i.bak -e ':m' -e 's/-lz//2' -e 't m' -e ':n' -e 's/-lpng16//2' -e 't n' \
208209
$(R_SOURCE)/build/src/library/grDevices/src/cairo/Makefile
209210
rm $(R_SOURCE)/build/src/library/grDevices/src/cairo/Makefile.bak
211+
# -lz also provided by --use-port=freetype linking. See r-wasm/webr#504
212+
sed -i.bak -e '/^LIBS =/s/-lz //' $(R_SOURCE)/build/Makeconf
213+
rm $(R_SOURCE)/build/Makeconf.bak
214+
# Build R
210215
cd $(STAGE2_BUILD) && $(MAKE_WASM) -j $(NPROCS) R
211216
mkdir -p $(R_SOURCE)/build/doc
212217
cd $(R_SOURCE)/build/doc && touch NEWS.pdf R.1 Rscript.1

0 commit comments

Comments
 (0)