Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p5-imager: fix build with Xcode gcc #25455

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion perl/p5-imager/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ checksums rmd160 6f71b646918ec98be0d017df9463453b35231791 \

if {${perl5.major} != ""} {
depends_build-append \
port:pkgconfig
path:bin/pkg-config:pkgconfig

# imtiff.c: error: ‘for’ loop initial declaration used outside C99 mode
patchfiles-append patch-c99.diff
compiler.c_standard 1999

depends_lib-append \
port:freetype \
Expand Down
11 changes: 11 additions & 0 deletions perl/p5-imager/files/patch-c99.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- TIFF/Makefile.PL 2024-04-06 10:10:48.000000000 +0800
+++ TIFF/Makefile.PL 2024-08-25 11:14:57.000000000 +0800
@@ -18,7 +18,7 @@
my $define = "";
my $fp_rep = unpack("H*", pack("f", 1.25));
if ($fp_rep eq "0000a03f" || $fp_rep eq "3fa00000") {
- $define = "-DIEEEFP_TYPES";
+ $define = "-DIEEEFP_TYPES -std=c99";
}

my %opts =
Loading