Skip to content
Permalink
Browse files

p5-text-bibtex: blacklist compilers that don't support C99

Build fix for 10.6 and earlier.
  • Loading branch information
dbevans committed Apr 2, 2019
1 parent 87f2903 commit 6588a7e1b5221ed23c57a94f3efe19880e5acb18
Showing with 5 additions and 0 deletions.
  1. +5 −0 perl/p5-text-bibtex/Portfile
@@ -1,6 +1,7 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup perl5 1.0

perl5.branches 5.26 5.28
@@ -28,6 +29,10 @@ if {${perl5.major} != ""} {
depends_lib-append \
port:p${perl5.major}-unicode-normalize

# blacklist compilers that don't support C99
# btparse/tests/namebug.c:193: error: ‘for’ loop initial declaration used outside C99 mode
compiler.blacklist *gcc-3.* *gcc-4.* {clang < 300}

perl5.use_module_build

# in inc/MyBuilder.pm, copy_if_modified is called on binaries and libraries

3 comments on commit 6588a7e

@ryandesign

This comment has been minimized.

Copy link
Contributor

@ryandesign ryandesign replied Apr 2, 2019

GCC 4 does support C99, though it defaults to C89; if upstream requires C99, they should specify -std=c99 in CFLAGS.

@jmroot

This comment has been minimized.

Copy link
Member

@jmroot jmroot replied Apr 3, 2019

That particular part of C99 has been supported since gcc 3.0. See https://gcc.gnu.org/c99status.html

Also I'm pretty sure every version of clang Apple has ever shipped had almost complete C99 support.

@dbevans

This comment has been minimized.

Copy link
Contributor Author

@dbevans dbevans replied Apr 3, 2019

That particular part of C99 has been supported since gcc 3.0. See https://gcc.gnu.org/c99status.html

Also I'm pretty sure every version of clang Apple has ever shipped had almost complete C99 support.

Ryan's statement is correct. However, it's a bit tricky with perl modules since they ignore CFLAGS and use instead CCFLAGS that's obtained from the perl's Config (i.e. the effective CFLAGS used to build perl itself.) I'll see if I can fix this (properly this time) and file a PR with the module's author.

Thanks to both for keeping me honest.

Please sign in to comment.
You can’t perform that action at this time.