Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libcxx: ChangeLog libcxx-0.0_p20130531.ebuild
Date: Fri, 31 May 2013 15:57:46
Message-Id: 20130531155741.B64C22171D@flycatcher.gentoo.org
1 aballier 13/05/31 15:57:41
2
3 Modified: ChangeLog
4 Added: libcxx-0.0_p20130531.ebuild
5 Log:
6 bump a new snapshot
7
8 (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
9
10 Revision Changes Path
11 1.17 sys-libs/libcxx/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.17&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.17&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?r1=1.16&r2=1.17
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v
20 retrieving revision 1.16
21 retrieving revision 1.17
22 diff -u -r1.16 -r1.17
23 --- ChangeLog 31 May 2013 01:16:29 -0000 1.16
24 +++ ChangeLog 31 May 2013 15:57:41 -0000 1.17
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-libs/libcxx
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.16 2013/05/31 01:16:29 aballier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.17 2013/05/31 15:57:41 aballier Exp $
30 +
31 +*libcxx-0.0_p20130531 (31 May 2013)
32 +
33 + 31 May 2013; Alexis Ballier <aballier@g.o>
34 + +libcxx-0.0_p20130531.ebuild:
35 + bump a new snapshot
36
37 31 May 2013; Alexis Ballier <aballier@g.o> libcxx-9999.ebuild,
38 metadata.xml:
39
40
41
42 1.1 sys-libs/libcxx/libcxx-0.0_p20130531.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20130531.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20130531.ebuild?rev=1.1&content-type=text/plain
46
47 Index: libcxx-0.0_p20130531.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20130531.ebuild,v 1.1 2013/05/31 15:57:41 aballier Exp $
52
53 EAPI=5
54
55 ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
56
57 [ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
58
59 inherit cmake-utils ${SCM} base flag-o-matic toolchain-funcs
60
61 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
62 HOMEPAGE="http://libcxx.llvm.org/"
63 if [ "${PV%9999}" = "${PV}" ] ; then
64 SRC_URI="mirror://gentoo/${P}.tar.xz"
65 else
66 SRC_URI=""
67 fi
68
69 LICENSE="|| ( UoI-NCSA MIT )"
70 SLOT="0"
71 if [ "${PV%9999}" = "${PV}" ] ; then
72 KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
73 else
74 KEYWORDS=""
75 fi
76 IUSE="+libcxxrt static-libs"
77
78 RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130530[static-libs?] )
79 !libcxxrt? ( sys-devel/gcc[cxx] )"
80 DEPEND="${RDEPEND}
81 sys-devel/clang
82 app-arch/xz-utils"
83
84 PATCHES=( "${FILESDIR}/multilib.patch" )
85 DOCS=( "CREDITS.TXT" )
86
87 src_prepare() {
88 use libcxxrt && PATCHES+=( "${FILESDIR}/cxxrt.patch" )
89 base_src_prepare
90 }
91
92 src_configure() {
93 local mycmakeargs_base=( )
94 if use libcxxrt ; then
95 mycmakeargs_base=(
96 -DLIBCXX_CXX_ABI=libcxxrt
97 -DLIBCXX_LIBCXXRT_INCLUDE_PATHS="/usr/include/libcxxrt/"
98 )
99 else
100 # Very hackish, see $HOMEPAGE
101 # If someone has a clever idea, please share it!
102 local includes="$(echo | "$(tc-getCXX)" -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ';' | tr -d ' ')"
103 mycmakeargs_base=(
104 -DLIBCXX_CXX_ABI=libsupc++
105 -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="${includes}"
106 )
107 fi
108
109 # Needs to be built with clang. gcc-4.6.3 fails at least.
110 # TODO: cross-compile ?
111 export CC=clang
112 export CXX=clang++
113
114 if use static-libs ; then
115 local mycmakeargs=( "${mycmakeargs_base[@]}" "-DLIBCXX_ENABLE_SHARED=OFF" )
116 BUILD_DIR="${S}_static" cmake-utils_src_configure
117 fi
118 local mycmakeargs=( "${mycmakeargs_base[@]}" )
119 BUILD_DIR="${S}_shared" cmake-utils_src_configure
120 }
121
122 src_compile() {
123 use static-libs && BUILD_DIR="${S}_static" cmake-utils_src_compile
124 BUILD_DIR="${S}_shared" cmake-utils_src_compile
125 }
126
127 # Tests fail for now, if anybody is able to fix them, help is very welcome.
128 src_test() {
129 cd "${S}/test"
130 LD_LIBRARY_PATH="${S}_shared/lib:${LD_LIBRARY_PATH}" \
131 CC="clang++" \
132 HEADER_INCLUDE="-I${S}/include" \
133 SOURCE_LIB="-L${S}_shared/lib" \
134 LIBS="-lm" \
135 ./testit || die
136 }
137
138 src_install() {
139 use static-libs && BUILD_DIR="${S}_static" cmake-utils_src_install
140 BUILD_DIR="${S}_shared" cmake-utils_src_install
141 }
142
143 pkg_postinst() {
144 elog "This package (${PN}) is mainly intended as a replacement for the C++"
145 elog "standard library when using clang."
146 elog "To use it, instead of libstdc++, use:"
147 elog " clang++ -stdlib=libc++"
148 elog "to compile your C++ programs."
149 }