Date: Thu, 10 Feb 2005 01:13:02 -0500 From: Chuck Swiger <cswiger@mac.com> To: Paul Schmehl <pauls@utdallas.edu> Cc: freebsd-ports@freebsd.org Subject: Re: LIB_DEPENDS Message-ID: <420AFB6E.9020604@mac.com> In-Reply-To: <A418530B97D43AB0D918055A@utd49554.utdallas.edu> References: <A418530B97D43AB0D918055A@utd49554.utdallas.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Paul Schmehl wrote: > I need to include tcl as a dependency in a new port I'm working on. I'd > like to not install tcl83 if the host already has something higher than > tcl83, but require tcl83 as the minimum version. > > How do I do that? Is it possible? Here is a simple Makefile snippet: # Use lang/tcl83 by default... WITH_TCL_VER?= 83 LIB_DEPENDS+= tcl${WITH_TCL_VER}:${PORTSDIR}/lang/tcl${WITH_TCL_VER} ...a more complicated version might be something like: # Use TCL 83 by default, but look for and use other versions if present. .if exists(${LOCALBASE}/lib/libtcl80.a) WITH_TCL_VER= 80 .elif exists(${LOCALBASE}/lib/libtcl81.a) WITH_TCL_VER= 81 .elif exists(${LOCALBASE}/lib/libtcl82.a) WITH_TCL_VER= 82 .elif exists(${LOCALBASE}/lib/libtcl83.a) WITH_TCL_VER= 83 .elif exists(${LOCALBASE}/lib/libtcl84.a) WITH_TCL_VER= 84 .else WITH_TCL_VER= 83 .endif .if ${WITH_TCL_VER} == 80 LIB_DEPENDS+= tcl80:${PORTSDIR}/lang/tcl80 .elif ${WITH_TCL_VER} == 81 LIB_DEPENDS+= tcl81:${PORTSDIR}/lang/tcl81 .elif ${WITH_TCL_VER} == 82 LIB_DEPENDS+= tcl82:${PORTSDIR}/lang/tcl82 .elif ${WITH_TCL_VER} == 83 LIB_DEPENDS+= tcl83:${PORTSDIR}/lang/tcl83 .elif ${WITH_TCL_VER} == 84 LIB_DEPENDS+= tcl84:${PORTSDIR}/lang/tcl84 .else .error WITH_TCL_VER must be one of 80, 81, 82, 83, or 84 .endif [ Untested. Add salt and season to taste. ] -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?420AFB6E.9020604>