aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2015-04-04 08:22:57 +0800
committermarino <marino@FreeBSD.org>2015-04-04 08:22:57 +0800
commiteceed9c6af9d3f663464c2ef82728a2bd1969dc5 (patch)
tree414ffaab28c511d6704fcccb0a5768a223856c9a /devel
parent1d7c46790523c5078e8294209502466bb8475c74 (diff)
downloadfreebsd-ports-gnome-eceed9c6af9d3f663464c2ef82728a2bd1969dc5.tar.gz
freebsd-ports-gnome-eceed9c6af9d3f663464c2ef82728a2bd1969dc5.tar.zst
freebsd-ports-gnome-eceed9c6af9d3f663464c2ef82728a2bd1969dc5.zip
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.
Diffstat (limited to 'devel')
-rw-r--r--devel/libc++/Makefile6
-rw-r--r--devel/libc++/files/extra-libmissing12
-rw-r--r--devel/libc++/files/patch-include____config34
-rw-r--r--devel/libc++/files/patch-include____locale32
-rw-r--r--devel/libc++/files/patch-include_locale11
-rw-r--r--devel/libc++/files/patch-src_locale.cpp11
6 files changed, 89 insertions, 17 deletions
diff --git a/devel/libc++/Makefile b/devel/libc++/Makefile
index 282ff451c287..9d86d703d88a 100644
--- a/devel/libc++/Makefile
+++ b/devel/libc++/Makefile
@@ -9,7 +9,7 @@ MASTER_SITES= http://files.etoilebsd.net/libc++/ \
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://llvm.org/svn/llvm-project/ | ${GREP} Re
.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} \
diff --git a/devel/libc++/files/extra-libmissing b/devel/libc++/files/extra-libmissing
index 18489c395b2a..f547dff2e2c1 100644
--- a/devel/libc++/files/extra-libmissing
+++ b/devel/libc++/files/extra-libmissing
@@ -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__
-
diff --git a/devel/libc++/files/patch-include____config b/devel/libc++/files/patch-include____config
index 378f07e87c5f..5cbf2b96606a 100644
--- a/devel/libc++/files/patch-include____config
+++ b/devel/libc++/files/patch-include____config
@@ -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
diff --git a/devel/libc++/files/patch-include____locale b/devel/libc++/files/patch-include____locale
new file mode 100644
index 000000000000..b710617a3be3
--- /dev/null
+++ b/devel/libc++/files/patch-include____locale
@@ -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;
diff --git a/devel/libc++/files/patch-include_locale b/devel/libc++/files/patch-include_locale
new file mode 100644
index 000000000000..1e0c913de8b6
--- /dev/null
+++ b/devel/libc++/files/patch-include_locale
@@ -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
diff --git a/devel/libc++/files/patch-src_locale.cpp b/devel/libc++/files/patch-src_locale.cpp
new file mode 100644
index 000000000000..9698d42aafe9
--- /dev/null
+++ b/devel/libc++/files/patch-src_locale.cpp
@@ -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;