Skip to content

Commit

Permalink
qrscan: fix build with Xcode gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 15, 2024
1 parent e680931 commit 01e8680
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions graphics/qrscan/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphics/qrscan/files/patch-Makefile.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01e8680

Please sign in to comment.