Fri Jul 21 08:29:56 2023 UTC ()
mk: Add put_time to USE_CXX_FEATURES. C++11 feature, but appeared in GCC 5.


(nia)
diff -r1.186 -r1.187 pkgsrc/doc/guide/files/fixes.xml
diff -r1.100 -r1.101 pkgsrc/mk/compiler.mk
diff -r1.255 -r1.256 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.186 -r1.187 pkgsrc/doc/guide/files/fixes.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/fixes.xml 2023/07/18 12:49:46 1.186
+++ pkgsrc/doc/guide/files/fixes.xml 2023/07/21 08:29:56 1.187
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: fixes.xml,v 1.186 2023/07/18 12:49:46 nia Exp $ --> 1<!-- $NetBSD: fixes.xml,v 1.187 2023/07/21 08:29:56 nia Exp $ -->
2 2
3<chapter id="fixes"> <?dbhtml filename="fixes.html"?> 3<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
4<title>Making your package work</title> 4<title>Making your package work</title>
5 5
6<sect1 id="general-operation"> 6<sect1 id="general-operation">
7 <title>General operation</title> 7 <title>General operation</title>
8 8
9 <para>One appealing feature of pkgsrc is that it runs on many 9 <para>One appealing feature of pkgsrc is that it runs on many
10 different platforms. As a result, it is important to ensure, 10 different platforms. As a result, it is important to ensure,
11 where possible, that packages in pkgsrc are portable. This 11 where possible, that packages in pkgsrc are portable. This
12 chapter mentions some particular details you should pay 12 chapter mentions some particular details you should pay
13 attention to while working on pkgsrc.</para> 13 attention to while working on pkgsrc.</para>
14 14
@@ -1448,27 +1448,27 @@ fortran77, java, objc, obj-c++, and ada. @@ -1448,27 +1448,27 @@ fortran77, java, objc, obj-c++, and ada.
1448 This is a common bug in upstream build systems.</para> 1448 This is a common bug in upstream build systems.</para>
1449 1449
1450 <para>To declare which features a package requies from the 1450 <para>To declare which features a package requies from the
1451 compiler, set either <varname>USE_CC_FEATURES</varname> 1451 compiler, set either <varname>USE_CC_FEATURES</varname>
1452 or <varname>USE_CXX_FEATURES</varname>. Allowed values for 1452 or <varname>USE_CXX_FEATURES</varname>. Allowed values for
1453 <varname>USE_CC_FEATURES</varname> are currently: 1453 <varname>USE_CC_FEATURES</varname> are currently:
1454<programlisting> 1454<programlisting>
1455c11, c99, has_include 1455c11, c99, has_include
1456</programlisting> 1456</programlisting>
1457 Allowed values for <varname>USE_CXX_FEATURES</varname> are 1457 Allowed values for <varname>USE_CXX_FEATURES</varname> are
1458 currently: 1458 currently:
1459<programlisting> 1459<programlisting>
1460c++11, c++14, c++17, c++20, has_include, regex, filesystem, 1460c++11, c++14, c++17, c++20, has_include, regex, filesystem,
1461charconv, parallelism_ts, unique_ptr 1461charconv, parallelism_ts, unique_ptr, put_time
1462</programlisting> 1462</programlisting>
1463 .</para> 1463 .</para>
1464 </para> 1464 </para>
1465 </sect2> 1465 </sect2>
1466 1466
1467 <sect2 id="java-programming-language"> 1467 <sect2 id="java-programming-language">
1468 <title>Java</title> 1468 <title>Java</title>
1469 1469
1470 <para>If a program is written in Java, use the Java framework in 1470 <para>If a program is written in Java, use the Java framework in
1471 pkgsrc. The package must include 1471 pkgsrc. The package must include
1472 <filename>../../mk/java-vm.mk</filename>. This Makefile fragment 1472 <filename>../../mk/java-vm.mk</filename>. This Makefile fragment
1473 provides the following variables:</para> 1473 provides the following variables:</para>
1474 1474

