Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 475294 | Differences between
and this patch

Collapse All | Expand All

(-)libcxxrt-0.0_p20130531.ebuild.orig (-7 / +14 lines)
Lines 8-14 Link Here
8
8
9
[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM=""
9
[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM=""
10
10
11
inherit base flag-o-matic toolchain-funcs portability ${SCM}
11
inherit base flag-o-matic toolchain-funcs portability multilib multilib-minimal ${SCM}
12
12
13
DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD."
13
DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD."
14
HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265"
14
HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265"
Lines 36-64 Link Here
36
	base_src_prepare
36
	base_src_prepare
37
	cp "${FILESDIR}/Makefile" src/ || die
37
	cp "${FILESDIR}/Makefile" src/ || die
38
	cp "${FILESDIR}/Makefile.test" test/Makefile || die
38
	cp "${FILESDIR}/Makefile.test" test/Makefile || die
39
	multilib_copy_sources
39
}
40
}
40
41
41
src_compile() {
42
multilib_src_compile() {
42
	# Notes: we build -nodefaultlibs to avoid linking to gcc libs.
43
	# Notes: we build -nodefaultlibs to avoid linking to gcc libs.
43
	# libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc.
44
	# libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc.
44
	tc-export CC CXX AR
45
	tc-export CC CXX AR
45
	append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
46
	append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
46
	cd "${S}/src"
47
	cd "${BUILD_DIR}/src"
47
	LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared
48
	LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared
48
	use static-libs && emake static
49
	use static-libs && emake static
49
}
50
}
50
51
51
src_test() {
52
multilib_src_test() {
52
	cd "${S}/test"
53
	cd "${BUILD_DIR}/test"
53
	LD_LIBRARY_PATH="${S}/src:${LD_LIBRARY_PATH}" LIBS="-L${S}/src -lcxxrt -lc" emake check
54
	if [[ ${ABI} == x86_fbsd ]] && has_multilib_profile ; then
55
		LD_32_LIBRARY_PATH="${BUILD_DIR}/src:${LD_32_LIBRARY_PATH}" LIBS="-L${BUILD_DIR}/src -lcxxrt -lc" emake check
56
	else
57
		LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" LIBS="-L${BUILD_DIR}/src -lcxxrt -lc" emake check
58
	fi
54
}
59
}
55
60
56
src_install() {
61
multilib_src_install() {
57
	# TODO: See README. Maybe hide it in a subdir and let only libcxx know about
62
	# TODO: See README. Maybe hide it in a subdir and let only libcxx know about
58
	# it. FreeBSD head installs it in /lib
63
	# it. FreeBSD head installs it in /lib
59
	dolib.so src/${PN}.so*
64
	dolib.so src/${PN}.so*
60
	use static-libs && dolib.a src/${PN}.a
65
	use static-libs && dolib.a src/${PN}.a
66
}
61
67
68
multilib_src_install_all() {
62
	insinto /usr/include/libcxxrt/
69
	insinto /usr/include/libcxxrt/
63
	doins src/cxxabi.h src/unwind*.h
70
	doins src/cxxabi.h src/unwind*.h
64
71

Return to bug 475294