From 8ca6286ae032ccfbb9c5376fb8cbb63d764718d8 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Tue, 6 Mar 2018 14:57:00 -0500 Subject: [PATCH] Add Cairo/FBWhiptail to the build process Enable it by default for the Librem 13 v2 --- Makefile | 6 ++++++ boards/librem13v2/librem13v2.config | 7 +++++-- modules/cairo | 28 ++++++++++++++++++++++++++++ modules/fbwhiptail | 15 +++++++++++++++ modules/libpng | 23 +++++++++++++++++++++++ modules/pixman | 24 ++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 modules/cairo create mode 100644 modules/fbwhiptail create mode 100644 modules/libpng create mode 100644 modules/pixman diff --git a/Makefile b/Makefile index 921bc3f4..6c3b64ee 100644 --- a/Makefile +++ b/Makefile @@ -347,6 +347,8 @@ bin_modules-$(CONFIG_LVM2) += lvm2 bin_modules-$(CONFIG_DROPBEAR) += dropbear bin_modules-$(CONFIG_FLASHTOOLS) += flashtools bin_modules-$(CONFIG_NEWT) += newt +bin_modules-$(CONFIG_CAIRO) += cairo +bin_modules-$(CONFIG_FBWHIPTAIL) += fbwhiptail $(foreach m, $(bin_modules-y), \ $(call map,initrd_bin_add,$(call bins,$m)) \ @@ -487,6 +489,10 @@ module_dirs := \ $(kernel-headers_dir) \ $(slang_dir) \ $(newt_dir) \ + $(libpng_dir) \ + $(pixman_dir) \ + $(cairo_dir) \ + $(fbwhiptail_dir) modules.clean: for dir in $(module_dirs) \ diff --git a/boards/librem13v2/librem13v2.config b/boards/librem13v2/librem13v2.config index aa7376e6..d95235ad 100644 --- a/boards/librem13v2/librem13v2.config +++ b/boards/librem13v2/librem13v2.config @@ -10,13 +10,16 @@ CONFIG_KEXEC=y CONFIG_UTIL_LINUX=y CONFIG_LVM2=y CONFIG_MBEDTLS=y -CONFIG_NEWT=y CONFIG_PCIUTILS=y CONFIG_POPT=y CONFIG_QRENCODE=y -CONFIG_SLANG=y CONFIG_TPMTOTP=y +#CONFIG_SLANG=y +#CONFIG_NEWT=y +CONFIG_CAIRO=y +CONFIG_FBWHIPTAIL=y + CONFIG_LINUX_USB=y export CONFIG_TPM=y diff --git a/modules/cairo b/modules/cairo new file mode 100644 index 00000000..bab70221 --- /dev/null +++ b/modules/cairo @@ -0,0 +1,28 @@ +modules-$(CONFIG_CAIRO) += cairo + +cairo_version := 1.14.12 +cairo_dir := cairo-$(cairo_version) +cairo_tar := cairo-$(cairo_version).tar.xz +cairo_url := https://www.cairographics.org/releases/$(cairo_tar) +cairo_hash := 8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16 + +cairo_configure := \ + $(CROSS_TOOLS) \ + CFLAGS="-DCAIRO_NO_MUTEX=1 -O3" \ + ./configure \ + --host i386-elf-linux \ + --prefix="/" \ + --disable-xlib --disable-xcb --disable-pdf \ + --disable-ps --disable-svg --disable-script \ + --disable-ft --disable-fc --disable-pthread \ + --disable-glib --disable-gobject + +cairo_target := \ + $(MAKE_JOBS) \ + $(CROSS_TOOLS) \ + DESTDIR="$(INSTALL)" \ + install + +cairo_libraries := src/.libs/libcairo.so.2 + +cairo_depends := pixman $(musl_dep) diff --git a/modules/fbwhiptail b/modules/fbwhiptail new file mode 100644 index 00000000..dbf40dba --- /dev/null +++ b/modules/fbwhiptail @@ -0,0 +1,15 @@ +modules-$(CONFIG_FBWHIPTAIL) += fbwhiptail + +fbwhiptail_depends := cairo $(musl_dep) + +fbwhiptail_version := git +fbwhiptail_dir := fbwhiptail +fbwhiptail_repo := https://code.puri.sm/kakaroto/fbwhiptail.git + +fbwhiptail_target := \ + $(MAKE_JOBS) \ + $(CROSS_TOOLS) \ + fbwhiptail + +fbwhiptail_output := \ + fbwhiptail whiptail diff --git a/modules/libpng b/modules/libpng new file mode 100644 index 00000000..d6d9e650 --- /dev/null +++ b/modules/libpng @@ -0,0 +1,23 @@ +modules-$(CONFIG_CAIRO) += libpng + +libpng_version := 1.6.34 +libpng_dir := libpng-$(libpng_version) +libpng_tar := libpng-$(libpng_version).tar.gz +libpng_url := https://download.sourceforge.net/libpng/$(libpng_tar) +libpng_hash := 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7 + +libpng_configure := \ + $(CROSS_TOOLS) \ + ./configure \ + --host i386-elf-linux \ + --prefix="/" \ + +libpng_target := \ + $(MAKE_JOBS) \ + $(CROSS_TOOLS) \ + DESTDIR="$(INSTALL)" \ + install \ + +libpng_libraries := .libs/libpng16.so.16 + +libpng_depends := zlib $(musl_dep) diff --git a/modules/pixman b/modules/pixman new file mode 100644 index 00000000..65a2e200 --- /dev/null +++ b/modules/pixman @@ -0,0 +1,24 @@ +modules-$(CONFIG_CAIRO) += pixman + +pixman_version := 0.34.0 +pixman_dir := pixman-$(pixman_version) +pixman_tar := pixman-$(pixman_version).tar.gz +pixman_url := https://www.cairographics.org/releases/$(pixman_tar) +pixman_hash := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e + +pixman_configure := \ + $(CROSS_TOOLS) \ + ./configure \ + --host i386-elf-linux \ + --prefix="/" \ + --disable-gtk + +pixman_target := \ + $(MAKE_JOBS) \ + $(CROSS_TOOLS) \ + DESTDIR="$(INSTALL)" \ + install \ + +pixman_libraries := pixman/.libs/libpixman-1.so.0 + +pixman_depends := libpng $(musl_dep)