diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-27 09:22:58 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-27 09:22:58 +0000 |
commit | 84cb9a37e990b3ecf2ba972569e5ea5452219f63 (patch) | |
tree | ab23a40fa63327e998107315ef50b72d2aa50d51 /mk/buildlink2 | |
parent | b1cedbc5e22f8bfe2c4d1e545396da5e8d2f2680 (diff) | |
download | pkgsrc-84cb9a37e990b3ecf2ba972569e5ea5452219f63.tar.gz |
Create a new variable USE_X11_LINKS that controls whether packages that
use buildlink2 and set USE_X11 will use x11-links, or if they will simply
symlink the X11 files directly into ${BUILDLINK_DIR}. If USE_X11_LINKS is
"YES" (the default), then x11-links is used. If USE_X11_LINKS is "NO",
then the X11 files are symlinked directly.
There is a choice here between speed and flexibility. Using x11-links is
faster since you don't need to spend time symlinking all of the X11 files
into ${BUILDLINK_DIR}. However, if you update your X11 installation, then
the x11-links package will likely be out-of-date. Conversely, directly
symlinking the X11 files will protect you from changes in your X11
installation when you update, but there is a (small) time penalty to have
to do it for every package that uses X11.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index 37a1b7d6215..8bb76ac28b3 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.32 2002/09/27 00:22:06 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.33 2002/09/27 09:22:59 jlam Exp $ # # An example package buildlink2.mk file: # @@ -47,10 +47,14 @@ _BLNK_OPSYS= ${OPSYS} CONFIGURE_ENV+= BUILDLINK_UPDATE_CACHE=no .if defined(USE_X11) || defined(USE_X11BASE) || defined(USE_IMAKE) -. if !defined(_FOR_X11_LINKS_ONLY) +USE_X11_LINKS?= YES +. if !empty(USE_X11_LINKS:M[nN][oO]) +. include "../../mk/x11.buildlink2.mk" +BUILDLINK_X11_DIR= ${BUILDLINK_X11PKG_DIR} +. else BUILD_DEPENDS+= x11-links>=0.8:../../pkgtools/x11-links -. endif BUILDLINK_X11_DIR= ${LOCALBASE}/share/x11-links +. endif CONFIGURE_ENV+= BUILDLINK_X11_DIR="${BUILDLINK_X11_DIR}" MAKE_ENV+= BUILDLINK_X11_DIR="${BUILDLINK_X11_DIR}" _BLNK_CPPFLAGS+= -I${X11BASE}/include @@ -216,8 +220,13 @@ _BLNK_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR} _BLNK_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR} _BLNK_TRANSFORM+= ${BUILDLINK_TRANSFORM} .if defined(USE_X11) || defined(USE_X11BASE) || defined(USE_IMAKE) +. if !empty(USE_X11_LINKS:M[nN][oO]) +_BLNK_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11PKG_DIR} +_BLNK_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11PKG_DIR} +. else _BLNK_TRANSFORM+= II:${X11BASE}:${BUILDLINK_X11PKG_DIR},${BUILDLINK_X11_DIR} _BLNK_TRANSFORM+= LL:${X11BASE}:${BUILDLINK_X11PKG_DIR},${BUILDLINK_X11_DIR} +. endif .endif .for _localbase_ in /usr/pkg /usr/local . if ${LOCALBASE} != ${_localbase_} |