diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-libs/libcxxrt |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-libs/libcxxrt')
-rw-r--r-- | sys-libs/libcxxrt/Manifest | 15 | ||||
-rw-r--r-- | sys-libs/libcxxrt/files/Makefile | 23 | ||||
-rw-r--r-- | sys-libs/libcxxrt/files/Makefile.test | 7 | ||||
-rwxr-xr-x | sys-libs/libcxxrt/files/prepare_snapshot.sh | 16 | ||||
-rw-r--r-- | sys-libs/libcxxrt/libcxxrt-0.0_p20140322.ebuild | 70 | ||||
-rw-r--r-- | sys-libs/libcxxrt/libcxxrt-0.0_p20150423-r1.ebuild | 71 | ||||
-rw-r--r-- | sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild | 71 | ||||
-rw-r--r-- | sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild | 71 | ||||
-rw-r--r-- | sys-libs/libcxxrt/libcxxrt-9999.ebuild | 71 | ||||
-rw-r--r-- | sys-libs/libcxxrt/metadata.xml | 22 |
10 files changed, 437 insertions, 0 deletions
diff --git a/sys-libs/libcxxrt/Manifest b/sys-libs/libcxxrt/Manifest new file mode 100644 index 000000000000..dac620dbc812 --- /dev/null +++ b/sys-libs/libcxxrt/Manifest @@ -0,0 +1,15 @@ +AUX Makefile 513 SHA256 868714ac74fae3d3a4b21efff691d89d38df4b00052c8e788b4188de189ef29e SHA512 acb4b2855ea3912db0d3a26c7f8e7703b865f7e6f17b22a3654d9ac10633fc25fae3ba3995f0f33c106f4eba14ca897e8c6256e339e4d7f1393d8efdee7f4ef4 WHIRLPOOL 5fc7e6ad825bf577115601d1f391c6801df0894bbfb732fea4cbe9997ad797e861af1782a49acabd36835aa933e51a6a9c7b7a991f0993a8896c9232c9436133 +AUX Makefile.test 172 SHA256 af6cadd483849ae47f6ca6db3dfe03df8d5f8437c445f0f9a7fdcfb182fe88e1 SHA512 fc93c26e4df1c5eca2f99ad3058e2d129fa85a876c9d3d6fcc9e456f397455ebd136b88b3c0ed8d27003dc7a00a985094b6c711fb34316d9fef39e1ab2aadaba WHIRLPOOL 2fc180ce685c865748f57f9af00f74bacfd3ff73c0c1731d5b691f965724aaab13eaf8b33fd8d666abf889141eb1b194f6aa5bfe2386e4cd904ef77d4bc76d82 +AUX prepare_snapshot.sh 428 SHA256 78dabae151512d1b29d7f25324ee986e0ea7adbf7f39c35a8ce660a9981c32a5 SHA512 2fc1391df1178a1f6e2e29243731a0630e43718e7e525f95f8dcea3c9909905e86cba1cd9063c396be0a076965b6c3c1cfaac899ba6e30c9cf4f90e237fb5b25 WHIRLPOOL c474174085b772a781eb19c5eaba770a2c73640ee8aa14e3757b2b22fffa772a2d6041ba2be77fd35b46f87522f23de36e183386e72eac44ea05c862fdef7866 +DIST libcxxrt-0.0_p20140322.tar.xz 58208 SHA256 39392e1081710d7bf62de1a9723632adbaed5cd516e8b27af764195b8ea9aeb0 SHA512 8cc2f3779a28b8eb215c3dc97e1382651016127ec6b1feb5067de435841c20e6338662172176f003242f1393b8df3ecf91eaa85b54281e1c588dab44d01ca930 WHIRLPOOL 1e6b105cb6650762025f3ce0b6853eff84c94d6fb6c34269b6e3d92984c66308d59c20f2b4311cafea24928f0e3e645527ea6b041b939e941a05f2fea9a2c02e +DIST libcxxrt-0.0_p20150423.tar.xz 58596 SHA256 a633256ffe43261dd873866aa4a0be9aaa8bdd38f8d554f16c209e84be2f1a88 SHA512 67a3b9204cee7b7900228483b8e24898d83f76b3ff2ed94bbbd67ca3fba623021e1b346c91ef46955da78f2e001395dc84a2f496223b52a0e59e97ff2e27e247 WHIRLPOOL bcf34a715b7aafa4169d39f045896be9230d3365dfffc422d91af160c64a254561a7f2e67bcdc35b4e2a2032a9d1c5e87eeebbc5c40607737f5715bbeeb4b530 +DIST libcxxrt-0.0_p20160922.tar.xz 60460 SHA256 be52f2e5a57344bd856e5dd155eaec5e4606edb0118f1ad4cadc2f2bd00d394e SHA512 3ec60ef2127a7e51793f90291ef61c6853d9a7b23201617f9dde0d27d987901db5ad0b142e3adb3eee64884e11793676912f2fb8e8b090d35288277a54d261bd WHIRLPOOL 841f21edaa8fc7aac4636826b7510b7f35cd5c5d580d5f13b1b06b00b101e2f097cec3f073463275fe54fbd337aa3e08f254be4fdacf9155ca8b625c0beb4f0e +DIST libcxxrt-0.0_p20170515.tar.xz 60488 SHA256 b0549563834ed6eb3a7b78dc2905639c287bc297f03e2e5113738eb579c517d0 SHA512 cf0539ca8f836adadf83195784ad008008faea2b0dd8953191fa1012d542f10f546eb58ecc42fa8e864c1113530a6bceb28a8005aa62276570343a3aaba09266 WHIRLPOOL 40ff2b30047b4a2c687446902d601cff9e88c6a35a6a691e853f264e263f974adc9a2dd69830feeb29567655a09f3b7d00abcb196fbc7e9f696be85e455194b3 +EBUILD libcxxrt-0.0_p20140322.ebuild 1948 SHA256 ef35e38ed0e216ad7f21a411848bec483a34de198737ecd870ef09a8e5b396c9 SHA512 cd45ca0995e24113b1a14b3a068297f7dd1ae8217e873633429636902c93d4dbe98fa6949df81997c90bc15681442abc34859f179a8320ebbd193269330e63a9 WHIRLPOOL fef1911093525bb24b89d98c8e8fc4eb6247c90ec615d2cbfe6ceea90663ab5c24f6cb2c658e165dc71601bce955e2b3d9c53224a4925ef196418f1bc7acf291 +EBUILD libcxxrt-0.0_p20150423-r1.ebuild 2014 SHA256 f42e47e20cfec143d931eaa6c0735bff87f6597a110ad9fcda5b13589aba04e6 SHA512 8f8a7c32b57a66089d1ea88ed09566459a1038437f9df570dda9ec03cdd4fe9412136b8a2bda2a581dfae26624a5697d207a5adb7aaaeb3e740750a9a3785e13 WHIRLPOOL 288c89f9a769b69cf79535f42d339f0c57748dfb692ae342a81945755032c50d027ef76199aa773dbcb3d7f00355ff2deee38fc8c5d66455490d18ac7f5301f6 +EBUILD libcxxrt-0.0_p20160922.ebuild 2035 SHA256 3c999c057479bdb39644bebe35d00434a3ab069b08d2d51a6b89cd93c50c7f97 SHA512 ce681af3a08dc2d2fdd35009f33e22e5848a14ea072deaa784c8ff303573332f94df7e8dc3ff8c50c130fa5806ac71a7873ffb714b726876be60abe9a8edbac1 WHIRLPOOL 776e7529d4f612c8fb51c35d2ddbe02e8e725ba01204504d8c462373098ac42de74844acbdd54c491177fa5cd70f1b9e73fdcd68e34f7566b4466408bcc55305 +EBUILD libcxxrt-0.0_p20170515.ebuild 2023 SHA256 63cb7b399175e6842d403f662ca334a9248731104afa0a057aedf2d024cf7480 SHA512 31a525a44ccf160025631edd907576d520788f01c3c13141c2b3b0afb077bd1eb2a0c214f98f29d3f6f7f8fb28a02107b17a62cc474fa07c4fdf0771716ba08b WHIRLPOOL 79af389da22ff4f9bfebcf68b6c8204f0b6ea223e5005aa01a43353481a26b263f69a567af2341fd6547973ac74bd603ad865429191b0dae1e2b288600dc7297 +EBUILD libcxxrt-9999.ebuild 2023 SHA256 63cb7b399175e6842d403f662ca334a9248731104afa0a057aedf2d024cf7480 SHA512 31a525a44ccf160025631edd907576d520788f01c3c13141c2b3b0afb077bd1eb2a0c214f98f29d3f6f7f8fb28a02107b17a62cc474fa07c4fdf0771716ba08b WHIRLPOOL 79af389da22ff4f9bfebcf68b6c8204f0b6ea223e5005aa01a43353481a26b263f69a567af2341fd6547973ac74bd603ad865429191b0dae1e2b288600dc7297 +MISC ChangeLog 3553 SHA256 699c0fa1228ba83ec9792787112ed34d7b2e657b5295eb169a8afc52352b5ff1 SHA512 afa7d37a4631b8805d804d8d620b4ab7ccba8d60e4a094ea89ddde15ca0758a725c6f92635b874dfd9030b4e1e158bece0f9d628f6643ccb316d3e954997c6ff WHIRLPOOL 21dcb8058b3f14597dd7f532603646268ab0ba3e081490138576db165b87df021393c39efccfb722189f453ed617c7a344aaa40bb26220483b24daee10f1f8d2 +MISC ChangeLog-2015 4986 SHA256 5066675d8ab4bdd91eea68a397c8ddf1d04a64d7609634342fa93fb73a7c9022 SHA512 376df55f0dd00187bb2e6781cf6754d1a74aeb5295bc360aaeda2c55a025e793d3d12c16188d2b88442dc235c004604148fcaf30d766528f364a309ad16408fe WHIRLPOOL 2eeac44674ca2fdd32df6975f26d4f31e49b8a090f1ebdef13682e99a7919f6c48473a0163e94783445e21f6f15f1275fa884c0aabad3c43531a7bc9bb8950ae +MISC metadata.xml 772 SHA256 527a8f028584a28ebd1255833984176a3a0c7481c40f552256c674970fb54244 SHA512 2740f5561f530ec9053c2e3cc1c32af9b11b61d6b9b1e1babc39d135132bd7fbc0670bcdef274408126c9444e93c9e6f964f7c51316cac06b4a64e177263be7a WHIRLPOOL 4c52d0358ea6c8557f8ebdead0f875a78837104652c0f479ec96ba55c36d2a01a6e4964d287070f3e5d2fd6bb9667a3b5695ea102b2a78945969cc954d99db06 diff --git a/sys-libs/libcxxrt/files/Makefile b/sys-libs/libcxxrt/files/Makefile new file mode 100644 index 000000000000..18b90a7cf712 --- /dev/null +++ b/sys-libs/libcxxrt/files/Makefile @@ -0,0 +1,23 @@ +LIB=cxxrt +MAJ=1 +OBJS=dynamic_cast.o exception.o guard.o stdexcept.o typeinfo.o memory.o auxhelper.o libelftc_dem_gnu3.o +SOBJS=${OBJS:.o=.So} + +static: lib$(LIB).a + +shared: lib$(LIB).so + +%.So: %.cc + $(CXX) -fPIC $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +%.So: %.c + $(CC) -fPIC $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +lib$(LIB).a: $(OBJS) + $(AR) cr $@ $^ + +lib$(LIB).so.$(MAJ): $(SOBJS) + $(CXX) -fPIC -nodefaultlibs $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^ $(LIBS) + +lib$(LIB).so: lib$(LIB).so.$(MAJ) + ln -s $< $@ diff --git a/sys-libs/libcxxrt/files/Makefile.test b/sys-libs/libcxxrt/files/Makefile.test new file mode 100644 index 000000000000..55099426e7b4 --- /dev/null +++ b/sys-libs/libcxxrt/files/Makefile.test @@ -0,0 +1,7 @@ +OBJS=test.o test_exception.o test_guard.o test_typeinfo.o + +cxxrttest: $(OBJS) + $(CXX) -nodefaultlibs $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +check: cxxrttest + ./cxxrttest diff --git a/sys-libs/libcxxrt/files/prepare_snapshot.sh b/sys-libs/libcxxrt/files/prepare_snapshot.sh new file mode 100755 index 000000000000..052076bc3813 --- /dev/null +++ b/sys-libs/libcxxrt/files/prepare_snapshot.sh @@ -0,0 +1,16 @@ +#!/bin/sh +VERSION=$(date +%Y%m%d) +BASE_VERSION="0.0" +PACKAGE="libcxxrt-${BASE_VERSION}_p${VERSION}" + +git clone https://github.com/pathscale/libcxxrt.git ${PACKAGE} + +find "${PACKAGE}" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf +find "${PACKAGE}" -type d -name '.git' -prune -print0 | xargs -0 rm -rf + +tar cJf ${PACKAGE}.tar.xz ${PACKAGE} +rm -rf ${PACKAGE}/ + +echo "Tarball: \"${PACKAGE}.tar.xz\"" + +echo "** all done **" diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20140322.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20140322.ebuild new file mode 100644 index 000000000000..6ff5b6c3500a --- /dev/null +++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20140322.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="https://github.com/pathscale/libcxxrt.git" + +[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" + +inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal + +DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD" +HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" + DEPEND="app-arch/xz-utils" +else + SRC_URI="" +fi + +LICENSE="BSD-2" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="" +fi +IUSE="libunwind static-libs" + +RDEPEND="libunwind? ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + ${DEPEND}" + +DOCS=( AUTHORS COPYRIGHT README ) + +src_prepare() { + cp "${FILESDIR}/Makefile" src/ || die + cp "${FILESDIR}/Makefile.test" test/Makefile || die + multilib_copy_sources +} + +multilib_src_compile() { + # Notes: we build -nodefaultlibs to avoid linking to gcc libs. + # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc. + tc-export CC CXX AR + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked + cd "${BUILD_DIR}/src" + LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared + use static-libs && emake static +} + +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \ + LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \ + emake check +} + +multilib_src_install() { + # TODO: See README. Maybe hide it in a subdir and let only libcxx know about + # it. FreeBSD head installs it in /lib + dolib.so src/${PN}.so* + use static-libs && dolib.a src/${PN}.a +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/libcxxrt/ + doins src/cxxabi.h src/unwind*.h +} diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20150423-r1.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20150423-r1.ebuild new file mode 100644 index 000000000000..3917b71ee0bb --- /dev/null +++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20150423-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="https://github.com/pathscale/libcxxrt.git" + +[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" + +inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal + +DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD" +HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" + DEPEND="app-arch/xz-utils" +else + SRC_URI="" +fi + +LICENSE="BSD-2" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="" +fi +IUSE="libunwind +static-libs" + +RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] + sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )" +DEPEND="${RDEPEND} + ${DEPEND}" + +DOCS=( AUTHORS COPYRIGHT README ) + +src_prepare() { + cp "${FILESDIR}/Makefile" src/ || die + cp "${FILESDIR}/Makefile.test" test/Makefile || die + multilib_copy_sources +} + +multilib_src_compile() { + # Notes: we build -nodefaultlibs to avoid linking to gcc libs. + # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc. + tc-export CC CXX AR + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked + cd "${BUILD_DIR}/src" + LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared + use static-libs && emake static +} + +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \ + LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \ + emake check +} + +multilib_src_install() { + # TODO: See README. Maybe hide it in a subdir and let only libcxx know about + # it. FreeBSD head installs it in /lib + dolib.so src/${PN}.so* + use static-libs && dolib.a src/${PN}.a +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/libcxxrt/ + doins src/cxxabi.h src/unwind*.h +} diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild new file mode 100644 index 000000000000..660db29feecd --- /dev/null +++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="https://github.com/pathscale/libcxxrt.git" + +[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" + +inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal + +DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD" +HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" + DEPEND="app-arch/xz-utils" +else + SRC_URI="" +fi + +LICENSE="BSD-2" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="amd64 ~arm64 ~mips x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="amd64 ~arm64 x86" +fi +IUSE="libunwind +static-libs" + +RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] + sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )" +DEPEND="${RDEPEND} + ${DEPEND}" + +DOCS=( AUTHORS COPYRIGHT README ) + +src_prepare() { + cp "${FILESDIR}/Makefile" src/ || die + cp "${FILESDIR}/Makefile.test" test/Makefile || die + multilib_copy_sources +} + +multilib_src_compile() { + # Notes: we build -nodefaultlibs to avoid linking to gcc libs. + # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc. + tc-export CC CXX AR + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked + cd "${BUILD_DIR}/src" + LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared + use static-libs && emake static +} + +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \ + LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \ + emake check +} + +multilib_src_install() { + # TODO: See README. Maybe hide it in a subdir and let only libcxx know about + # it. FreeBSD head installs it in /lib + dolib.so src/${PN}.so* + use static-libs && dolib.a src/${PN}.a +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/libcxxrt/ + doins src/cxxabi.h src/unwind*.h +} diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild new file mode 100644 index 000000000000..8d68b661f0c3 --- /dev/null +++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="https://github.com/pathscale/libcxxrt.git" + +[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" + +inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal + +DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD" +HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" + DEPEND="app-arch/xz-utils" +else + SRC_URI="" +fi + +LICENSE="BSD-2" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~arm64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="" +fi +IUSE="+libunwind +static-libs" + +RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] + sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )" +DEPEND="${RDEPEND} + ${DEPEND}" + +DOCS=( AUTHORS COPYRIGHT README ) + +src_prepare() { + cp "${FILESDIR}/Makefile" src/ || die + cp "${FILESDIR}/Makefile.test" test/Makefile || die + multilib_copy_sources +} + +multilib_src_compile() { + # Notes: we build -nodefaultlibs to avoid linking to gcc libs. + # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc. + tc-export CC CXX AR + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked + cd "${BUILD_DIR}/src" + LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared + use static-libs && emake static +} + +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \ + LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \ + emake check +} + +multilib_src_install() { + # TODO: See README. Maybe hide it in a subdir and let only libcxx know about + # it. FreeBSD head installs it in /lib + dolib.so src/${PN}.so* + use static-libs && dolib.a src/${PN}.a +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/libcxxrt/ + doins src/cxxabi.h src/unwind*.h +} diff --git a/sys-libs/libcxxrt/libcxxrt-9999.ebuild b/sys-libs/libcxxrt/libcxxrt-9999.ebuild new file mode 100644 index 000000000000..8d68b661f0c3 --- /dev/null +++ b/sys-libs/libcxxrt/libcxxrt-9999.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="https://github.com/pathscale/libcxxrt.git" + +[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM="" + +inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal + +DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD" +HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265" +if [ "${PV%9999}" = "${PV}" ] ; then + SRC_URI="mirror://gentoo/${P}.tar.xz" + DEPEND="app-arch/xz-utils" +else + SRC_URI="" +fi + +LICENSE="BSD-2" +SLOT="0" +if [ "${PV%9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~arm64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +else + KEYWORDS="" +fi +IUSE="+libunwind +static-libs" + +RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] + sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )" +DEPEND="${RDEPEND} + ${DEPEND}" + +DOCS=( AUTHORS COPYRIGHT README ) + +src_prepare() { + cp "${FILESDIR}/Makefile" src/ || die + cp "${FILESDIR}/Makefile.test" test/Makefile || die + multilib_copy_sources +} + +multilib_src_compile() { + # Notes: we build -nodefaultlibs to avoid linking to gcc libs. + # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc. + tc-export CC CXX AR + append-ldflags "-Wl,-z,defs" # make sure we are not underlinked + cd "${BUILD_DIR}/src" + LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared + use static-libs && emake static +} + +multilib_src_test() { + cd "${BUILD_DIR}/test" + LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \ + LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \ + emake check +} + +multilib_src_install() { + # TODO: See README. Maybe hide it in a subdir and let only libcxx know about + # it. FreeBSD head installs it in /lib + dolib.so src/${PN}.so* + use static-libs && dolib.a src/${PN}.a +} + +multilib_src_install_all() { + einstalldocs + insinto /usr/include/libcxxrt/ + doins src/cxxabi.h src/unwind*.h +} diff --git a/sys-libs/libcxxrt/metadata.xml b/sys-libs/libcxxrt/metadata.xml new file mode 100644 index 000000000000..58657121adb2 --- /dev/null +++ b/sys-libs/libcxxrt/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>aballier@gentoo.org</email> + <name>Alexis Ballier</name> + </maintainer> + <maintainer type="project"> + <email>bsd@gentoo.org</email> + <name>BSD Project</name> + </maintainer> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <use> + <flag name="libunwind">Use libunwind instead of libgcc_s for unwinding. This should allow avoiding relying on <pkg>sys-devel/gcc</pkg> but for now clang is setup to use libgcc_s.</flag> + </use> + <upstream> + <remote-id type="github">pathscale/libcxxrt</remote-id> + </upstream> +</pkgmetadata> |