Skip to content

Commit

Permalink
devel/libssh: don't zero out configure.cppflags, use -isystem.
Browse files Browse the repository at this point in the history
Zeroing configure.cppflags leads to build failures on older systems (at
least 10.4.)

Keep the directory in the list, but forcefully move it to the end
without beating the build system into submission.

Fixes: https://trac.macports.org/ticket/53549
  • Loading branch information
Ionic committed Feb 11, 2017
1 parent e6a4196 commit daeceb0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions devel/libssh/Portfile
Expand Up @@ -41,10 +41,12 @@ post-extract {

cmake.out_of_source yes

# clear configure.cppflags to prevent the cmake portgroup from adding them to
# cflags, which breaks the build in presence of an older version, because it
# puts -I$prefix/include before the local include directories of the port
configure.cppflags
# -isystem has the added benefit of moving the include
# directory specified to the end of the include path list.
# This will help the build system respect custom include
# paths correctly (i.e., searching them before the MP include
# directory.)
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include
configure.args-append \
-DWITH_GCRYPT=OFF \
-DWITH_INTERNAL_DOC=OFF \
Expand Down

0 comments on commit daeceb0

Please sign in to comment.