From 39952f8bdf2ee77e32152bf67df456a83e3e03fe Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 24 Apr 2022 20:52:36 +0200 Subject: Remove build dependency on Fontforge The required version of fontforge (from 2020!) is not available in many distros. This is an annoying for contributors and greatly complicated the CI and F-Droid scripts. The generated font file is now included in the sources. Fontforge is still needed when adding new glyphs but this is not a common operation. --- Makefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a606299..a731a0b 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,10 @@ clean: rm -rf _build/*.dex _build/class _build/gen _build/*.apk _build/*.unsigned-apk \ _build/*.idsig _build/assets -.PHONY: release debug installd clean +rebuild_special_font: + cd srcs/special_font && fontforge -lang=ff -script build.pe *.svg + +.PHONY: release debug installd clean rebuild_special_font $(shell mkdir -p _build) @@ -85,6 +88,11 @@ _build/%.unaligned-apk: $(addprefix _build/,$(APK_EXTRA_FILES)) $(MANIFEST_FILE) -I $(ANDROID_PLATFORM)/android.jar -F "$@" $(AAPT_PACKAGE_FLAGS) cd $(@D) && $(ANDROID_BUILD_TOOLS)/aapt add $(@F) $(APK_EXTRA_FILES) +# Copy the special font file into _build because aapt requires relative paths +_build/assets/special_font.ttf: srcs/special_font/result.ttf + mkdir -p $(@D) + cp "$<" "$@" + # R.java GEN_DIR = _build/gen @@ -95,15 +103,6 @@ $(R_FILE): $(RES_FILES) $(MANIFEST_FILE) $(ANDROID_BUILD_TOOLS)/aapt package -f -m -S $(RES_DIR) -J $(GEN_DIR) \ -M $(MANIFEST_FILE) -I $(ANDROID_PLATFORM)/android.jar -# Special font - -SPECIAL_FONT_GLYPHS = $(wildcard $(CURDIR)/srcs/special_font/*.svg) -SPECIAL_FONT_SCRIPT = $(CURDIR)/srcs/special_font/build.pe - -_build/assets/special_font.ttf: $(SPECIAL_FONT_SCRIPT) $(SPECIAL_FONT_GLYPHS) - mkdir -p $(@D) - fontforge -lang=ff -script $(SPECIAL_FONT_SCRIPT) $(CURDIR)/$@ $(SPECIAL_FONT_GLYPHS) - # Compile java classes and build classes.dex OBJ_DIR = _build/class -- cgit v1.2.3