Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc sysutils/qlogtools: skip nonexistent error.h when fixi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60ef31ad3ce6
branches:  trunk
changeset: 430610:60ef31ad3ce6
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat May 02 11:49:40 2020 +0000

description:
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:

 mk/djbware.mk               |  10 +++++-----
 sysutils/qlogtools/Makefile |   5 ++---
 2 files changed, 7 insertions(+), 8 deletions(-)

diffs (55 lines):

diff -r 48274e37f02b -r 60ef31ad3ce6 mk/djbware.mk
--- a/mk/djbware.mk     Sat May 02 11:48:13 2020 +0000
+++ b/mk/djbware.mk     Sat May 02 11:49:40 2020 +0000
@@ -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 @@
        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 @@
 .    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
diff -r 48274e37f02b -r 60ef31ad3ce6 sysutils/qlogtools/Makefile
--- a/sysutils/qlogtools/Makefile       Sat May 02 11:48:13 2020 +0000
+++ b/sysutils/qlogtools/Makefile       Sat May 02 11:49:40 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2020/01/26 17:32:11 rillig Exp $
+# $NetBSD: Makefile,v 1.12 2020/05/02 11:49:40 rillig Exp $
 #
 
 DISTNAME=              qlogtools-3.1
@@ -11,8 +11,7 @@
 
 DJB_RESTRICTED=                NO
 DJB_MAKE_TARGETS=      NO
-
-SUBST_FILES.djbware+=  qfilelog.c
+DJB_ERRNO_HACK_FILES=  qfilelog.c
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
 



Home | Main Index | Thread Index | Old Index