cvs diff -r1.100 -r1.101 pkgsrc/mk/compiler.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler.mk 2023/07/18 12:49:46 1.100
+++ pkgsrc/mk/compiler.mk 2023/07/21 08:29:56 1.101
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: compiler.mk,v 1.100 2023/07/18 12:49:46 nia Exp $ 1# $NetBSD: compiler.mk,v 1.101 2023/07/21 08:29:56 nia Exp $
2# 2#
3# This Makefile fragment implements handling for supported C/C++/Fortran 3# This Makefile fragment implements handling for supported C/C++/Fortran
4# compilers. 4# compilers.
5# 5#
6# The following variables may be set by the pkgsrc user in mk.conf: 6# The following variables may be set by the pkgsrc user in mk.conf:
7# 7#
8# PKGSRC_COMPILER 8# PKGSRC_COMPILER
9# A list of values specifying the chain of compilers to be used by 9# A list of values specifying the chain of compilers to be used by
10# pkgsrc to build packages. 10# pkgsrc to build packages.
11# 11#
12# Valid values are: 12# Valid values are:
13# ccc Compaq C Compilers (Tru64) 13# ccc Compaq C Compilers (Tru64)
14# ccache compiler cache (chainable) 14# ccache compiler cache (chainable)
@@ -71,27 +71,28 @@ @@ -71,27 +71,28 @@
71# This is used to (optionally) install a newer compiler 71# This is used to (optionally) install a newer compiler
72# than provided by the system, or to skip building the package. 72# than provided by the system, or to skip building the package.
73# 73#
74# Valid values are: c11, c99, has_include. 74# Valid values are: c11, c99, has_include.
75# 75#
76# USE_CXX_FEATURES 76# USE_CXX_FEATURES
77# 77#
78# Declares the C++ compiler features required by the package. 78# Declares the C++ compiler features required by the package.
79# 79#
80# This is used to (optionally) install a newer compiler 80# This is used to (optionally) install a newer compiler
81# than provided by the system, to or skip building the package. 81# than provided by the system, to or skip building the package.
82# 82#
83# Valid values are: c++11, c++14, c++17, c++20, has_include, 83# Valid values are: c++11, c++14, c++17, c++20, has_include,
84# regex, filesystem, unique_ptr, charconv, parallelism_ts. 84# regex, filesystem, unique_ptr, charconv, parallelism_ts,
 85# put_time.
85# 86#
86# The following variables are defined, and available for testing in 87# The following variables are defined, and available for testing in
87# package Makefiles: 88# package Makefiles:
88# 89#
89# CC_VERSION 90# CC_VERSION
90# The compiler and version being used, e.g., 91# The compiler and version being used, e.g.,
91# 92#
92# .include "../../mk/compiler.mk" 93# .include "../../mk/compiler.mk"
93# 94#
94# .if !empty(CC_VERSION:Mgcc-3*) 95# .if !empty(CC_VERSION:Mgcc-3*)
95# ... 96# ...
96# .endif 97# .endif
97# 98#

cvs diff -r1.255 -r1.256 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2023/07/20 21:12:16 1.255
+++ pkgsrc/mk/compiler/gcc.mk 2023/07/21 08:29:56 1.256
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.255 2023/07/20 21:12:16 nia Exp $ 1# $NetBSD: gcc.mk,v 1.256 2023/07/21 08:29:56 nia Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# GCCBASE 7# GCCBASE
8# If using a native GCC and the compiler is not in $PATH then 8# If using a native GCC and the compiler is not in $PATH then
9# this should be set to the base installation directory. 9# this should be set to the base installation directory.
10# 10#
11# USE_NATIVE_GCC 11# USE_NATIVE_GCC
12# When set to "yes", the native gcc is used, no matter which 12# When set to "yes", the native gcc is used, no matter which
13# compiler version a package requires. 13# compiler version a package requires.
14# 14#
@@ -205,26 +205,30 @@ GCC_REQD+= 3 @@ -205,26 +205,30 @@ GCC_REQD+= 3
205 205
206.if !empty(USE_CC_FEATURES:Mc11) 206.if !empty(USE_CC_FEATURES:Mc11)
207GCC_REQD+= 4.9 207GCC_REQD+= 4.9
208.endif 208.endif
209 209
210.if !empty(USE_CXX_FEATURES:Munique_ptr) 210.if !empty(USE_CXX_FEATURES:Munique_ptr)
211GCC_REQD+= 4.9 211GCC_REQD+= 4.9
212.endif 212.endif
213 213
214.if !empty(USE_CXX_FEATURES:Mregex) 214.if !empty(USE_CXX_FEATURES:Mregex)
215GCC_REQD+= 4.9 215GCC_REQD+= 4.9
216.endif 216.endif
217 217
 218.if !empty(USE_CXX_FEATURES:Mput_time)
 219GCC_REQD+= 5
 220.endif
 221
218.if !empty(USE_CXX_FEATURES:Mfilesystem) 222.if !empty(USE_CXX_FEATURES:Mfilesystem)
219GCC_REQD+= 8 223GCC_REQD+= 8
220.endif 224.endif
221 225
222.if !empty(USE_CXX_FEATURES:Mparallelism_ts) 226.if !empty(USE_CXX_FEATURES:Mparallelism_ts)
223GCC_REQD+= 10 227GCC_REQD+= 10
224.endif 228.endif
225 229
226.if !empty(USE_CXX_FEATURES:Mcharconv) 230.if !empty(USE_CXX_FEATURES:Mcharconv)
227GCC_REQD+= 8 231GCC_REQD+= 8
228.endif 232.endif
229 233
230# Only one compiler defined here supports Ada: lang/gcc6-aux 234# Only one compiler defined here supports Ada: lang/gcc6-aux