pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   rillig
Date:           Fri Mar 20 19:40:39 UTC 2020

Modified Files:
        pkgsrc/mk: djbware.mk

Log Message:
mk/djbware.mk: make the errno.h hack configurable

This hack is mostly needed for older software like sysutils/daemontools
that was created when errno was still a global variable. Newer packages
like devel/bglibs don't need that hack anymore. Therefore make it
configurable, to avoid build failures when subst.mk does not find any
error.h to patch.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/mk/djbware.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/djbware.mk
diff -u pkgsrc/mk/djbware.mk:1.26 pkgsrc/mk/djbware.mk:1.27
--- pkgsrc/mk/djbware.mk:1.26   Thu Sep 28 16:15:49 2017
+++ pkgsrc/mk/djbware.mk        Fri Mar 20 19:40:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: djbware.mk,v 1.26 2017/09/28 16:15:49 schmonz Exp $
+# $NetBSD: djbware.mk,v 1.27 2020/03/20 19:40:39 rillig Exp $
 #
 # Makefile fragment for packages with djb-style build machinery
 #
@@ -29,6 +29,7 @@ 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
@@ -82,6 +83,7 @@ do-build:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} package/compile ${DJB_BUILD_ARGS}
 .endif
 
+.if !empty(DJB_ERRNO_HACK:M[yY][eE][sS])
 PKG_SUPPORTED_OPTIONS+=        djbware-errno-hack
 PKG_SUGGESTED_OPTIONS+=        djbware-errno-hack
 
@@ -103,5 +105,8 @@ SUBST_FILES.djbware+=       error.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
 
 .endif # DJBWARE_MK



Home | Main Index | Thread Index | Old Index