Quote CPPFLAGS in webapp Makefile, add corresponding optipng fix for PPC (#26076)

The optipng issue that the CPPFLAGS fix here was working around may have
already been fixed in downstream packaging by overriding CPPFLAGS, so it
should be appended to rather than replaced, this also respects any
existing CPPFLAGS the user has configured.

Also, an identical issue exists on PPC with its corresponding SIMD
extensions (VSX), so add the same workaround there in the upstream
Makefile.

Co-authored-by: matoro <matoro@users.noreply.github.com>
This commit is contained in:
matoro 2024-01-30 12:07:36 -05:00 committed by GitHub
parent 60df49652e
commit bcd6699469
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,12 @@ CI ?= false
# please see optipng-bin Linux arm64 support issue (https://github.com/imagemin/optipng-bin/issues/118) for details:
ifeq ($(shell uname)/$(shell uname -m),Linux/aarch64)
LINUX_ARM64 = true
CPPFLAGS = "-DPNG_ARM_NEON_OPT=0"
CPPFLAGS += " -DPNG_ARM_NEON_OPT=0"
endif
# Exact same issue but for Linux/PPC64
ifeq ($(findstring Linux/ppc64,$(shell uname)/$(shell uname -m)),Linux/ppc64)
LINUX_PPC64 = true
CPPFLAGS += " -DPNG_POWERPC_VSX_OPT=0"
endif
.PHONY: run
@ -68,7 +73,7 @@ node_modules: package.json $(wildcard package-lock.json)
@echo Getting dependencies using npm
ifeq ($(CI),false)
CPPFLAGS=$(CPPFLAGS) npm install
CPPFLAGS="$(CPPFLAGS)" npm install
else
# This runs in CI with NODE_ENV=production which skips devDependencies without this flag
npm ci --include=dev