pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/libcxx libcxx: Fix build on SunOS.
details: https://anonhg.NetBSD.org/pkgsrc/rev/875431e99c01
branches: trunk
changeset: 389009:875431e99c01
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Dec 17 16:07:09 2018 +0000
description:
libcxx: Fix build on SunOS.
diffstat:
lang/libcxx/distinfo | 4 +-
lang/libcxx/patches/patch-src_experimental_memory__resource.cpp | 15 +++++
lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp | 28 ++++++++++
3 files changed, 46 insertions(+), 1 deletions(-)
diffs (66 lines):
diff -r 58898ab656d4 -r 875431e99c01 lang/libcxx/distinfo
--- a/lang/libcxx/distinfo Mon Dec 17 15:59:21 2018 +0000
+++ b/lang/libcxx/distinfo Mon Dec 17 16:07:09 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2018/12/09 20:04:39 adam Exp $
+$NetBSD: distinfo,v 1.3 2018/12/17 16:07:09 jperkin Exp $
SHA1 (libcxx-7.0.0.src.tar.xz) = 496b865f1011020eb5d6fbac6a0cc08e2c1f0a09
RMD160 (libcxx-7.0.0.src.tar.xz) = 7dfefd22edb305f68882a5f503f31c881fe5dc05
@@ -8,3 +8,5 @@
RMD160 (libcxxabi-7.0.0.src.tar.xz) = d4a932989597e58f7a3f24cd67f8886b93c184d7
SHA512 (libcxxabi-7.0.0.src.tar.xz) = 95aa8f60477739e6d6eb6ba1e32c98928e1b8104d18d659336cf7f1c5bfd1ed505015077dfbe39329c0c9d2b5b428d853e5652b0106c0cde317d2d013ebd1cf0
Size (libcxxabi-7.0.0.src.tar.xz) = 535792 bytes
+SHA1 (patch-src_experimental_memory__resource.cpp) = 15e2431f92b41d814008e83d918e27248db065e1
+SHA1 (patch-src_filesystem_directory__iterator.cpp) = ed7fccc6727ba349b32cda451e3c5d0067c737d3
diff -r 58898ab656d4 -r 875431e99c01 lang/libcxx/patches/patch-src_experimental_memory__resource.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp Mon Dec 17 16:07:09 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_experimental_memory__resource.cpp,v 1.3 2018/12/17 16:07:09 jperkin Exp $
+
+The init_priority attribute isn't supported on SunOS GCC.
+
+--- src/experimental/memory_resource.cpp.orig 2018-07-16 20:01:59.000000000 +0000
++++ src/experimental/memory_resource.cpp
+@@ -70,7 +70,7 @@ union ResourceInitHelper {
+ };
+
+ // Detect if the init_priority attribute is supported.
+-#if (defined(_LIBCPP_COMPILER_GCC) && defined(__APPLE__)) \
++#if (defined(_LIBCPP_COMPILER_GCC) && (defined(__APPLE__) || defined(__sun))) \
+ || defined(_LIBCPP_COMPILER_MSVC)
+ // GCC on Apple doesn't support the init priority attribute,
+ // and MSVC doesn't support any GCC attributes.
diff -r 58898ab656d4 -r 875431e99c01 lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp Mon Dec 17 16:07:09 2018 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_filesystem_directory__iterator.cpp,v 1.1 2018/12/17 16:07:09 jperkin Exp $
+
+Support POSIX file modes.
+
+--- src/filesystem/directory_iterator.cpp.orig 2018-07-27 03:07:09.000000000 +0000
++++ src/filesystem/directory_iterator.cpp
+@@ -27,7 +27,21 @@ namespace {
+ #if !defined(_LIBCPP_WIN32API)
+ template <class DirEntT, class = decltype(DirEntT::d_type)>
+ static file_type get_file_type(DirEntT* ent, int) {
++#ifdef __sun
++#define DT_BLK S_IFBLK
++#define DT_CHR S_IFCHR
++#define DT_DIR S_IFDIR
++#define DT_FIFO S_IFIFO
++#define DT_LNK S_IFLNK
++#define DT_REG S_IFREG
++#define DT_SOCK S_IFSOCK
++#define DT_UNKNOWN 0
++ struct stat s;
++ stat(ent->d_name, &s);
++ switch (s.st_mode & 0xF000) {
++#else
+ switch (ent->d_type) {
++#endif
+ case DT_BLK:
+ return file_type::block;
+ case DT_CHR:
Home |
Main Index |
Thread Index |
Old Index