Sat May 23 23:48:44 2009 UTC ()
For developer mode, warn about packages without destdir support.


(joerg)
diff -r1.293 -r1.294 pkgsrc/mk/bsd.prefs.mk

cvs diff -r1.293 -r1.294 pkgsrc/mk/bsd.prefs.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.prefs.mk 2009/05/19 09:33:53 1.293
+++ pkgsrc/mk/bsd.prefs.mk 2009/05/23 23:48:44 1.294
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.prefs.mk,v 1.293 2009/05/19 09:33:53 wiz Exp $ 1# $NetBSD: bsd.prefs.mk,v 1.294 2009/05/23 23:48:44 joerg Exp $
2# 2#
3# This file includes the mk.conf file, which contains the user settings. 3# This file includes the mk.conf file, which contains the user settings.
4# 4#
5# Packages should include this file before any of the .if directives, as 5# Packages should include this file before any of the .if directives, as
6# well as before modifying variables like CFLAGS, LDFLAGS, and so on. 6# well as before modifying variables like CFLAGS, LDFLAGS, and so on.
7# Otherwise the behavior may be unexpected. 7# Otherwise the behavior may be unexpected.
8# 8#
9# When mk.conf is included by this file, the following variables are 9# When mk.conf is included by this file, the following variables are
10# defined: 10# defined:
11# 11#
12# ACCEPTABLE_LICENSES 12# ACCEPTABLE_LICENSES
13# This variable is set to the list of Open Source licenses. See 13# This variable is set to the list of Open Source licenses. See
14# mk/license.mk for details. 14# mk/license.mk for details.
@@ -389,26 +389,30 @@ USE_DESTDIR:= yes @@ -389,26 +389,30 @@ USE_DESTDIR:= yes
389.if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) 389.if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss])
390. if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo]) 390. if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo])
391PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''" 391PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''"
392. endif 392. endif
393_USE_DESTDIR= no 393_USE_DESTDIR= no
394.elif ${PKG_DESTDIR_SUPPORT} == "user-destdir" 394.elif ${PKG_DESTDIR_SUPPORT} == "user-destdir"
395_USE_DESTDIR= user-destdir 395_USE_DESTDIR= user-destdir
396.elif ${PKG_DESTDIR_SUPPORT} == "destdir" 396.elif ${PKG_DESTDIR_SUPPORT} == "destdir"
397_USE_DESTDIR= destdir 397_USE_DESTDIR= destdir
398.else 398.else
399PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''." 399PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''."
400.endif 400.endif
401 401
 402.if defined(PKG_DEVELOPER) && empty(PKG_DESTDIR_SUPPORT)
 403WARNINGS+= "[bsd.prefs.mk] The package ${PKGNAME} misses DESTDIR support."
 404.endif
 405
402# When using staged installation, everything gets installed into 406# When using staged installation, everything gets installed into
403# ${DESTDIR}${PREFIX} instead of ${PREFIX} directly. 407# ${DESTDIR}${PREFIX} instead of ${PREFIX} directly.
404# 408#
405.if ${_USE_DESTDIR} != "no" 409.if ${_USE_DESTDIR} != "no"
406DESTDIR= ${WRKDIR}/.destdir 410DESTDIR= ${WRKDIR}/.destdir
407. if ${_USE_DESTDIR} == "destdir" 411. if ${_USE_DESTDIR} == "destdir"
408_MAKE_PACKAGE_AS_ROOT= yes 412_MAKE_PACKAGE_AS_ROOT= yes
409_MAKE_CLEAN_AS_ROOT= yes 413_MAKE_CLEAN_AS_ROOT= yes
410_MAKE_INSTALL_AS_ROOT= yes 414_MAKE_INSTALL_AS_ROOT= yes
411. elif ${_USE_DESTDIR} == "user-destdir" 415. elif ${_USE_DESTDIR} == "user-destdir"
412_MAKE_PACKAGE_AS_ROOT= no 416_MAKE_PACKAGE_AS_ROOT= no
413_MAKE_CLEAN_AS_ROOT= no 417_MAKE_CLEAN_AS_ROOT= no
414_MAKE_INSTALL_AS_ROOT= no 418_MAKE_INSTALL_AS_ROOT= no