[MacPorts] #37420: ncurses: snow leopard binary missing pkgconfig files
MacPorts
noreply at macports.org
Fri Dec 28 01:04:04 PST 2012
#37420: ncurses: snow leopard binary missing pkgconfig files
---------------------------+-------------------
Reporter: ryandesign@… | Owner: jmr@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.2
Resolution: | Keywords:
Port: ncurses |
---------------------------+-------------------
Comment (by ryandesign@…):
ncurses' configure.in says:
{{{
# if we find pkg-config, check if we should install the ".pc" files.
CF_PKG_CONFIG
if test "$PKG_CONFIG" != no ; then
AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
# Leave this as something that can be overridden in the
environment.
if test -z "$PKG_CONFIG_LIBDIR" ; then
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e
's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
fi
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e
's/:.*//'`
if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ;
then
AC_ARG_ENABLE(pc-files,
[ --enable-pc-files generate and install
.pc files for pkg-config],
[enable_pc_files=$enableval],
[enable_pc_files=no])
AC_MSG_RESULT($enable_pc_files)
else
AC_MSG_RESULT(no)
AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
enable_pc_files=no
fi
fi
AC_SUBST(PKG_CONFIG_LIBDIR)
}}}
Based on the comment, it appears the intention is to not install the .pc
files unless the pkg-config program is present. And ncurses doesn't
declare a dependency on pkgconfig.
In fact, the check for `"$PKG_CONFIG" != no` is not the problem, because
when pkgconfig is not installed, $PKG_CONFIG appears to be "none", not
"no".
However next it checks for the existence of ${prefix}/lib/pkgconfig. And
that won't exist if there aren't any .pc files installed by other ports.
And the buildbot builds ports in a clean environment so there wouldn't be
any other ports installed.
I imagine the reason why most of the existing binary packages have the .pc
files is because the buildbot built ncurses not explicitly but as a
dependency of some other port which had other dependencies which did
install .pc files. I think if the version or revision of ncurses were
increased today, then all newly built ncurses packages would be missing
the .pc files.
I think the solution is 1) to have the pkgconfig port always install
${prefix}/lib/pkgconfig (using `destroot.keepdirs`), and 2) to have the
ncurses port declare a build dependency on the pkgconfig port.
--
Ticket URL: <https://trac.macports.org/ticket/37420#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list