Link using the "-search_paths_first" option under Mac OS X to make

sure that the linker uses our static "libarchive.a" instead of
the outdated dynamic library "/usr/lib/libarchive.dylib".
This commit is contained in:
tron 2010-04-15 22:25:11 +00:00
parent cf35b02555
commit 25f25e824c

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.177 2010/04/14 18:24:58 joerg Exp $
# $NetBSD: Makefile,v 1.178 2010/04/15 22:25:11 tron Exp $
# Notes to package maintainers:
#
@ -124,6 +124,12 @@ LDFLAGS+= -L${WRKDIR}/libarchive/.libs
CONFIG_GUESS_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.guess
CONFIG_SUB_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.sub
. if ${OPSYS} == "Darwin"
# Make sure that the linker used our static library instead of the
# (outdated) dynamic library "/usr/lib/libarchive.dylib".
LDFLAGS+= -Wl,-search_paths_first
. endif
# Hack to make sure that the libarchive version is replaced
pre-configure: config-guess-override config-sub-override
.endif