[MacPorts] #55577: getting rid of unforeseen -I${prefix}/include option adding and its potential side-effects

MacPorts noreply at macports.org
Thu Jan 25 14:48:18 UTC 2018


#55577: getting rid of unforeseen -I${prefix}/include option adding and its
potential side-effects
--------------------------+-----------------
  Reporter:  RJVB         |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  pcre, glib2  |
--------------------------+-----------------

Comment (by RJVB):

 Turns out `port:git` is among the not-so-well-behaved ports that fail to
 use pkg-config because they skip the entire configure step. Git itself
 isn't very nicely behaved because it assumes that you only need to specify
 the pcre lib location.

 This fixes the port for any future change in port:pcre:

 {{{
 if {[variant_isset pcre] && ${prefix} ne ""} {
     depends_build-append \
                     port:pkgconfig
     # fetch the flags required for building with the local pcre2 install
     set CFLAGS      "${CFLAGS} [exec ${prefix}/bin/pkg-config --cflags
 libpcre2-8]"
 }
 }}}

 (checking $prefix against "" is for portindex but probably redundant, I
 just make it a habit nowadays.)

--
Ticket URL: <https://trac.macports.org/ticket/55577#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list