1 |
aballier 12/05/31 20:48:43 |
2 |
|
3 |
Modified: ChangeLog libcxxrt-9999.ebuild |
4 |
Log: |
5 |
Use our own makefiles, its so simple that we do not need to rely on cmake for this. Build it on top of libunwind instead of using libgcc_s for unwinding. Remove their libunwind bundled headers and ship a reduced one with only the added macros libcxxrt needs. Build with -nodefaultlibs to ensure we do not link to gcc libs. Add static-libs useflag. Give it a src_test. |
6 |
|
7 |
(Portage version: 2.2.0_alpha108/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 sys-libs/libcxxrt/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/ChangeLog?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/ChangeLog?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/ChangeLog?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/ChangeLog,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- ChangeLog 28 May 2012 13:58:04 -0000 1.1 |
23 |
+++ ChangeLog 31 May 2012 20:48:43 -0000 1.2 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for sys-libs/libcxxrt |
26 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/ChangeLog,v 1.1 2012/05/28 13:58:04 aballier Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/ChangeLog,v 1.2 2012/05/31 20:48:43 aballier Exp $ |
29 |
+ |
30 |
+ 31 May 2012; Alexis Ballier <aballier@g.o> libcxxrt-9999.ebuild, |
31 |
+ +files/Makefile, +files/Makefile.test, +files/unwind.h: |
32 |
+ Use our own makefiles, its so simple that we do not need to rely on cmake for |
33 |
+ this. Build it on top of libunwind instead of using libgcc_s for unwinding. |
34 |
+ Remove their libunwind bundled headers and ship a reduced one with only the |
35 |
+ added macros libcxxrt needs. Build with -nodefaultlibs to ensure we do not |
36 |
+ link to gcc libs. Add static-libs useflag. Give it a src_test. |
37 |
|
38 |
*libcxxrt-9999 (28 May 2012) |
39 |
*libcxxrt-0.0_p20120528 (28 May 2012) |
40 |
|
41 |
|
42 |
|
43 |
1.2 sys-libs/libcxxrt/libcxxrt-9999.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild?rev=1.2&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild?rev=1.2&content-type=text/plain |
47 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild?r1=1.1&r2=1.2 |
48 |
|
49 |
Index: libcxxrt-9999.ebuild |
50 |
=================================================================== |
51 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild,v |
52 |
retrieving revision 1.1 |
53 |
retrieving revision 1.2 |
54 |
diff -u -r1.1 -r1.2 |
55 |
--- libcxxrt-9999.ebuild 28 May 2012 13:58:04 -0000 1.1 |
56 |
+++ libcxxrt-9999.ebuild 31 May 2012 20:48:43 -0000 1.2 |
57 |
@@ -1,6 +1,6 @@ |
58 |
# Copyright 1999-2012 Gentoo Foundation |
59 |
# Distributed under the terms of the GNU General Public License v2 |
60 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild,v 1.1 2012/05/28 13:58:04 aballier Exp $ |
61 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxxrt/libcxxrt-9999.ebuild,v 1.2 2012/05/31 20:48:43 aballier Exp $ |
62 |
|
63 |
EAPI=4 |
64 |
|
65 |
@@ -8,7 +8,7 @@ |
66 |
|
67 |
[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" |
68 |
|
69 |
-inherit cmake-utils ${SCM} base flag-o-matic |
70 |
+inherit base flag-o-matic toolchain-funcs portability ${SCM} |
71 |
|
72 |
DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD." |
73 |
HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" |
74 |
@@ -26,29 +26,44 @@ |
75 |
else |
76 |
KEYWORDS="" |
77 |
fi |
78 |
-IUSE="" |
79 |
+IUSE="static-libs" |
80 |
|
81 |
-RDEPEND="" |
82 |
+RDEPEND=">=sys-libs/libunwind-1.0.1-r1" |
83 |
DEPEND="${RDEPEND} |
84 |
${DEPEND}" |
85 |
|
86 |
-PATCHES=( "${FILESDIR}/0001-Link-to-libdl-where-needed-for-dladdr-exception.cc.patch" ) |
87 |
- |
88 |
src_prepare() { |
89 |
base_src_prepare |
90 |
+ cp "${FILESDIR}/Makefile" src/ || die |
91 |
+ cp "${FILESDIR}/Makefile.test" test/Makefile || die |
92 |
+ rm -f src/unwind* || die |
93 |
+ cp -f "${FILESDIR}/unwind.h" src/ || die |
94 |
+} |
95 |
+ |
96 |
+src_compile() { |
97 |
+ # Notes: we build -nodefaultlibs to avoid linking to gcc libs. |
98 |
+ # libcxxrt needs: dladdr (dlopen_lib), libunwind (or libgcc_s but we build |
99 |
+ # over libunwind) and the libc. |
100 |
+ tc-export CC CXX AR |
101 |
+ append-ldflags "-Wl,-z,defs" # make sure we are not underlinked |
102 |
+ cd "${S}/src" |
103 |
+ LIBS="$(dlopen_lib) -lunwind -lc" emake shared |
104 |
+ use static-libs && emake static |
105 |
+} |
106 |
+ |
107 |
+src_test() { |
108 |
+ cd "${S}/test" |
109 |
+ LD_LIBRARY_PATH="${S}/src:${LD_LIBRARY_PATH}" LIBS="-L${S}/src -lcxxrt -lc" emake check |
110 |
} |
111 |
|
112 |
src_install() { |
113 |
# TODO: See README. Maybe hide it in a subdir and let only libcxx know about |
114 |
# it. FreeBSD head installs it in /lib |
115 |
- cd "${CMAKE_BUILD_DIR}" |
116 |
- dolib.so lib/${PN}.so |
117 |
- dolib.a lib/${PN}.a |
118 |
- |
119 |
- cd "${S}" |
120 |
+ dolib.so src/${PN}.so* |
121 |
+ use static-libs && dolib.a src/${PN}.a |
122 |
|
123 |
insinto /usr/include/libcxxrt/ |
124 |
- doins src/cxxabi.h src/unwind*.h |
125 |
+ doins src/cxxabi.h |
126 |
|
127 |
dodoc AUTHORS COPYRIGHT README |
128 |
} |