From 07fa8b95368bc58102a98733baed9574592081b8 Mon Sep 17 00:00:00 2001 From: schmonz Date: Fri, 19 Aug 2005 04:44:09 +0000 Subject: Convert DJB_ERRNO_HACK to a "djbware-errno-hack" option available in all packages using djbware.mk. For now, keep the same default, avoiding PKGREVISION bumps. --- mk/defaults/options.description | 1 + mk/djbware.mk | 32 +++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'mk') diff --git a/mk/defaults/options.description b/mk/defaults/options.description index 0884ec54300..4b94f6b8c48 100644 --- a/mk/defaults/options.description +++ b/mk/defaults/options.description @@ -52,6 +52,7 @@ debug deliver-suid Install deliver executable setuid root. djbdns-ignoreip2 Patch to treat certain responses as NXDOMAIN. djbdns-tinydns64 Patch to fix tinydns-data on 64-bit platforms. +djbware-errno-hack Patch to #include for correctness. domainscale drac Enable DRAC support. dummy diff --git a/mk/djbware.mk b/mk/djbware.mk index da9d13515a5..91219a9fabf 100644 --- a/mk/djbware.mk +++ b/mk/djbware.mk @@ -1,4 +1,4 @@ -# $NetBSD: djbware.mk,v 1.6 2005/08/15 19:44:13 schmonz Exp $ +# $NetBSD: djbware.mk,v 1.7 2005/08/19 04:44:09 schmonz Exp $ # # Makefile fragment for packages with djb-style build machinery # @@ -35,8 +35,6 @@ DJB_CONFIG_HOME?= conf-home DJB_CONFIG_CMDS?= ${DO_NADA} BGWARE_INSTALLER?= NO -BUILD_DEFS+= DJB_ERRNO_HACK - .if !empty(DJB_RESTRICTED:M[yY][eE][sS]) RESTRICTED= "modified source and binaries may not be distributed" NO_BIN_ON_CDROM= ${RESTRICTED} @@ -46,14 +44,6 @@ NO_BIN_ON_FTP= ${RESTRICTED} BUILD_TARGET?= it ${DJB_BUILD_TARGETS} INSTALL_TARGET?= setup check ${DJB_INSTALL_TARGETS} -.if !empty(DJB_ERRNO_HACK:M[yY][eE][sS]) -SUBST_CLASSES+= djbware -SUBST_STAGE.djbware= do-configure -SUBST_FILES.djbware= error.h -SUBST_SED.djbware= -e 's|^extern\ int\ errno\;|\#include \|' -SUBST_MESSAGE.djbware= "Correcting definition of errno." -.endif - .if !target(do-configure) do-configure: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \ @@ -86,4 +76,24 @@ do-install: . endif .endif +PKG_SUPPORTED_OPTIONS+= djbware-errno-hack +PKG_OPTIONS_LEGACY_VARS+= DJB_ERRNO_HACK:djbware-errno-hack + +.include "../../mk/bsd.prefs.mk" + +.if exists(${PKGDIR}/options.mk) +. include "${PKGDIR}/options.mk" +.else +PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGBASE} +.include "../../mk/bsd.options.mk" +.endif + +.if !empty(PKG_OPTIONS:Mdjbware-errno-hack) +SUBST_CLASSES+= djbware +SUBST_STAGE.djbware= do-configure +SUBST_FILES.djbware= error.h +SUBST_SED.djbware= -e 's|^extern\ int\ errno\;|\#include \|' +SUBST_MESSAGE.djbware= "Correcting definition of errno." +.endif + .endif # DJBWARE_MK -- cgit v1.2.3