pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/mk
I believe this change broke (or perhaps only greatly ennoisened)
things on 9.2_STABLE.
pts/2 dogcow@kuroi: /usr/pkgsrc/devel/xxhash 2907 % make clean
awk: illegal field $(), name "3"
input record number 1, file
source line number 1
make: "/usr/bin/uname -r | awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}'" returned non-zero status
===> Cleaning for xxhash-0.8.1
On Mon, Nov 29, 2021 at 04:14:23PM +0000, Jonathan Perkin wrote:
> Module Name: pkgsrc
> Committed By: jperkin
> Date: Mon Nov 29 16:14:23 UTC 2021
>
> Modified Files:
> pkgsrc/mk: bsd.prefs.mk
> pkgsrc/mk/compiler: sunpro.mk
> pkgsrc/mk/platform: Darwin.mk NetBSD.mk OpenBSD.mk SunOS.mk
> pkgsrc/mk/tools: tools.FreeBSD.mk
>
> Log Message:
> mk: Use OPSYS_VERSION where appropriate.
>
> Should improve readability and in some cases avoid potential failure due to
> string comparisons being used. No other functional change intended.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.412 -r1.413 pkgsrc/mk/bsd.prefs.mk
> cvs rdiff -u -r1.49 -r1.50 pkgsrc/mk/compiler/sunpro.mk
> cvs rdiff -u -r1.109 -r1.110 pkgsrc/mk/platform/Darwin.mk
> cvs rdiff -u -r1.69 -r1.70 pkgsrc/mk/platform/NetBSD.mk
> cvs rdiff -u -r1.43 -r1.44 pkgsrc/mk/platform/OpenBSD.mk
> cvs rdiff -u -r1.81 -r1.82 pkgsrc/mk/platform/SunOS.mk
> cvs rdiff -u -r1.48 -r1.49 pkgsrc/mk/tools/tools.FreeBSD.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/bsd.prefs.mk
> diff -u pkgsrc/mk/bsd.prefs.mk:1.412 pkgsrc/mk/bsd.prefs.mk:1.413
> --- pkgsrc/mk/bsd.prefs.mk:1.412 Mon Nov 29 15:57:55 2021
> +++ pkgsrc/mk/bsd.prefs.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: bsd.prefs.mk,v 1.412 2021/11/29 15:57:55 jperkin Exp $
> +# $NetBSD: bsd.prefs.mk,v 1.413 2021/11/29 16:14:23 jperkin Exp $
> #
> # This file includes the mk.conf file, which contains the user settings.
> #
> @@ -564,14 +564,14 @@ X11_TYPE?= modular
> X11BASE?= /usr/openwin
> . elif ${OPSYS} == "Cygwin" || ${OPSYS} == "IRIX" || ${OPSYS} == "OSF1" || ${OPSYS} == "HPUX"
> X11BASE?= /usr
> -. elif !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
> +. elif ${OPSYS} == "Darwin"
> +. if ${OPSYS_VERSION} < 100500
> X11BASE?= /usr/X11R6
> -. elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) || \
> - !empty(MACHINE_PLATFORM:MDarwin-10.*-*) || \
> - !empty(MACHINE_PLATFORM:MDarwin-11.*-*)
> +. elif ${OPSYS_VERSION} < 100800
> X11BASE?= /usr/X11
> -. elif !empty(MACHINE_PLATFORM:MDarwin-??.*-*)
> +. else
> X11BASE?= /opt/X11
> +. endif
> . elif ${OPSYS} == "NetBSD"
> X11BASE?= /usr/X11R7
> . elif exists(/usr/X11R7/lib/libX11.so)
>
> Index: pkgsrc/mk/compiler/sunpro.mk
> diff -u pkgsrc/mk/compiler/sunpro.mk:1.49 pkgsrc/mk/compiler/sunpro.mk:1.50
> --- pkgsrc/mk/compiler/sunpro.mk:1.49 Sun May 3 23:16:41 2015
> +++ pkgsrc/mk/compiler/sunpro.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: sunpro.mk,v 1.49 2015/05/03 23:16:41 joerg Exp $
> +# $NetBSD: sunpro.mk,v 1.50 2021/11/29 16:14:23 jperkin Exp $
> #
> # This is the compiler definition for the SUNWspro C compiler.
> #
> @@ -64,9 +64,9 @@ PKG_${t}:= ${SUNWSPROBASE}/bin/${n}
> # See PR 37200
> .if !empty(USE_LANGUAGES:Mc99)
> _WRAP_EXTRA_ARGS.CC+= -xc99
> -. if !empty(MACHINE_PLATFORM:MSunOS-5.[89]-*)
> +. if ${OPSYS_VERSION} < 051000
> _WRAP_EXTRA_ARGS.CC+= -xc99=all,no_lib
> -. endif
> +. endif
> .endif
>
> # The Solaris linker uses "-R" for rpath directives.
>
> Index: pkgsrc/mk/platform/Darwin.mk
> diff -u pkgsrc/mk/platform/Darwin.mk:1.109 pkgsrc/mk/platform/Darwin.mk:1.110
> --- pkgsrc/mk/platform/Darwin.mk:1.109 Mon Nov 29 12:38:44 2021
> +++ pkgsrc/mk/platform/Darwin.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: Darwin.mk,v 1.109 2021/11/29 12:38:44 jperkin Exp $
> +# $NetBSD: Darwin.mk,v 1.110 2021/11/29 16:14:23 jperkin Exp $
> #
> # Variable definitions for the Darwin operating system.
>
> @@ -30,14 +30,15 @@
> #
>
> # Tiger (and earlier) use Xfree 4.4.0 (and earlier)
> -.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
> +.if ${OPSYS_VERSION} < 100500
> X11_TYPE?= native
> .endif
>
> .if !defined(CPP) || ${CPP} == "cpp"
> CPP= ${CC} -E ${CPP_PRECOMP_FLAGS}
> .endif
> -.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
> +# bash invoked as /bin/sh on Leopard and newer does not support echo -n.
> +.if ${OPSYS_VERSION} >= 100500
> ECHO_N?= /bin/echo -n
> .else
> ECHO_N?= ${ECHO} -n
> @@ -153,14 +154,14 @@ _WRAP_EXTRA_ARGS.LD+= -arch arm64
> # in the SDK directory. It may be that this can be set for all versions, but
> # for now keep the legacy behaviour and limit it to Big Sur onwards only.
> #
> -.if ${OS_VERSION:R} >= 20
> +.if ${OPSYS_VERSION} >= 110000
> DARWIN_NO_SYSTEM_LIBS= # defined
> _OPSYS_LIB_DIRS?= ${OSX_SDK_PATH}/usr/lib
> .else
> _OPSYS_LIB_DIRS?= /usr/lib
> .endif
>
> -.if ${OS_VERSION:R} >= 6
> +.if ${OPSYS_VERSION} >= 100200
> _OPSYS_HAS_INET6= yes # IPv6 is standard
> .else
> _OPSYS_HAS_INET6= no # IPv6 is not standard
> @@ -183,8 +184,8 @@ KRB5_DEFAULT?= mit-krb5
> #
> # Builtin overrides.
> #
> -.if !empty(OS_VERSION:M[56].*)
> -USE_BUILTIN.dl= no # Darwin-[56].* uses devel/dlcompat
> +.if ${OPSYS_VERSION} < 100300
> +USE_BUILTIN.dl= no # Use devel/dlcompat
> .endif
>
> # Builtin defaults which make sense for this platform.
> @@ -252,15 +253,14 @@ MAKE_ENV+= MACOSX_DEPLOYMENT_TARGET="10.
> CONFIGURE_ENV+= gl_cv_func_getcwd_abort_bug=no
> .endif
>
> -# Use "/bin/ksh" for buildlink3 wrapper script to improve build performance.
> -.if (!empty(OS_VERSION:M9.*) || !empty(OS_VERSION:M1[0-2].*) || \
> - !empty(OS_VERSION:M1[4-9].*)) && \
> - exists(/bin/ksh)
> +# Use ksh to improve wrapper script performance, except on buggy Mavericks.
> +.if exists(/bin/ksh)
> +. if ${OPSYS_VERSION} < 100900 || ${OPSYS_VERSION} >= 101000
> WRAPPER_BIN_SH?= /bin/ksh
> +. endif
> .endif
>
> -# strnlen(3) wasn't included until Lion, pull it in from libnbcompat on prior
> -# releases.
> -.if ${OS_VERSION:R} < 11
> +# strnlen(3) is available from Lion onwards
> +.if ${OPSYS_VERSION} < 100700
> _OPSYS_MISSING_FEATURES+= strnlen
> .endif
>
> Index: pkgsrc/mk/platform/NetBSD.mk
> diff -u pkgsrc/mk/platform/NetBSD.mk:1.69 pkgsrc/mk/platform/NetBSD.mk:1.70
> --- pkgsrc/mk/platform/NetBSD.mk:1.69 Tue Nov 9 12:04:43 2021
> +++ pkgsrc/mk/platform/NetBSD.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: NetBSD.mk,v 1.69 2021/11/09 12:04:43 nia Exp $
> +# $NetBSD: NetBSD.mk,v 1.70 2021/11/29 16:14:23 jperkin Exp $
> #
> # Variable definitions for the NetBSD operating system.
>
> @@ -43,7 +43,7 @@ ULIMIT_CMD_cputime?= ulimit -t `ulimit
> # Native X11 is only supported on NetBSD-5 and later.
> # On NetBSD-5, native X11 has enough issues that we default
> # to modular.
> -.if empty(MACHINE_PLATFORM:MNetBSD-[0-5].*)
> +.if ${OPSYS_VERSION} >= 060000
> X11_TYPE?= native
> .endif
>
> @@ -137,10 +137,9 @@ OPSYS_HAS_TIMERFD= # defined
> .endif
>
> # Register support for FORTIFY (with GCC)
> -.if !empty(OS_VERSION:M[2-6].*)
> # Disable on older versions, see:
> # http://mail-index.netbsd.org/pkgsrc-users/2017/08/07/msg025435.html
> -.else
> +.if ${OPSYS_VERSION} >= 070000
> _OPSYS_SUPPORTS_FORTIFY=yes
> .endif
>
>
> Index: pkgsrc/mk/platform/OpenBSD.mk
> diff -u pkgsrc/mk/platform/OpenBSD.mk:1.43 pkgsrc/mk/platform/OpenBSD.mk:1.44
> --- pkgsrc/mk/platform/OpenBSD.mk:1.43 Tue Nov 9 12:04:43 2021
> +++ pkgsrc/mk/platform/OpenBSD.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: OpenBSD.mk,v 1.43 2021/11/09 12:04:43 nia Exp $
> +# $NetBSD: OpenBSD.mk,v 1.44 2021/11/29 16:14:23 jperkin Exp $
> #
> # Variable definitions for the OpenBSD operating system.
>
> @@ -61,7 +61,7 @@ _OPSYS_SHLIB_TYPE_cmd= \
> *) echo ELF ;; \
> esac
> _PATCH_CAN_BACKUP= yes # native patch(1) can make backups
> -.if ${OS_VERSION} >= 3.4
> +.if ${OPSYS_VERSION} >= 030400
> _PATCH_BACKUP_ARG?= -V simple -z # switch to patch(1) for backup suffix
> .else
> _PATCH_BACKUP_ARG?= -V simple -b # switch to patch(1) for backup suffix
>
> Index: pkgsrc/mk/platform/SunOS.mk
> diff -u pkgsrc/mk/platform/SunOS.mk:1.81 pkgsrc/mk/platform/SunOS.mk:1.82
> --- pkgsrc/mk/platform/SunOS.mk:1.81 Tue Nov 23 10:37:59 2021
> +++ pkgsrc/mk/platform/SunOS.mk Mon Nov 29 16:14:23 2021
> @@ -1,4 +1,4 @@
> -# $NetBSD: SunOS.mk,v 1.81 2021/11/23 10:37:59 nia Exp $
> +# $NetBSD: SunOS.mk,v 1.82 2021/11/29 16:14:23 jperkin Exp $
> #
> # Variable definitions for the SunOS/Solaris operating system.
>
> @@ -40,7 +40,7 @@ MOTIF_TYPE_DEFAULT?= motif
> .endif
>
> # Use SMF by default if available.
> -.if empty(OS_VERSION:M5.[0-9])
> +.if ${OPSYS_VERSION} >= 051000
> INIT_SYSTEM?= smf
> .endif
>
> @@ -75,7 +75,7 @@ _OPSYS_MISSING_FEATURES= asprintf
> _OPSYS_MISSING_FEATURES+= err
> .endif
>
> -.if ${OS_VERSION} != "5.11"
> +.if ${OPSYS_VERSION} < 051100
> _OPSYS_MISSING_FEATURES+= strnlen
> .endif
>
>
> Index: pkgsrc/mk/tools/tools.FreeBSD.mk
> diff -u pkgsrc/mk/tools/tools.FreeBSD.mk:1.48 pkgsrc/mk/tools/tools.FreeBSD.mk:1.49
> --- pkgsrc/mk/tools/tools.FreeBSD.mk:1.48 Tue Feb 12 18:40:16 2019
> +++ pkgsrc/mk/tools/tools.FreeBSD.mk Mon Nov 29 16:14:23 2021
> @@ -1,11 +1,11 @@
> -# $NetBSD: tools.FreeBSD.mk,v 1.48 2019/02/12 18:40:16 triaxx Exp $
> +# $NetBSD: tools.FreeBSD.mk,v 1.49 2021/11/29 16:14:23 jperkin Exp $
> #
> # System-supplied tools for the FreeBSD operating system.
>
> TOOLS_PLATFORM.[?= [ # shell builtin
> TOOLS_PLATFORM.awk?= /usr/bin/awk
> TOOLS_PLATFORM.basename?= /usr/bin/basename
> -.if empty(MACHINE_PLATFORM:MFreeBSD-[0-4].*-*) && empty(MACHINE_PLATFORM:MFreeBSD-5.[0-3]-*)
> +.if ${OPSYS_VERSION} >= 050400
> TOOLS_PLATFORM.bsdtar?= /usr/bin/tar
> .endif
> TOOLS_PLATFORM.byacc?= /usr/bin/yacc
>
Home |
Main Index |
Thread Index |
Old Index