diff --git a/devel/Makefile b/devel/Makefile index 961b25c407f1..9ddce680aa23 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4619,6 +4619,7 @@ SUBDIR += xdg-utils SUBDIR += xfce4-dev-tools SUBDIR += xfce4-vala + SUBDIR += xlocale SUBDIR += xmake SUBDIR += xmltooling SUBDIR += xorg-macros diff --git a/devel/libc++/Makefile b/devel/libc++/Makefile index 7f76f6fbff8b..8f7b9967f94b 100644 --- a/devel/libc++/Makefile +++ b/devel/libc++/Makefile @@ -1,22 +1,26 @@ # Created by: Koop Mast # $FreeBSD$ -PORTNAME= libc++ +PORTNAME?= libc++ +DISTNAME= libc++-${PORTVERSION} PORTVERSION= ${SVN_REV} CATEGORIES= devel MASTER_SITES= http://files.etoilebsd.net/libc++/ \ LOCAL/bapt MAINTAINER= bapt@FreeBSD.org -COMMENT= Llvm's C++ standard library with c++11 support +COMMENT?= Llvm's C++ standard library with c++11 support -LIB_DEPENDS= libcxxrt.so:${PORTSDIR}/devel/libcxxrt +USES= tar:xz +.ifndef MASTERDIR LICENSE_GROUP= MIT UIUC LICENSE_NAME_UIUC= University of Illinois/NCSA Open Source License LICENSE_PERMS_UIUC= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -USES= cmake:outsource compiler:c++11-lang tar:xz +LIB_DEPENDS= libcxxrt.so:${PORTSDIR}/devel/libcxxrt + +USES+= cmake:outsource compiler:c++11-lang USE_LDCONFIG= yes LDFLAGS+= -L${LOCALBASE}/lib @@ -30,6 +34,16 @@ CXXRT_INCS= ${LOCALBASE}/include/cxxrt/ CXXRT_LIB= ${LOCALBASE}/lib/libcxxrt.so .endif +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 900000 +LIB_DEPENDS+= libmissing.so:${PORTSDIR}/math/libmissing \ + libxlocale.so:${PORTSDIR}/devel/xlocale +EXTRA_PATCHES= ${FILESDIR}/extra-libmissing +CXXFLAGS+= -I${LOCALBASE}/include -D__LONG_LONG_SUPPORTED +LDFLAGS+= -lmissing +EXTRALIB= ${LOCALBASE}/lib/libmissing.so.2 ${LOCALBASE}/lib/libxlocale.so.0 +.endif + + CMAKE_ARGS= -DLIBCXX_CXX_ABI=libcxxrt -DLIBCXX_LIBCXXRT_INCLUDE_PATHS=${CXXRT_INCS} .if !defined(SVN_REV) @@ -56,10 +70,11 @@ post-install: ${LN} -sf c++/v1 ${STAGEDIR}${PREFIX}/include/c++/v1/tr1 ${RM} ${STAGEDIR}${PREFIX}/lib/libc++.so @${MKDIR} ${STAGEDIR}${PREFIX}/lib/c++/ - ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB})' > ${STAGEDIR}${PREFIX}/lib/libc++.so - ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB})' > ${STAGEDIR}${PREFIX}/lib/c++/libstdc++.so + ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB} ${EXTRALIB})' > ${STAGEDIR}${PREFIX}/lib/libc++.so + ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB} ${EXTRALIB})' > ${STAGEDIR}${PREFIX}/lib/c++/libstdc++.so regression-test: build cd ${WRKSRC}/test && ${SH} ./testit +.endif .include diff --git a/devel/libc++/Makefile.svn_rev b/devel/libc++/Makefile.svn_rev index 939a932a46a2..2e7e1b9d4fc4 100644 --- a/devel/libc++/Makefile.svn_rev +++ b/devel/libc++/Makefile.svn_rev @@ -1 +1 @@ -SVN_REV= 200683 +SVN_REV= 208080 diff --git a/devel/libc++/distinfo b/devel/libc++/distinfo index 7466fadf12bd..7e4840c7d9c2 100644 --- a/devel/libc++/distinfo +++ b/devel/libc++/distinfo @@ -1,2 +1,2 @@ -SHA256 (libc++-200683.tar.xz) = a9771ae4d6151fa9c7ca5a3cb9f00492ddc1f165d38dc6461a8876a5abe4711f -SIZE (libc++-200683.tar.xz) = 863432 +SHA256 (libc++-208080.tar.xz) = e764167cef1b73f03f2e736eedb2d45d0d2247590de8c878f8ca0bba6f2a9cfc +SIZE (libc++-208080.tar.xz) = 867788 diff --git a/devel/libc++/files/extra-libmissing b/devel/libc++/files/extra-libmissing new file mode 100644 index 000000000000..18489c395b2a --- /dev/null +++ b/devel/libc++/files/extra-libmissing @@ -0,0 +1,22 @@ +--- ./include/cmath.orig 2014-01-06 19:12:50.000000000 +0100 ++++ ./include/cmath 2014-05-06 14:14:44.388681947 +0200 +@@ -299,6 +299,7 @@ + + #include <__config> + #include ++#include + #include + + #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 + #elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) ++# define __LONG_LONG_SUPPORTED ++# include ++# include + # include + #endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ + diff --git a/devel/libc++/files/patch-include__support__solaris__xlocale.h b/devel/libc++/files/patch-include__support__solaris__xlocale.h new file mode 100644 index 000000000000..ddc3add4534b --- /dev/null +++ b/devel/libc++/files/patch-include__support__solaris__xlocale.h @@ -0,0 +1,13 @@ +--- ./include/support/solaris/xlocale.h.orig 2014-01-16 17:58:45.000000000 +0100 ++++ ./include/support/solaris/xlocale.h 2014-05-06 16:11:11.135199398 +0200 +@@ -32,8 +32,8 @@ + + #define LC_GLOBAL_LOCALE ((locale_t)-1) + +-size_t __mb_cur_max(locale_t l); +-#define MB_CUR_MAX_L(l) __mb_cur_max(l) ++size_t __mb_cur_max_l(locale_t l); ++#define MB_CUR_MAX_L(l) __mb_cur_max_l(l) + + locale_t newlocale(int mask, const char * locale, locale_t base); + void freelocale(locale_t loc); diff --git a/devel/libc++/files/patch-src__string.cpp b/devel/libc++/files/patch-src__string.cpp new file mode 100644 index 000000000000..553e7caa5e77 --- /dev/null +++ b/devel/libc++/files/patch-src__string.cpp @@ -0,0 +1,10 @@ +--- ./src/string.cpp.orig 2014-05-06 16:01:31.219239454 +0200 ++++ ./src/string.cpp 2014-05-06 15:59:03.134249779 +0200 +@@ -19,6 +19,7 @@ + #include "support/win32/support.h" + #endif // _LIBCPP_MSVCRT + #include ++#include + + _LIBCPP_BEGIN_NAMESPACE_STD + diff --git a/devel/libc++/files/patch-src__support__solaris__xlocale.c b/devel/libc++/files/patch-src__support__solaris__xlocale.c new file mode 100644 index 000000000000..f908f4fa8986 --- /dev/null +++ b/devel/libc++/files/patch-src__support__solaris__xlocale.c @@ -0,0 +1,11 @@ +--- ./src/support/solaris/xlocale.c.orig 2014-01-16 17:58:45.000000000 +0100 ++++ ./src/support/solaris/xlocale.c 2014-05-06 15:50:38.219287659 +0200 +@@ -26,7 +26,7 @@ + #include "mbsnrtowcs.inc" + #include "wcsnrtombs.inc" + +-size_t __mb_cur_max(locale_t __l) { ++size_t __mb_cur_max_l(locale_t __l) { + FIX_LOCALE(__l); + return (__l->lc_ctype->cmapp->cm_mb_cur_max); + } diff --git a/devel/libc++/pkg-plist b/devel/libc++/pkg-plist index 2b8ee0506868..e78d2d659632 100644 --- a/devel/libc++/pkg-plist +++ b/devel/libc++/pkg-plist @@ -10,6 +10,7 @@ include/c++/v1/__functional_base_03 include/c++/v1/__hash_table include/c++/v1/__locale include/c++/v1/__mutex_base +include/c++/v1/__refstring include/c++/v1/__split_buffer include/c++/v1/__sso_allocator include/c++/v1/__std_stream @@ -30,6 +31,7 @@ include/c++/v1/c++/v1/__functional_base_03 include/c++/v1/c++/v1/__hash_table include/c++/v1/c++/v1/__locale include/c++/v1/c++/v1/__mutex_base +include/c++/v1/c++/v1/__refstring include/c++/v1/c++/v1/__split_buffer include/c++/v1/c++/v1/__sso_allocator include/c++/v1/c++/v1/__std_stream diff --git a/devel/xlocale/Makefile b/devel/xlocale/Makefile new file mode 100644 index 000000000000..3eedcc84ffbd --- /dev/null +++ b/devel/xlocale/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= xlocale + +COMMENT?= Minimal xlocale implementation + +LICENSE= BSD2CLAUSE + +MASTERDIR= ${.CURDIR}/../libc++ + +BUILD_WRKSRC= ${WRKSRC}/src/support/solaris +CFLAGS+= -I${WRKSRC}/include/support/solaris + +PLIST= ${.CURDIR}/pkg-plist +DESCR= ${.CURDIR}/pkg-descr + +do-build: + cd ${BUILD_WRKSRC}; ${CC} ${CFLAGS} -fPIC -c xlocale.c ; \ + ${CC} ${LDFLAGS} xlocale.o -shared -o libxlocale.so.0 -Wl,-soname=libxlocale.so.0 + +do-install: + ${INSTALL_LIB} ${BUILD_WRKSRC}/libxlocale.so.0 ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/include/support/solaris/xlocale.h ${STAGEDIR}${PREFIX}/include + ${LN} -sf libxlocale.so.0 ${STAGEDIR}${PREFIX}/lib/libxlocale.so + +.include "${MASTERDIR}/../libc++/Makefile.svn_rev" +.include "${MASTERDIR}/../libc++/Makefile" diff --git a/devel/xlocale/pkg-descr b/devel/xlocale/pkg-descr new file mode 100644 index 000000000000..4db8a2a5b4e2 --- /dev/null +++ b/devel/xlocale/pkg-descr @@ -0,0 +1,4 @@ +Minimal xlocale implementation for Solaris. This implements the subset of the +xlocale APIs that libc++ depends on. + +WWW: http://libcxx.llvm.org diff --git a/devel/xlocale/pkg-plist b/devel/xlocale/pkg-plist new file mode 100644 index 000000000000..331b1a7dcd2e --- /dev/null +++ b/devel/xlocale/pkg-plist @@ -0,0 +1,3 @@ +lib/libxlocale.so.0 +lib/libxlocale.so +include/xlocale.h