summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2020-06-25 05:42:36 +0000
committerschmonz <schmonz@pkgsrc.org>2020-06-25 05:42:36 +0000
commitf2b56adfba2ac26925e09f76035f8e38af019ada (patch)
tree11bf1c3589d5474f86ebe27dc329ecd1c595772a /mk
parent83c251d332412d735c604d51660e5b1397e4afe2 (diff)
downloadpkgsrc-f2b56adfba2ac26925e09f76035f8e38af019ada.tar.gz
Retire 'djbware-errno-hack' and associated options.mk cleverness.
Instead: 1. Package makefiles including their own options.mk 2. Packages say "SUBST_CLASSES+=djberrno" to get the hack, if needed 3. Packages adjust SUBST_FILES.djberrno, if needed Should fix bulk build failures due to multiple inclusions of options.mk and/or incorrect definitions of DJB_ERRNO_HACK. Approved during the freeze by wiz@.
Diffstat (limited to 'mk')
-rw-r--r--mk/defaults/options.description1
-rw-r--r--mk/djbware.mk33
2 files changed, 6 insertions, 28 deletions
diff --git a/mk/defaults/options.description b/mk/defaults/options.description
index b6499ba3101..8b20153d3c6 100644
--- a/mk/defaults/options.description
+++ b/mk/defaults/options.description
@@ -140,7 +140,6 @@ djbdns-tinydns64 Patch to fix tinydns-data on 64-bit platforms.
djbfft-pentium Optimize for Pentium{,MMX} processors.
djbfft-ppro Optimize for Pentium{Pro,II,III} processors.
djbfft-sparc Optimize for UltraSPARC-{I,II} processors.
-djbware-errno-hack Patch to #include <errno.h> for correctness.
djvu Enable DjVuLibRe support.
dkim-milter-arlib ar(3) support for dkim-milter.
dkim-stats dkim-stats(8) support for dkim-milter.
diff --git a/mk/djbware.mk b/mk/djbware.mk
index 4138a6eff08..6b82eefb44c 100644
--- a/mk/djbware.mk
+++ b/mk/djbware.mk
@@ -1,4 +1,4 @@
-# $NetBSD: djbware.mk,v 1.29 2020/05/02 11:49:40 rillig Exp $
+# $NetBSD: djbware.mk,v 1.30 2020/06/25 05:42:36 schmonz Exp $
#
# Makefile fragment for packages with djb-style build machinery
#
@@ -29,7 +29,6 @@ DJB_RESTRICTED?= YES
DJB_MAKE_TARGETS?= YES
DJB_BUILD_TARGETS?= # empty
DJB_INSTALL_TARGETS?= # empty
-DJB_ERRNO_HACK?= YES
DJB_SLASHPACKAGE?= NO
.if !empty(DJB_SLASHPACKAGE:M[yY][eE][sS])
DJB_CONFIG_DIR?= ${WRKSRC}/src
@@ -83,30 +82,10 @@ do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} package/compile ${DJB_BUILD_ARGS}
.endif
-.if !empty(DJB_ERRNO_HACK:M[yY][eE][sS]) || !empty(DJB_ERRNO_HACK_FILES)
-PKG_SUPPORTED_OPTIONS+= djbware-errno-hack
-PKG_SUGGESTED_OPTIONS+= djbware-errno-hack
-
-. include "bsd.fast.prefs.mk"
-
-. if exists(${PKGDIR}/options.mk)
-. include "${PKGDIR}/options.mk"
-. else
-# Note: This expression is the same as ${PKGBASE}, but the latter is
-# not defined yet, so we cannot use it here.
-PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
-. include "bsd.options.mk"
-. endif
-
-. if !empty(PKG_OPTIONS:Mdjbware-errno-hack) || !empty(DJB_ERRNO_HACK_FILES)
-SUBST_CLASSES+= djbware
-SUBST_STAGE.djbware= do-configure
-SUBST_FILES.djbware+= ${DJB_ERRNO_HACK_FILES:Uerror.h}
-SUBST_SED.djbware= -e 's|^extern\ int\ errno\;|\#include \<errno.h\>|'
-SUBST_MESSAGE.djbware= Correcting definition of errno.
-. endif
-.else
-. sinclude "${PKGDIR}/options.mk"
-.endif
+# Set SUBST_CLASSES+=djberrno for packages that need this fix
+SUBST_STAGE.djberrno= do-configure
+SUBST_FILES.djberrno?= error.h
+SUBST_SED.djberrno= -e 's|^extern\ int\ errno\;|\#include \<errno.h\>|'
+SUBST_MESSAGE.djberrno= Correcting definition of errno.
.endif # DJBWARE_MK