Index: Mk/Uses/localbase.mk =================================================================== --- Mk/Uses/localbase.mk (revision 422711) +++ Mk/Uses/localbase.mk (working copy) @@ -3,18 +3,27 @@ # handle enforcing localbase in path # # Feature: localbase -# Usage: USES=localbase -# Valid ARGS: none +# Usage: USES=localbase or USES=localbase:args +# Valid ARGS: ldflags Set LDFLAGS instead of LIBS # # MAINTAINER: portmgr@FreeBSD.org .if !defined(_INCLUDE_USES_LOCALBASE_MK) _INCLUDE_USES_LOCALBASE_MK= yes +_USES_POST+= localbase +.endif + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LOCALBASE_POST_MK) +_INCLUDE_USES_LOCALBASE_POST_MK=yes CPPFLAGS+= -isystem ${LOCALBASE}/include CFLAGS+= -isystem ${LOCALBASE}/include CXXFLAGS+= -isystem ${LOCALBASE}/include +.if ${localbase_ARGS:Mldflags} LDFLAGS+= -L${LOCALBASE}/lib +.else +LIBS+= -L${LOCALBASE}/lib +.endif # Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs # this, and CMAKE_ARGS is not used when bootstrapping CMake. Index: Mk/Uses/libarchive.mk =================================================================== --- Mk/Uses/libarchive.mk (revision 422711) +++ Mk/Uses/libarchive.mk (working copy) @@ -10,7 +10,7 @@ .if !defined(_INCLUDE_USES_LIBARCHIVE_MK) _INCLUDE_USES_LIBARCHIVE_MK= yes -.include "${USESDIR}/localbase.mk" +_USES_POST+= localbase LIB_DEPENDS+= libarchive.so.13:archivers/libarchive .endif Index: Mk/Uses/libedit.mk =================================================================== --- Mk/Uses/libedit.mk (revision 422711) +++ Mk/Uses/libedit.mk (working copy) @@ -10,7 +10,7 @@ .if !defined(_INCLUDE_USES_LIBEDIT_MK) _INCLUDE_USES_LIBEDIT_MK= yes -.include "${USESDIR}/localbase.mk" +_USES_POST+= localbase LIB_DEPENDS+= libedit.so.0:devel/libedit .endif Index: databases/firebird25-server/Makefile =================================================================== --- databases/firebird25-server/Makefile (revision 422711) +++ databases/firebird25-server/Makefile (working copy) @@ -90,8 +90,7 @@ UDF_SQL= src/extlib/ib_udf2.sql src/extl PKGINSTALL?= ${PKGDIR}/pkg-install-server .else # Client part stuff -USES+= libedit -LDFLAGS+= -L${LOCALBASE}/lib # to link in lncurses pulled in by libedit +USES+= libedit CONFIGURE_ARGS+= --with-system-editline CONFIGURE_ENV+= ac_cv_lib_edit_readline="yes"