diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-02 11:49:40 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-02 11:49:40 +0000 |
commit | 96c46a04016a33cda83b17035caa56362c53b764 (patch) | |
tree | 4bdb8a7669bf55ed7e55b841c4d715a065cd0d3a /mk | |
parent | 5dd959ec8d932e9aa7256af1df81c8157dec8c41 (diff) | |
download | pkgsrc-96c46a04016a33cda83b17035caa56362c53b764.tar.gz |
sysutils/qlogtools: skip nonexistent error.h when fixing errno
Some packages using mk/djbware.mk do not have error.h but need to fix the
errno declaration in other files. Up to now, there was no good way of
achieving exactly this.
Building packages like these in a SUBST_NOOP_OK=no build makes these
packages fail. To fix these packages, the configuration of the files
needed to be a bit more flexible.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/djbware.mk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/djbware.mk b/mk/djbware.mk index c9bd6a56d65..4138a6eff08 100644 --- a/mk/djbware.mk +++ b/mk/djbware.mk @@ -1,4 +1,4 @@ -# $NetBSD: djbware.mk,v 1.28 2020/05/02 11:43:09 rillig Exp $ +# $NetBSD: djbware.mk,v 1.29 2020/05/02 11:49:40 rillig Exp $ # # Makefile fragment for packages with djb-style build machinery # @@ -83,11 +83,11 @@ do-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} package/compile ${DJB_BUILD_ARGS} .endif -.if !empty(DJB_ERRNO_HACK:M[yY][eE][sS]) +.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" +. include "bsd.fast.prefs.mk" . if exists(${PKGDIR}/options.mk) . include "${PKGDIR}/options.mk" @@ -98,10 +98,10 @@ PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//} . include "bsd.options.mk" . endif -. if !empty(PKG_OPTIONS:Mdjbware-errno-hack) +. if !empty(PKG_OPTIONS:Mdjbware-errno-hack) || !empty(DJB_ERRNO_HACK_FILES) SUBST_CLASSES+= djbware SUBST_STAGE.djbware= do-configure -SUBST_FILES.djbware+= error.h +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 |