pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/libcxx



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Dec 17 16:07:09 UTC 2018

Modified Files:
        pkgsrc/lang/libcxx: distinfo
Added Files:
        pkgsrc/lang/libcxx/patches: patch-src_experimental_memory__resource.cpp
            patch-src_filesystem_directory__iterator.cpp

Log Message:
libcxx: Fix build on SunOS.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/libcxx/distinfo
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp

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

Modified files:

Index: pkgsrc/lang/libcxx/distinfo
diff -u pkgsrc/lang/libcxx/distinfo:1.2 pkgsrc/lang/libcxx/distinfo:1.3
--- pkgsrc/lang/libcxx/distinfo:1.2     Sun Dec  9 20:04:39 2018
+++ pkgsrc/lang/libcxx/distinfo Mon Dec 17 16:07:09 2018
@@ -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 @@ SHA1 (libcxxabi-7.0.0.src.tar.xz) = b6ab
 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

Added files:

Index: pkgsrc/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp
diff -u /dev/null pkgsrc/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp:1.3
--- /dev/null   Mon Dec 17 16:07:09 2018
+++ pkgsrc/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp      Mon Dec 17 16:07:09 2018
@@ -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.

Index: pkgsrc/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp
diff -u /dev/null pkgsrc/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp:1.1
--- /dev/null   Mon Dec 17 16:07:09 2018
+++ pkgsrc/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp     Mon Dec 17 16:07:09 2018
@@ -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