Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2015 00:22:58 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r383184 - in head/devel/libc++: . files
Message-ID:  <201504040022.t340MwUc082274@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Apr  4 00:22:57 2015
New Revision: 383184
URL: https://svnweb.freebsd.org/changeset/ports/383184

Log:
  devel/libc++: Mainly fix DragonFly support.
  
  This port was originally fixed in dports using alias:10 but this fix
  was faulty.  The libc++ headers reference __FreeBSD__ so alias won't
  work.  It needs to be patched to check __DragonFly__, including a file
  that was the subject of EXTRA_PATCHES.
  
  Moreover, the port was installing the .orig files left over from
  patching.  I remove these in post-patch now.

Added:
  head/devel/libc++/files/patch-include____locale   (contents, props changed)
  head/devel/libc++/files/patch-include_locale   (contents, props changed)
  head/devel/libc++/files/patch-src_locale.cpp   (contents, props changed)
Modified:
  head/devel/libc++/Makefile
  head/devel/libc++/files/extra-libmissing
  head/devel/libc++/files/patch-include____config

Modified: head/devel/libc++/Makefile
==============================================================================
--- head/devel/libc++/Makefile	Sat Apr  4 00:11:32 2015	(r383183)
+++ head/devel/libc++/Makefile	Sat Apr  4 00:22:57 2015	(r383184)
@@ -9,7 +9,7 @@ MASTER_SITES=	http://files.etoilebsd.net
 		LOCAL/bapt
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT?=	Llvm's C++ standard library with c++11 support
+COMMENT?=	LLVM C++ standard library with c++11 support
 
 USES=		tar:xz
 
@@ -57,6 +57,10 @@ SVN_REV!=       LC_ALL=C svn info http:/
 .if defined(BOOTSTRAP) || defined(SVN_FETCH)
 FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion
 
+post-patch:
+	# remove .orig files because they can get installed in stagedir
+	@${FIND} ${WRKSRC} -name "*.orig" -type f -delete
+
 do-fetch:
 	${MKDIR} ${WRKDIR}
 	svn export -r ${SVN_REV} \

Modified: head/devel/libc++/files/extra-libmissing
==============================================================================
--- head/devel/libc++/files/extra-libmissing	Sat Apr  4 00:11:32 2015	(r383183)
+++ head/devel/libc++/files/extra-libmissing	Sat Apr  4 00:22:57 2015	(r383184)
@@ -8,15 +8,3 @@
  #include <type_traits>
  
  #ifdef _LIBCPP_MSVCRT
---- include/__locale.orig	2014-05-06 15:33:07.907356770 +0200
-+++ include/__locale	2014-05-06 15:32:20.702360182 +0200
-@@ -24,6 +24,9 @@
- #elif _AIX
- # include <support/ibm/xlocale.h>
- #elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
-+# define __LONG_LONG_SUPPORTED
-+# include <stdlib.h>
-+# include <limits.h>
- # include <xlocale.h>
- #endif  // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
- 

Modified: head/devel/libc++/files/patch-include____config
==============================================================================
--- head/devel/libc++/files/patch-include____config	Sat Apr  4 00:11:32 2015	(r383183)
+++ head/devel/libc++/files/patch-include____config	Sat Apr  4 00:22:57 2015	(r383184)
@@ -1,11 +1,37 @@
---- ./include/__config.orig	2014-01-06 16:23:02.000000000 +0100
-+++ ./include/__config	2014-05-06 14:12:18.649712048 +0200
-@@ -309,7 +309,7 @@
+--- include/__config.orig	2014-04-14 15:44:57 UTC
++++ include/__config
+@@ -42,7 +42,7 @@
+ #endif  // __BIG_ENDIAN__
+ #endif  // __BIG_ENDIAN__
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ # include <sys/endian.h>
+ #  if _BYTE_ORDER == _LITTLE_ENDIAN
+ #   define _LIBCPP_LITTLE_ENDIAN 1
+@@ -314,7 +314,10 @@ typedef __char32_t char32_t;
  #endif
  
  #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
 -#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) && _FreeBSD_version >= 901501
++#if defined(__DragonFly__)
++#define _LIBCPP_HAS_QUICK_EXIT
++#define _LIBCPP_HAS_C11_FEATURES
++#elif defined(__FreeBSD__) && _FreeBSD_version >= 901501
  #define _LIBCPP_HAS_QUICK_EXIT
  #define _LIBCPP_HAS_C11_FEATURES
  #elif defined(__linux__)
+@@ -601,6 +604,13 @@ template <unsigned> struct __static_asse
+ #define _LIBCPP_WCTYPE_IS_MASK
+ #endif
+ 
++#ifdef __DragonFly__
++#define _LIBCPP_LOCALE__L_EXTENSIONS 1
++#define _DECLARE_C99_LDBL_MATH 1
++#define _LIBCPP_HAS_DEFAULTRUNELOCALE
++#define _LIBCPP_WCTYPE_IS_MASK
++#endif
++
+ #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
+ #  define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
+ #endif

Added: head/devel/libc++/files/patch-include____locale
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libc++/files/patch-include____locale	Sat Apr  4 00:22:57 2015	(r383184)
@@ -0,0 +1,32 @@
+--- include/__locale.orig	2014-03-11 17:18:47 UTC
++++ include/__locale
+@@ -23,7 +23,15 @@
+ # include <support/win32/locale_win32.h>
+ #elif defined(_AIX)
+ # include <support/ibm/xlocale.h>
+-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
++#elif defined (__FreeBSD__)
++# include <sys/param.h>
++# if __FreeBSD_version < 900000
++#   define __LONG_LONG_SUPPORTED
++#   include <stdlib.h>
++#   include <limits.h>
++# endif
++# include <xlocale.h>
++#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) || defined(__DragonFly__)
+ # include <xlocale.h>
+ #endif  // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
+ 
+@@ -341,10 +349,10 @@ public:
+     static const mask punct  = _PUNCT;
+     static const mask xdigit = _HEX;
+     static const mask blank  = _BLANK;
+-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
++#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #ifdef __APPLE__
+     typedef __uint32_t mask;
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+     typedef unsigned long mask;
+ #elif defined(__EMSCRIPTEN__) ||  defined(__NetBSD__)
+     typedef unsigned short mask;

Added: head/devel/libc++/files/patch-include_locale
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libc++/files/patch-include_locale	Sat Apr  4 00:22:57 2015	(r383184)
@@ -0,0 +1,11 @@
+--- include/locale.orig	2014-02-07 21:14:29 UTC
++++ include/locale
+@@ -209,7 +209,7 @@ template <class charT> class messages_by
+ 
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ #  define _LIBCPP_GET_C_LOCALE 0
+ #elif defined(__NetBSD__)
+ #  define _LIBCPP_GET_C_LOCALE LC_C_LOCALE

Added: head/devel/libc++/files/patch-src_locale.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libc++/files/patch-src_locale.cpp	Sat Apr  4 00:22:57 2015	(r383184)
@@ -0,0 +1,11 @@
+--- src/locale.cpp.orig	2014-01-04 17:43:00 UTC
++++ src/locale.cpp
+@@ -1021,7 +1021,7 @@ extern "C" const int ** __ctype_toupper_
+ const ctype<char>::mask*
+ ctype<char>::classic_table()  _NOEXCEPT
+ {
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
+     return _DefaultRuneLocale.__runetype;
+ #elif defined(__NetBSD__)
+     return _C_ctype_tab_ + 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504040022.t340MwUc082274>