mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-11 07:22:22 +00:00
Update libc++ to r208080
Fix build on FreeBSD 8.4 by using devel/libmissing and new devel/xlocale Add devel/xlocale which is a striped down version of freebsd's xlocale with just the minimal requirements for libc++, initially maintained in libc++'s trunk for solaris support
This commit is contained in:
parent
bad5615c7c
commit
24f12368ca
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=353096
@ -4619,6 +4619,7 @@
|
||||
SUBDIR += xdg-utils
|
||||
SUBDIR += xfce4-dev-tools
|
||||
SUBDIR += xfce4-vala
|
||||
SUBDIR += xlocale
|
||||
SUBDIR += xmake
|
||||
SUBDIR += xmltooling
|
||||
SUBDIR += xorg-macros
|
||||
|
@ -1,22 +1,26 @@
|
||||
# Created by: Koop Mast <kwm@FreeBSD.org>
|
||||
# $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 <bsd.port.mk>
|
||||
|
@ -1 +1 @@
|
||||
SVN_REV= 200683
|
||||
SVN_REV= 208080
|
||||
|
@ -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
|
||||
|
22
devel/libc++/files/extra-libmissing
Normal file
22
devel/libc++/files/extra-libmissing
Normal file
@ -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 <math.h>
|
||||
+#include <missing_math.h>
|
||||
#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__
|
||||
|
@ -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);
|
10
devel/libc++/files/patch-src__string.cpp
Normal file
10
devel/libc++/files/patch-src__string.cpp
Normal file
@ -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 <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
11
devel/libc++/files/patch-src__support__solaris__xlocale.c
Normal file
11
devel/libc++/files/patch-src__support__solaris__xlocale.c
Normal file
@ -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);
|
||||
}
|
@ -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
|
||||
|
27
devel/xlocale/Makefile
Normal file
27
devel/xlocale/Makefile
Normal file
@ -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"
|
4
devel/xlocale/pkg-descr
Normal file
4
devel/xlocale/pkg-descr
Normal file
@ -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
|
3
devel/xlocale/pkg-plist
Normal file
3
devel/xlocale/pkg-plist
Normal file
@ -0,0 +1,3 @@
|
||||
lib/libxlocale.so.0
|
||||
lib/libxlocale.so
|
||||
include/xlocale.h
|
Loading…
Reference in New Issue
Block a user