1 |
aballier 13/05/31 01:16:30 |
2 |
|
3 |
Modified: metadata.xml ChangeLog libcxx-9999.ebuild |
4 |
Log: |
5 |
Allow building without libcxxrt but enable it by default |
6 |
|
7 |
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 160F534A) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 sys-libs/libcxx/metadata.xml |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/metadata.xml?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/metadata.xml?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/metadata.xml?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: metadata.xml |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/metadata.xml,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- metadata.xml 24 May 2012 03:01:42 -0000 1.1 |
23 |
+++ metadata.xml 31 May 2013 01:16:29 -0000 1.2 |
24 |
@@ -8,5 +8,8 @@ |
25 |
<email>aballier@g.o</email> |
26 |
<name>Alexis Ballier</name> |
27 |
</maintainer> |
28 |
+ <use> |
29 |
+ <flag name="libcxxrt">Build on top of <pkg>sys-libs/libcxxrt</pkg> instead of gcc's libsupc++ (avoids depending on gcc).</flag> |
30 |
+ </use> |
31 |
</pkgmetadata> |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
1.16 sys-libs/libcxx/ChangeLog |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.16&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.16&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?r1=1.15&r2=1.16 |
41 |
|
42 |
Index: ChangeLog |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v |
45 |
retrieving revision 1.15 |
46 |
retrieving revision 1.16 |
47 |
diff -u -r1.15 -r1.16 |
48 |
--- ChangeLog 30 May 2013 23:36:35 -0000 1.15 |
49 |
+++ ChangeLog 31 May 2013 01:16:29 -0000 1.16 |
50 |
@@ -1,6 +1,10 @@ |
51 |
# ChangeLog for sys-libs/libcxx |
52 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.15 2013/05/30 23:36:35 aballier Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.16 2013/05/31 01:16:29 aballier Exp $ |
55 |
+ |
56 |
+ 31 May 2013; Alexis Ballier <aballier@g.o> libcxx-9999.ebuild, |
57 |
+ metadata.xml: |
58 |
+ Allow building without libcxxrt but enable it by default |
59 |
|
60 |
30 May 2013; Alexis Ballier <aballier@g.o> libcxx-9999.ebuild: |
61 |
use upstream documented way for building on top of libcxxrt |
62 |
|
63 |
|
64 |
|
65 |
1.9 sys-libs/libcxx/libcxx-9999.ebuild |
66 |
|
67 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.9&view=markup |
68 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.9&content-type=text/plain |
69 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?r1=1.8&r2=1.9 |
70 |
|
71 |
Index: libcxx-9999.ebuild |
72 |
=================================================================== |
73 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v |
74 |
retrieving revision 1.8 |
75 |
retrieving revision 1.9 |
76 |
diff -u -r1.8 -r1.9 |
77 |
--- libcxx-9999.ebuild 30 May 2013 23:36:35 -0000 1.8 |
78 |
+++ libcxx-9999.ebuild 31 May 2013 01:16:29 -0000 1.9 |
79 |
@@ -1,6 +1,6 @@ |
80 |
# Copyright 1999-2013 Gentoo Foundation |
81 |
# Distributed under the terms of the GNU General Public License v2 |
82 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.8 2013/05/30 23:36:35 aballier Exp $ |
83 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.9 2013/05/31 01:16:29 aballier Exp $ |
84 |
|
85 |
EAPI=5 |
86 |
|
87 |
@@ -8,7 +8,7 @@ |
88 |
|
89 |
[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM="" |
90 |
|
91 |
-inherit cmake-utils ${SCM} base flag-o-matic |
92 |
+inherit cmake-utils ${SCM} base flag-o-matic toolchain-funcs |
93 |
|
94 |
DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
95 |
HOMEPAGE="http://libcxx.llvm.org/" |
96 |
@@ -25,31 +25,44 @@ |
97 |
else |
98 |
KEYWORDS="" |
99 |
fi |
100 |
-IUSE="static-libs" |
101 |
+IUSE="+libcxxrt static-libs" |
102 |
|
103 |
-RDEPEND=">=sys-libs/libcxxrt-0.0_p20130530[static-libs?]" |
104 |
+RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130530[static-libs?] ) |
105 |
+ !libcxxrt? ( sys-devel/gcc[cxx] )" |
106 |
DEPEND="${RDEPEND} |
107 |
sys-devel/clang |
108 |
app-arch/xz-utils" |
109 |
|
110 |
-PATCHES=( "${FILESDIR}/multilib.patch" |
111 |
- "${FILESDIR}/cxxrt.patch" ) |
112 |
+PATCHES=( "${FILESDIR}/multilib.patch" ) |
113 |
DOCS=( "CREDITS.TXT" ) |
114 |
|
115 |
src_prepare() { |
116 |
+ use libcxxrt && PATCHES+=( "${FILESDIR}/cxxrt.patch" ) |
117 |
base_src_prepare |
118 |
} |
119 |
|
120 |
src_configure() { |
121 |
+ local mycmakeargs_base=( ) |
122 |
+ if use libcxxrt ; then |
123 |
+ mycmakeargs_base=( |
124 |
+ -DLIBCXX_CXX_ABI=libcxxrt |
125 |
+ -DLIBCXX_LIBCXXRT_INCLUDE_PATHS="/usr/include/libcxxrt/" |
126 |
+ ) |
127 |
+ else |
128 |
+ # Very hackish, see $HOMEPAGE |
129 |
+ # If someone has a clever idea, please share it! |
130 |
+ local includes="$(echo | "$(tc-getCXX)" -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ';' | tr -d ' ')" |
131 |
+ mycmakeargs_base=( |
132 |
+ -DLIBCXX_CXX_ABI=libsupc++ |
133 |
+ -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="${includes}" |
134 |
+ ) |
135 |
+ fi |
136 |
+ |
137 |
# Needs to be built with clang. gcc-4.6.3 fails at least. |
138 |
# TODO: cross-compile ? |
139 |
export CC=clang |
140 |
export CXX=clang++ |
141 |
|
142 |
- local mycmakeargs_base=( |
143 |
- -DLIBCXX_CXX_ABI=libcxxrt |
144 |
- -DLIBCXX_LIBCXXRT_INCLUDE_PATHS="/usr/include/libcxxrt/" |
145 |
- ) |
146 |
if use static-libs ; then |
147 |
local mycmakeargs=( "${mycmakeargs_base[@]}" "-DLIBCXX_ENABLE_SHARED=OFF" ) |
148 |
BUILD_DIR="${S}_static" cmake-utils_src_configure |