diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-12-22 17:57:48 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-12-22 17:57:48 +0000 |
commit | a70ef21e01f5b4347262763412a64a5837ec45c3 (patch) | |
tree | 14142023983efa6f53715bc8ba03f7f50bac3fef /sys-libs | |
parent | link tests against libcxxrt if needed since we dont have the linker script in... (diff) | |
download | historical-a70ef21e01f5b4347262763412a64a5837ec45c3.tar.gz historical-a70ef21e01f5b4347262763412a64a5837ec45c3.tar.bz2 historical-a70ef21e01f5b4347262763412a64a5837ec45c3.zip |
bump a new snapshot
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0x160F534A
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libcxx/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libcxx/Manifest | 10 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-0.0_p20131222.ebuild | 169 |
3 files changed, 182 insertions, 5 deletions
diff --git a/sys-libs/libcxx/ChangeLog b/sys-libs/libcxx/ChangeLog index ec54ddd2f608..13f2972c5ced 100644 --- a/sys-libs/libcxx/ChangeLog +++ b/sys-libs/libcxx/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/libcxx # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.36 2013/12/22 17:51:28 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.37 2013/12/22 17:57:43 aballier Exp $ + +*libcxx-0.0_p20131222 (22 Dec 2013) + + 22 Dec 2013; Alexis Ballier <aballier@gentoo.org> + +libcxx-0.0_p20131222.ebuild: + bump a new snapshot 22 Dec 2013; Alexis Ballier <aballier@gentoo.org> libcxx-9999.ebuild: link tests against libcxxrt if needed since we dont have the linker script in diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest index ce6c61bfe481..9dc8ed6956dd 100644 --- a/sys-libs/libcxx/Manifest +++ b/sys-libs/libcxx/Manifest @@ -4,14 +4,16 @@ Hash: SHA256 AUX Makefile 874 SHA256 ba99d3b7b98ed88a64f8370ba2d90e245f8e5ea9bfe302382ef8eeded0ec00b4 SHA512 96eef2e897075bc7d9fc799ce6c54f6a33ee917efd5666376ac578cb16e15d965205630dbd076f92a3a7091d58ecc235e37bc327c211bf3594244981f089135f WHIRLPOOL 0680b69fdc46c0d6fac01fc2fa0b93ff62d167a03b3ce1cc80fbe57ff04356f5ab4e71f0daec517e629697d5e34f295b66e8263f7506eaa347a500b27442933d AUX prepare_snapshot.sh 427 SHA256 9ebf22257a2e296dee41a56b0a721cd1ba459c620009ca8422ba812515ff726f SHA512 ebac2a467f8b1dfb68f1dc46a35f8294d1cf74b70be2a008217fa13b3366ddf4a9f2ebbe611cd63824f42305c5c0304aac2f46386b2956c9e07d82d5d984b435 WHIRLPOOL 232a60d6a22f50c424ec9cf6f325bbb4e8e96815ba9dffdad0a5b1b872b19d20126d316ced71956978eb5ce098f72584d21104c14e232330b3893a73e4c3c358 DIST libcxx-0.0_p20130725.tar.xz 833240 SHA256 16428d2a493d2f833bc695300f4fc4e2bfd756fa4eb8e0b7696af10ff5e82653 SHA512 756cb089dc6514125b53623a410039c0edc2fb56a734b7faabee018e073adb96a30f7413546ba42fb40dd815697f27735fbbb6bbcce2e7dea10d284a3ed394d3 WHIRLPOOL 329817e70c27e13d37d75d3d15f0b49375e59d660d784b2e174b059046090a2514d7ddd39ac8fc917da784899f7d394842e73f7c81301d4fdf9add74d259f086 +DIST libcxx-0.0_p20131222.tar.xz 872416 SHA256 d77b7555daa368a493a71c99d9d5868706cc3a66a4e37e002a860733407d21ee SHA512 d4466a4e66365d38c552813f9d4be251bbc956ca0f2800dcd08b3d5633e6bd1a48601016e0e63a92cb4cd2f7863b31ece0ce9b68f2de2c76cf457a7093920fec WHIRLPOOL 07acd16939694e2cfc946f8f021a2b8a4d4ae40dfe2128273a6e0c76b9a2ac8d9f2e6347d091861219044674ea02b76caf80b3f55f74e8e504c58fe96b19eb91 EBUILD libcxx-0.0_p20130725.ebuild 5329 SHA256 8e2ea353ccbd357b099fa67bab9ce7f7847e58a6245b405f203ca644acc61f29 SHA512 b83a2f38caa6b979cd3b352ccf90a61e647e677e09602cf7b5fa100b18b6590c40587a34fc46c12b0bb494d82648cb2070dd8845d95d78f2539a856e79137a7a WHIRLPOOL 8df3b96cf5c99aaad8b326569f510cad1989ded4f26cb2b52bfbdfbdf15e3d9a570ae9c2feba4171313eb5695c2e9382a325f646d8832c534eb21264e55a2ad0 +EBUILD libcxx-0.0_p20131222.ebuild 5395 SHA256 b4784f80e6d4825e1b56193def3d36a1070b8809fe8e623e8c790f830fbf4582 SHA512 4bdab406c43c4444a34f4daa2d4c5a0678a0ddfe3196230119f5b6e52f308771eebd966e9d65533eb9dec38b6c0321714ff0dccc85ea7ac099a6b9d1ba0e456b WHIRLPOOL 844f4693765054159f3c8fca4b11e44aae50e5473c271364e5675b38b0c68669af5c8c4a2d4f3a494ee043dbdd88f1f753d8fb8c2bdb850cd63205b07c913be2 EBUILD libcxx-9999.ebuild 5387 SHA256 5007f071b37412fe5251a2c7e71ea7305c337dee1ac99ac7b41faab9950c25de SHA512 6abd4b7df82f0ac45e651c63943fa4cf7b62250d417753b4dbcd216af41e6cb7658340a19449f1f1c4e212c9ea9a0c11cbe4831d4ef3df12a4d83a42e6c3d8d7 WHIRLPOOL 44a9b506020b3bedc63294fe4115f12f72e242632e776ab615c0b57b2fa3782072a31c258d5603de62bd54cef02a87e67187bba48950d9cd470cd59f24f85296 -MISC ChangeLog 5902 SHA256 b5d5cc66b3c530464bc459386c2ac014c4216bab558a2f5f021ed6abf9191979 SHA512 b100ada29c3a42b74dd1b22c193fe4c50773ed25698ed9b273c54c92a68ba0094c45c574f8bdc6d097cef41412b9dbb87dc2c99fefcc7dd0ac5858bee1d5401c WHIRLPOOL 98bd3f8e6d9b15f1c30332929f0631f259ae2bda4fc66d32138adcf7e49cee68e5a866b6b419c36fa8a438d65f36b46794242701c0b75c8a3d7a4b2cc7eeed0f +MISC ChangeLog 6046 SHA256 ef668ba3986d83355cdf27a53f959dd73d6740ab3cb2bb5772432b2bf98f687b SHA512 0d386ec8bbb4e2ab8c91bb5c697bf02b395f65a69aba5f4efeb2e77dfc94eceae96e40fc1ed0f66af274d1c762fdd0df26d49981dd36f3435bac7817bbef381d WHIRLPOOL 9590da20ee4a22d781a632a85013dc54e650150dc206d41e87726aa840552acb046a7635095668acb289d32ae2f498004bc626e8144cd9835c1de14bfac76414 MISC metadata.xml 558 SHA256 c9fe7077a8c7f767d7cdbe154d85dd344fb86ea246b16613242c70a40f3e1ef2 SHA512 3f324c4959a7c9f2613b29928957fd010b35c6e9c1601f0296e7e8b7c8d59a3c27c5c04fef87ac825f2f7bb07553bc617c4405e1e22847dc8db3e7a1ebb21f50 WHIRLPOOL 3ade5e3852afcd533c89ce0aeead55101f23d1b31825718bfccd60fac485961df617c93962be4c60333a21335dcd6bb5630c8002fe06f456c4e177c14d434455 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlK3JqEACgkQvFcC4BYPU0q7RACgl/6WyuNDFq8sCo1H6LxvEKVw -rEIAnimGH4/3mmHPjmYRY5bzvZH+1pYb -=RYDi +iEYEAREIAAYFAlK3KBgACgkQvFcC4BYPU0q7zgCfUjz/f1Uti/T3mRDLob7bKvpK +RJIAoM6k3Q1L6iy66b272czxicVNlp3E +=Ybn8 -----END PGP SIGNATURE----- diff --git a/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild b/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild new file mode 100644 index 000000000000..fdd9ceea1369 --- /dev/null +++ b/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild,v 1.1 2013/12/22 17:57:43 aballier Exp $ + +EAPI=5 + +ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk" + +[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM="" + +inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal + +DESCRIPTION="New implementation of the C++ standard library, targeting C++11" +HOMEPAGE="http://libcxx.llvm.org/" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" +else + SRC_URI="" +fi + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="" +fi +IUSE="elibc_glibc +libcxxrt static-libs test" + +RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130530[static-libs?,${MULTILIB_USEDEP}] ) + !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )" +DEPEND="${RDEPEND} + test? ( sys-devel/clang ) + app-arch/xz-utils" + +DOCS=( CREDITS.TXT ) + +pkg_setup() { + if ! use libcxxrt ; then + ewarn "You have disabled USE=libcxxrt. This will build ${PN} against" + ewarn "libsupc++. Please note that this is not well supported." + ewarn "In particular, static linking will not work." + fi + if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then + eerror "${PN} needs to be built with clang++ or gcc-4.7 or later." + eerror "Please use gcc-config to switch to gcc-4.7 or later version." + die + fi +} + +src_prepare() { + cp -f "${FILESDIR}/Makefile" lib/ || die + multilib_copy_sources +} + +src_configure() { + export LIBS="-lpthread -lrt -lc -lgcc_s" + if use libcxxrt ; then + append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/" + LIBS="-lcxxrt ${LIBS}" + cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include" + else + # Very hackish, see $HOMEPAGE + # If someone has a clever idea, please share it! + 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' ' ')" + local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')" + append-cppflags -D__GLIBCXX__ ${includes} + LIBS="-lsupc++ ${LIBS}" + 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" + for i in ${libsupcxx_includes} ; do + local found="" + [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})" + for j in ${libcxx_gcc_dirs} ; do + if [ -f "${j}/${i}" ] ; then + cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die + found=yes + fi + done + [ -n "${found}" ] || die "Header not found: ${i}" + done + fi + + tc-export AR CC CXX + + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked +} + +multilib_src_compile() { + cd "${BUILD_DIR}/lib" || die + emake shared + use static-libs && emake static +} + +# Tests fail for now, if anybody is able to fix them, help is very welcome. +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \ + CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \ + HEADER_INCLUDE="-I${BUILD_DIR}/include" \ + SOURCE_LIB="-L${BUILD_DIR}/lib" \ + LIBS="-lm $(usex libcxxrt -lcxxrt "")" \ + ./testit || die + # TODO: fix link against libsupc++ +} + +# Usage: deps +gen_ldscript() { + local output_format + output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') + [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" + + cat <<-END_LDSCRIPT +/* GNU ld script + Include missing dependencies +*/ +${output_format} +GROUP ( $@ ) +END_LDSCRIPT +} + +gen_static_ldscript() { + if use libcxxrt ; then + # Move it first. + mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die + + # Generate libc++.a ldscript for inclusion of its dependencies so that + # clang++ -stdlib=libc++ -static works out of the box. + local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a" + # On Linux/glibc it does not link without libpthread or libdl. It is + # fine on FreeBSD. + use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a" + + gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a" + fi + # TODO: Generate a libc++.a ldscript when building against libsupc++ +} + +gen_shared_ldscript() { + if use libcxxrt ; then + mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die + local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so" + gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so" + fi + # TODO: Generate the linker script for other confiurations too. +} + +multilib_src_install() { + cd "${BUILD_DIR}/lib" + if use static-libs ; then + dolib.a libc++.a + gen_static_ldscript + fi + dolib.so libc++.so* + gen_shared_ldscript +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/c++/v1 + doins -r include/* +} + +pkg_postinst() { + elog "This package (${PN}) is mainly intended as a replacement for the C++" + elog "standard library when using clang." + elog "To use it, instead of libstdc++, use:" + elog " clang++ -stdlib=libc++" + elog "to compile your C++ programs." +} |