From 4c386058108d41db9b78ede9c1d29c01df9542ae Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Thu, 15 Aug 2024 23:16:37 +0800 Subject: [PATCH] qrscan: fix build with Xcode gcc --- graphics/qrscan/Portfile | 3 +++ graphics/qrscan/files/patch-Makefile.diff | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/graphics/qrscan/Portfile b/graphics/qrscan/Portfile index 3da5289be12..163f01094c1 100644 --- a/graphics/qrscan/Portfile +++ b/graphics/qrscan/Portfile @@ -28,6 +28,9 @@ depends_lib-append path:lib/pkgconfig/libjpeg.pc:libjpeg-turbo \ port:libpng \ port:libquirc +# options.c: error: ‘for’ loop initial declaration used outside C99 mode +compiler.c_standard 1999 + use_parallel_build no patchfiles-append patch-Makefile.diff diff --git a/graphics/qrscan/files/patch-Makefile.diff b/graphics/qrscan/files/patch-Makefile.diff index 6ce13bb83b9..018f20a8148 100644 --- a/graphics/qrscan/files/patch-Makefile.diff +++ b/graphics/qrscan/files/patch-Makefile.diff @@ -20,7 +20,7 @@ Patch Makefile to use existing installation of libquirc -CFLAGS += -I$(QUIRC) $(shell $(PKG_CONFIG) --cflags --static libpng libjpeg) -LDFLAGS += -lz -lm -+CFLAGS += $(shell $(PKG_CONFIG) --cflags --static libpng libjpeg) ++CFLAGS += -std=c99 $(shell $(PKG_CONFIG) --cflags --static libpng libjpeg) +LDFLAGS += -lz -lm -lquirc ifeq ($(shell uname -s),Darwin) GROUP = staff