forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
12 changed files
with
117 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
# Created by: Koop Mast <[email protected]> | ||
# $FreeBSD$ | ||
|
||
PORTNAME= libc++ | ||
PORTNAME?= libc++ | ||
DISTNAME= libc++-${PORTVERSION} | ||
PORTVERSION= ${SVN_REV} | ||
CATEGORIES= devel | ||
MASTER_SITES= http://files.etoilebsd.net/libc++/ \ | ||
LOCAL/bapt | ||
|
||
MAINTAINER= [email protected] | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SVN_REV= 200683 | ||
SVN_REV= 208080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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__ | ||
|
13 changes: 13 additions & 0 deletions
13
devel/libc++/files/patch-include__support__solaris__xlocale.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
lib/libxlocale.so.0 | ||
lib/libxlocale.so | ||
include/xlocale.h |