[MacPorts] #32287: curl: destroot merge failure of curl-config with +universal and +ssl variants when cross-compiling (was: curl: curl-config differs and cannot be merged)
MacPorts
noreply at macports.org
Tue Jun 2 01:48:42 PDT 2015
#32287: curl: destroot merge failure of curl-config with +universal and +ssl
variants when cross-compiling
--------------------------+--------------------------
Reporter: ju.freaks@… | Owner: ryandesign@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.0.3
Resolution: fixed | Keywords:
Port: curl |
--------------------------+--------------------------
Changes (by ryandesign@…):
* cc: keybounce@…, erik.welander@… (added)
* status: new => closed
* resolution: => fixed
Comment:
I'll assume the difference is the one I observe myself while trying to
build a 3-way universal on a 32-bit Intel iMac running 10.6: the MacPorts
library path and SSL flags are repeated in the copy of curl-config built
for the native architecture but not in the copies built for cross-compiled
architectures. This was also mentioned as a secondary issue in
comment:ticket:24001:14 and comment:ticket:24059:11 but I'll handle it in
this ticket so that the issue has a ticket all its own.
The curl configure script is a bit peculiar, and actually contains code
that deliberately only runs `pkg-config` when `--with-ssl` is used without
a path (which is what we were doing in MacPorts):
{{{
case "$OPT_SSL" in
yes)
dnl --with-ssl (without path) used
if test x$cross_compiling != xyes; then
dnl only do pkg-config magic when not cross-compiling
PKGTEST="yes"
fi
PREFIX_OPENSSL=/usr/local/ssl
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
;;
off)
dnl no --with-ssl option given, just check default places
if test x$cross_compiling != xyes; then
dnl only do pkg-config magic when not cross-compiling
PKGTEST="yes"
fi
PREFIX_OPENSSL=
;;
*)
dnl check the given --with-ssl spot
PKGTEST="no"
PREFIX_OPENSSL=$OPT_SSL
dnl Try pkg-config even when cross-compiling. Since we
dnl specify PKG_CONFIG_LIBDIR we're only looking where
dnl the user told us to look
OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
PKGTEST="yes"
fi
dnl in case pkg-config comes up empty, use what we got
dnl via --with-ssl
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
if test "$PREFIX_OPENSSL" != "/usr" ; then
SSL_LDFLAGS="-L$LIB_OPENSSL"
SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
fi
SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
;;
esac
}}}
The simple fix is to supply the path, by specifying `--with-
ssl=${prefix}`. Done in r136999.
It is possible that the code for other variants also needs similar
changes, though a quick search through configure.ac didn't reveal any
others with this particular code.
--
Ticket URL: <https://trac.macports.org/ticket/32287#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list