1 |
aballier 14/03/22 12:39:59 |
2 |
|
3 |
Modified: ChangeLog libcxx-9999.ebuild |
4 |
Added: libcxx-0.0_p20140322.ebuild |
5 |
Log: |
6 |
bump a new snapshot |
7 |
|
8 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 160F534A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.39 sys-libs/libcxx/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.39&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.39&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?r1=1.38&r2=1.39 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v |
20 |
retrieving revision 1.38 |
21 |
retrieving revision 1.39 |
22 |
diff -u -r1.38 -r1.39 |
23 |
--- ChangeLog 5 Jan 2014 11:41:35 -0000 1.38 |
24 |
+++ ChangeLog 22 Mar 2014 12:39:59 -0000 1.39 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sys-libs/libcxx |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.38 2014/01/05 11:41:35 naota Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.39 2014/03/22 12:39:59 aballier Exp $ |
30 |
+ |
31 |
+*libcxx-0.0_p20140322 (22 Mar 2014) |
32 |
+ |
33 |
+ 22 Mar 2014; Alexis Ballier <aballier@g.o> |
34 |
+ +libcxx-0.0_p20140322.ebuild: |
35 |
+ bump a new snapshot |
36 |
|
37 |
05 Jan 2014; Naohiro Aota <naota@g.o> libcxx-0.0_p20131222.ebuild: |
38 |
Add ~x86-fbsd. #482820 |
39 |
|
40 |
|
41 |
|
42 |
1.27 sys-libs/libcxx/libcxx-9999.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.27&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.27&content-type=text/plain |
46 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?r1=1.26&r2=1.27 |
47 |
|
48 |
Index: libcxx-9999.ebuild |
49 |
=================================================================== |
50 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v |
51 |
retrieving revision 1.26 |
52 |
retrieving revision 1.27 |
53 |
diff -u -r1.26 -r1.27 |
54 |
--- libcxx-9999.ebuild 22 Dec 2013 17:51:28 -0000 1.26 |
55 |
+++ libcxx-9999.ebuild 22 Mar 2014 12:39:59 -0000 1.27 |
56 |
@@ -1,6 +1,6 @@ |
57 |
# Copyright 1999-2013 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.26 2013/12/22 17:51:28 aballier Exp $ |
60 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.27 2014/03/22 12:39:59 aballier Exp $ |
61 |
|
62 |
EAPI=5 |
63 |
|
64 |
@@ -21,7 +21,7 @@ |
65 |
LICENSE="|| ( UoI-NCSA MIT )" |
66 |
SLOT="0" |
67 |
if [ "${PV%9999}" = "${PV}" ] ; then |
68 |
- KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" |
69 |
+ KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
70 |
else |
71 |
KEYWORDS="" |
72 |
fi |
73 |
|
74 |
|
75 |
|
76 |
1.1 sys-libs/libcxx/libcxx-0.0_p20140322.ebuild |
77 |
|
78 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild?rev=1.1&view=markup |
79 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild?rev=1.1&content-type=text/plain |
80 |
|
81 |
Index: libcxx-0.0_p20140322.ebuild |
82 |
=================================================================== |
83 |
# Copyright 1999-2014 Gentoo Foundation |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild,v 1.1 2014/03/22 12:39:59 aballier Exp $ |
86 |
|
87 |
EAPI=5 |
88 |
|
89 |
ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk" |
90 |
|
91 |
[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM="" |
92 |
|
93 |
inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal |
94 |
|
95 |
DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
96 |
HOMEPAGE="http://libcxx.llvm.org/" |
97 |
if [ "${PV%9999}" = "${PV}" ] ; then |
98 |
SRC_URI="mirror://gentoo/${P}.tar.xz" |
99 |
else |
100 |
SRC_URI="" |
101 |
fi |
102 |
|
103 |
LICENSE="|| ( UoI-NCSA MIT )" |
104 |
SLOT="0" |
105 |
if [ "${PV%9999}" = "${PV}" ] ; then |
106 |
KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
107 |
else |
108 |
KEYWORDS="" |
109 |
fi |
110 |
IUSE="elibc_glibc +libcxxrt static-libs test" |
111 |
|
112 |
RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130530[static-libs?,${MULTILIB_USEDEP}] ) |
113 |
!libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )" |
114 |
DEPEND="${RDEPEND} |
115 |
test? ( sys-devel/clang ) |
116 |
app-arch/xz-utils" |
117 |
|
118 |
DOCS=( CREDITS.TXT ) |
119 |
|
120 |
pkg_setup() { |
121 |
if ! use libcxxrt ; then |
122 |
ewarn "You have disabled USE=libcxxrt. This will build ${PN} against" |
123 |
ewarn "libsupc++. Please note that this is not well supported." |
124 |
ewarn "In particular, static linking will not work." |
125 |
fi |
126 |
if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then |
127 |
eerror "${PN} needs to be built with clang++ or gcc-4.7 or later." |
128 |
eerror "Please use gcc-config to switch to gcc-4.7 or later version." |
129 |
die |
130 |
fi |
131 |
} |
132 |
|
133 |
src_prepare() { |
134 |
cp -f "${FILESDIR}/Makefile" lib/ || die |
135 |
multilib_copy_sources |
136 |
} |
137 |
|
138 |
src_configure() { |
139 |
export LIBS="-lpthread -lrt -lc -lgcc_s" |
140 |
if use libcxxrt ; then |
141 |
append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/" |
142 |
LIBS="-lcxxrt ${LIBS}" |
143 |
cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include" |
144 |
else |
145 |
# Very hackish, see $HOMEPAGE |
146 |
# If someone has a clever idea, please share it! |
147 |
local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')" |
148 |
local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')" |
149 |
append-cppflags -D__GLIBCXX__ ${includes} |
150 |
LIBS="-lsupc++ ${LIBS}" |
151 |
local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h" |
152 |
for i in ${libsupcxx_includes} ; do |
153 |
local found="" |
154 |
[ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})" |
155 |
for j in ${libcxx_gcc_dirs} ; do |
156 |
if [ -f "${j}/${i}" ] ; then |
157 |
cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die |
158 |
found=yes |
159 |
fi |
160 |
done |
161 |
[ -n "${found}" ] || die "Header not found: ${i}" |
162 |
done |
163 |
fi |
164 |
|
165 |
tc-export AR CC CXX |
166 |
|
167 |
append-ldflags "-Wl,-z,defs" # make sure we are not underlinked |
168 |
} |
169 |
|
170 |
multilib_src_compile() { |
171 |
cd "${BUILD_DIR}/lib" || die |
172 |
emake shared |
173 |
use static-libs && emake static |
174 |
} |
175 |
|
176 |
# Tests fail for now, if anybody is able to fix them, help is very welcome. |
177 |
multilib_src_test() { |
178 |
cd "${BUILD_DIR}/test" |
179 |
LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \ |
180 |
CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \ |
181 |
HEADER_INCLUDE="-I${BUILD_DIR}/include" \ |
182 |
SOURCE_LIB="-L${BUILD_DIR}/lib" \ |
183 |
LIBS="-lm $(usex libcxxrt -lcxxrt "")" \ |
184 |
./testit || die |
185 |
# TODO: fix link against libsupc++ |
186 |
} |
187 |
|
188 |
# Usage: deps |
189 |
gen_ldscript() { |
190 |
local output_format |
191 |
output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
192 |
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
193 |
|
194 |
cat <<-END_LDSCRIPT |
195 |
/* GNU ld script |
196 |
Include missing dependencies |
197 |
*/ |
198 |
${output_format} |
199 |
GROUP ( $@ ) |
200 |
END_LDSCRIPT |
201 |
} |
202 |
|
203 |
gen_static_ldscript() { |
204 |
if use libcxxrt ; then |
205 |
# Move it first. |
206 |
mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die |
207 |
|
208 |
# Generate libc++.a ldscript for inclusion of its dependencies so that |
209 |
# clang++ -stdlib=libc++ -static works out of the box. |
210 |
local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a" |
211 |
# On Linux/glibc it does not link without libpthread or libdl. It is |
212 |
# fine on FreeBSD. |
213 |
use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a" |
214 |
|
215 |
gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a" |
216 |
fi |
217 |
# TODO: Generate a libc++.a ldscript when building against libsupc++ |
218 |
} |
219 |
|
220 |
gen_shared_ldscript() { |
221 |
if use libcxxrt ; then |
222 |
mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die |
223 |
local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so" |
224 |
gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so" |
225 |
fi |
226 |
# TODO: Generate the linker script for other confiurations too. |
227 |
} |
228 |
|
229 |
multilib_src_install() { |
230 |
cd "${BUILD_DIR}/lib" |
231 |
if use static-libs ; then |
232 |
dolib.a libc++.a |
233 |
gen_static_ldscript |
234 |
fi |
235 |
dolib.so libc++.so* |
236 |
gen_shared_ldscript |
237 |
} |
238 |
|
239 |
multilib_src_install_all() { |
240 |
einstalldocs |
241 |
insinto /usr/include/c++/v1 |
242 |
doins -r include/* |
243 |
} |
244 |
|
245 |
pkg_postinst() { |
246 |
elog "This package (${PN}) is mainly intended as a replacement for the C++" |
247 |
elog "standard library when using clang." |
248 |
elog "To use it, instead of libstdc++, use:" |
249 |
elog " clang++ -stdlib=libc++" |
250 |
elog "to compile your C++ programs." |
251 |
} |