pkgsrc/pkgtools/x11-links/Makefile
jlam 84cb9a37e9 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.
2002-09-27 09:22:58 +00:00

45 lines
1.4 KiB
Makefile

# $NetBSD: Makefile,v 1.18 2002/09/27 09:22:59 jlam Exp $
#
# NOTE: If you update this package, then you'll likely need to also update
# the x11-links dependency in mk/x11.buildlink.mk and in
# mk/buildlink2/bsd.buidlink2.mk to the correct version, usually the
# most recent.
DISTNAME= x11-links-0.8
CATEGORIES= pkgtools x11
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= jlam@netbsd.org
HOMEPAGE= ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/Packages.txt
COMMENT= shadow tree of links to X11R6 headers and libraries
USE_BUILDLINK2= # defined
EXTRACT_ONLY= # empty
NO_CHECKSUM= # defined
WRKSRC= ${WRKDIR}
NO_BUILD= # defined
NO_MTREE= # defined
USE_X11= # defined
USE_X11_LINKS= no
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
BUILDLINK_X11_SUBDIR= share/x11-links
.include "../../mk/bsd.prefs.mk"
.if !exists(${X11BASE}/include/X11/X.h)
IGNORE= "x11-links requires X headers to be installed"
.endif
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/${BUILDLINK_X11_SUBDIR}
cd ${BUILDLINK_DIR} && \
${PAX} -rw include lib ${PREFIX}/${BUILDLINK_X11_SUBDIR}
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/${BUILDLINK_X11_SUBDIR}
${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC}
cd ${PREFIX}; ${FIND} ${BUILDLINK_X11_SUBDIR} \! -type d -print \
| ${SED} "s|^\./||g" | ${SORT} -u >> ${PLIST_SRC}
${ECHO} "@unexec ${RM} -rf %D/${BUILDLINK_X11_SUBDIR}" >> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"