summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gdb/gdb-7.9.1.ebuild2
-rw-r--r--sys-devel/gettext/Manifest1
-rw-r--r--sys-devel/gettext/gettext-0.19.6.ebuild143
-rw-r--r--sys-devel/kgcc64/Manifest2
-rw-r--r--sys-devel/kgcc64/kgcc64-4.8.5.ebuild56
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch21
-rw-r--r--sys-devel/libtool/libtool-2.4.6-r1.ebuild6
-rw-r--r--sys-devel/libtool/libtool-9999.ebuild6
-rw-r--r--sys-devel/llvm/llvm-3.7.0-r1.ebuild498
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild14
10 files changed, 743 insertions, 6 deletions
diff --git a/sys-devel/gdb/gdb-7.9.1.ebuild b/sys-devel/gdb/gdb-7.9.1.ebuild
index 39fb296344a8..727fcdeed93f 100644
--- a/sys-devel/gdb/gdb-7.9.1.ebuild
+++ b/sys-devel/gdb/gdb-7.9.1.ebuild
@@ -57,7 +57,7 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.x
LICENSE="GPL-2 LGPL-2"
SLOT="0"
if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
IUSE="+client expat lzma multitarget nls +python +server test vanilla zlib"
REQUIRED_USE="
diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index caeed8c20afd..b343363fe105 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,3 +1,4 @@
DIST gettext-0.19.4.tar.gz 17717034 SHA256 8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f SHA512 274e00fe0149468e3073562f8f3b292597e9dbd82dfe8d068e4a1983914d25b603bb26f3fa4aa10e9fcd65826e3552c1871218342270927481e95eb64288ad97 WHIRLPOOL 2eb56c47d76f63b6557ae825538a35ae59f3f77da35321688547d9c420f47879c79ca1ab8ebd6bc6b4a3a8ce59ed620648884cd46455f6218213587f76967918
DIST gettext-0.19.5.1.tar.gz 18353792 SHA256 a198d53b0c1fb11421ead197b7e76b144e887c9ef5a685323e92cbc950227731 SHA512 c2c1dc51d9c24c92b86619ec613b87266eae08a21280855e5b0d44c09e7efc8390341ded85dd85270c5a933ee21a6179373cc5cf275b6bc80cb510c7830d0ef4 WHIRLPOOL 2a2143edc4f3fdb37109aeb762072aa49f88045d55913ae282d203d5a7b3e848df5318c9e4f5e44f63a9f9a7c61c6018900df55b3bdfe06fa975a709322656d6
DIST gettext-0.19.5.tar.gz 18352722 SHA256 1258814ba174e4783194be2dc93648bd630d4dda166eae034e4ad54489dcf73a SHA512 10b435bba4fcdcf15be3182b3c9756eef5b6ef6ec1416c1b12af35345fc1668c26dce81081e2616b7e2b0d174051fddd6fe6266e4709652a751a91fcf241e610 WHIRLPOOL 94db59cc7a1f3bf833e23a9c9aa25524c571b9585928d083438e7357d034236493584c0137f0c2bb58120f2e55f35055bc36731736162d9ad3e01aa6a1cf270e
+DIST gettext-0.19.6.tar.gz 18619659 SHA256 ed4b4c19bd3a3034eb6769500a3592ff616759ef43cf30586dbb7a17c9dd695d SHA512 46adfd4a6d0038aba999658bebe51117e3ab3dc149a9054c1087d3e79ec7ba3371a7e78a8ca30a8872d162c2dc44aba6e67e4d64808c4f92e1e2bd674174f1db WHIRLPOOL 1988f9ddfd603734b4a632291925c8e5b31e7384eea1c6641d52aa58cb6b8f892e7664dd145a53435b7d2a4540ac65aeae1cb528a004c35832087c2820dafbcb
diff --git a/sys-devel/gettext/gettext-0.19.6.ebuild b/sys-devel/gettext/gettext-0.19.6.ebuild
new file mode 100644
index 000000000000..c024c12229fe
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.19.6.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal
+
+DESCRIPTION="GNU locale utilities"
+HOMEPAGE="https://www.gnu.org/software/gettext/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc elibc_musl"
+
+# only runtime goes multilib
+DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ dev-libs/libxml2
+ dev-libs/expat
+ acl? ( virtual/acl )
+ ncurses? ( sys-libs/ncurses )
+ java? ( >=virtual/jdk-1.4 )"
+RDEPEND="${DEPEND}
+ !git? ( cvs? ( dev-vcs/cvs ) )
+ git? ( dev-vcs/git )
+ java? ( >=virtual/jre-1.4 )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r11
+ )"
+PDEPEND="emacs? ( app-emacs/po-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # only installed for native ABI
+ /usr/include/gettext-po.h
+)
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epunt_cxx
+ elibtoolize
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # switches common to runtime and top-level
+ --cache-file="${BUILD_DIR}"/config.cache
+ --docdir="/usr/share/doc/${PF}"
+
+ $(use_enable cxx libasprintf)
+ $(use_enable java)
+ $(use_enable static-libs static)
+ )
+
+ # Build with --without-included-gettext (on glibc systems)
+ if use elibc_glibc || use elibc_musl ; then
+ myconf+=(
+ --without-included-gettext
+ $(use_enable nls)
+ )
+ else
+ myconf+=(
+ --with-included-gettext
+ --enable-nls
+ )
+ fi
+ use cxx || export CXX=$(tc-getCC)
+
+ # Should be able to drop this hack in next release. #333887
+ tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes
+
+ local ECONF_SOURCE=${S}
+ if ! multilib_is_native_abi ; then
+ # for non-native ABIs, we build runtime only
+ ECONF_SOURCE+=/gettext-runtime
+ else
+ # remaining switches
+ myconf+=(
+ # Emacs support is now in a separate package
+ --without-emacs
+ --without-lispdir
+ # glib depends on us so avoid circular deps
+ --with-included-glib
+ # libcroco depends on glib which ... ^^^
+ --with-included-libcroco
+ # this will _disable_ libunistring (since it is not bundled),
+ # see bug #326477
+ --with-included-libunistring
+
+ $(use_enable acl)
+ $(use_enable ncurses curses)
+ $(use_enable openmp)
+ $(use_with git)
+ $(usex git --without-cvs $(use_with cvs))
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi ; then
+ dosym msgfmt /usr/bin/gmsgfmt #43435
+ dobin gettext-tools/misc/gettextize
+
+ [[ ${USERLAND} == "BSD" ]] && gen_usr_ldscript -a intl
+ fi
+}
+
+multilib_src_install_all() {
+ use nls || rm -r "${D}"/usr/share/locale
+ use static-libs || prune_libtool_files --all
+
+ rm -f "${D}"/usr/share/locale/locale.alias "${D}"/usr/lib/charset.alias
+
+ if use java ; then
+ java-pkg_dojar "${D}"/usr/share/${PN}/*.jar
+ rm -f "${D}"/usr/share/${PN}/*.jar
+ rm -f "${D}"/usr/share/${PN}/*.class
+ if use doc ; then
+ java-pkg_dojavadoc "${D}"/usr/share/doc/${PF}/javadoc2
+ rm -rf "${D}"/usr/share/doc/${PF}/javadoc2
+ fi
+ fi
+
+ if use doc ; then
+ dohtml "${D}"/usr/share/doc/${PF}/*.html
+ else
+ rm -rf "${D}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
+ fi
+ rm -f "${D}"/usr/share/doc/${PF}/*.html
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest
index 685777dde8fc..a47a084bdff2 100644
--- a/sys-devel/kgcc64/Manifest
+++ b/sys-devel/kgcc64/Manifest
@@ -28,6 +28,8 @@ DIST gcc-4.8.2-patches-1.0.tar.bz2 15931 SHA256 868723027ed356a9ea69771e3232aa53
DIST gcc-4.8.2.tar.bz2 85999682 SHA256 09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8 SHA512 2a3927481707b3bb7171076b596d9b69084edac82460df6fb35395592dd1e8fc5665577702ca746d5b454dec68b1c4e31b9de6adc9865d482f4b8736ec648b10 WHIRLPOOL 5ebe564faf13634e7f2744dc13421ce0a3faa06b35d425f4b6983e74a4e93b4c21955823013f7a5530e7ea9e9d0ecfd68cb79950e94333ed3e44aaa4dfbdefe7
DIST gcc-4.8.3-patches-1.1.tar.bz2 19882 SHA256 019cbe76f20f4e294b900ccb99a6b52553ed04fa0d2993798b3a07b0e4a8f90a SHA512 8512ec54fb2d482e08ca54042e11c6334d653ec850cc7c920ed95654575222ac0303caa35cd46e80f1985d86cd229f35e26e0eaca1ae623fd8d336940148801c WHIRLPOOL d7b8d6278b6f79aa00fcd29ed6142cad3002def33edb0be44e638d50cb3b1fa8da72fa62a7276c81c94cd873c872dd0e7fd602022420d9601fde8f2b04872ece
DIST gcc-4.8.3.tar.bz2 86126808 SHA256 6a8e4f11b185f4fe2ed9d7fc053e80f8c7e73f800c045f51f9d8bea33f080f1e SHA512 2b40d231e8445f9c1654137df509f09ce1187b475138ca7f648f710d922a1718f740b2d8a37c26e16b5e27900c60358be98229ae884a6f1f70e9df44ad24d02b WHIRLPOOL 6dd3bd4b51bb9b8c52fb743bba28cde8612ff7090b71e56bf02d3613b91cd4c3c4dd91dbcb672985f22400d776870ba55550e1fc44afae9737092ceca5f83ebd
+DIST gcc-4.8.5-patches-1.3.tar.bz2 26025 SHA256 4a165e6a387421f581f49c742243bf013c9fb7c91f44514be7b38292178ebbb4 SHA512 8d190f81ca0d25281250dbf0a670fcf12334b0811a5bf664e6450942a2996d02b979c6e8f8760b287edad06df3d1f8e2fe5cb0c3dcf9677c3420457d841d9506 WHIRLPOOL d31b3f48e13e5a9292b704afc745cbea038e61eedc4dba0d659558b56feeafec118043f3430457f71dc938760d72860e4318b2238b3bee9fba069c740327b78a
+DIST gcc-4.8.5.tar.bz2 86165587 SHA256 22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23 SHA512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea WHIRLPOOL 026253cd2f3706871dfe2525c0302b38b3f513f6a62666d0ba0ca2e62d6513f09ad5c1177f2a63ae3bad660fe60e7909b6930d26df2b367b9ec68e14552c6e11
DIST gcc-4.9.1-patches-1.0.tar.bz2 18918 SHA256 5addded7684318fd7ad16dba5a1407c27938ba803cec29b5376c32aaf432a36e SHA512 ade6f02a5d26f201c9d5a01da1174f803309358e49e9b93c848a4239f90b6301bc863951af25daf0188d68088fe8a02653391453158c1846751ddf2f286ee9da WHIRLPOOL 3b5f0f39c925d379a2db35b5335ed3fd7d456fd19fdeb315c87ba307e3ab6e8e8ebf29f8db894c43e3ea26a4318d4ca7ff47c635351a7f38aaa2afc33e3016cc
DIST gcc-4.9.1.tar.bz2 89854120 SHA256 d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e SHA512 8598106a4b7c03bb4d6e29fa1bfa9ee6b6390d1f1bca86c1ccd27aed830ae1d126daa50c4041016cbfa76090dd66c51f1ce06958b8ccd6c3be51eae875125593 WHIRLPOOL 45c663aca6fe3212cf6ff34611df3041204b942aedf5005b133f6ab4c40c994d405a9356429a06279b533706960d8ef80f363dd4ee7e78848052e621c49ad681
DIST gcc-4.9.2-patches-1.2.tar.bz2 19658 SHA256 8cc5f7a82aca3fdee3c4f8b3542ba7a4431dfe5e511b6c11232d830bfa01d998 SHA512 9fca6ee31c817d667f01954bc517a4c4d5bd13b796253f111ef87a5a0eab01ae9b19c8f60c9074fbdfc81763886bc05fa2aae4cb3c5cbe01901e4a5791cecf6f WHIRLPOOL ea46cf1f779aff553beb28a4118a223af10ec44ff67cfdbc50514202b40799ccf641bb8d45e67c3935eaf231b03c738ca965bd16b2c2569b6f184a240d3bc56f
diff --git a/sys-devel/kgcc64/kgcc64-4.8.5.ebuild b/sys-devel/kgcc64/kgcc64-4.8.5.ebuild
new file mode 100644
index 000000000000..b7dd9fd58911
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-4.8.5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+case ${CHOST} in
+ hppa*) CTARGET=hppa64-${CHOST#*-};;
+ mips*) CTARGET=${CHOST/mips/mips64};;
+ powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
+ s390*) CTARGET=${CHOST/s390/s390x};;
+ sparc*) CTARGET=${CHOST/sparc/sparc64};;
+ i?86*) CTARGET=x86_64-${CHOST#*-};;
+esac
+export CTARGET
+TOOLCHAIN_ALLOWED_LANGS="c"
+GCC_TARGET_NO_MULTILIB=true
+
+PATCH_VER="1.3"
+GCC_FILESDIR=${FILESDIR/${PN}/gcc}
+
+inherit eutils toolchain
+
+DESCRIPTION="64bit kernel compiler"
+
+# Works on mips and sparc; all other archs, refer to bug #228115
+KEYWORDS="~hppa ~sparc"
+
+RDEPEND=">=dev-libs/gmp-4.3.2
+ >=dev-libs/mpfr-2.4.2
+ >=dev-libs/mpc-0.8.1
+ >=sys-devel/gcc-config-1.4"
+# unlike every other target, hppa has not unified the 32/64 bit
+# ports in binutils yet
+DEPEND="${RDEPEND}
+ hppa? ( sys-devel/binutils-hppa64 )
+ !sys-devel/gcc-hppa64
+ !sys-devel/gcc-mips64
+ !sys-devel/gcc-powerpc64
+ !sys-devel/gcc-sparc64
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/bison-1.875"
+
+pkg_postinst() {
+ toolchain_pkg_postinst
+
+ cd "${ROOT}"/usr/bin
+ local x
+ for x in gcc cpp ; do
+ cat <<-EOF >${CTARGET%%-*}-linux-${x}
+ #!/bin/sh
+ exec ${CTARGET}-${x} "\$@"
+ EOF
+ chmod a+rx ${CTARGET%%-*}-linux-${x}
+ done
+}
diff --git a/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch
index eb8ee07b6c9a..c352d52aac3b 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch
@@ -29,6 +29,25 @@ index d5cf07a..0fc8279 100644
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
+
+patch the generated file too to keep help2man from generating man pages
+https://bugs.gentoo.org/556512
+
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -5360,10 +5360,12 @@ func_mode_link ()
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
++ # -fuse-ld=* Linker select flags for GCC
+ # -stdlib=* select c++ std lib with clang
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++ -fuse-ld=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
--
2.3.2
-
diff --git a/sys-devel/libtool/libtool-2.4.6-r1.ebuild b/sys-devel/libtool/libtool-2.4.6-r1.ebuild
index 5dbc9f92a2a1..677db335de65 100644
--- a/sys-devel/libtool/libtool-2.4.6-r1.ebuild
+++ b/sys-devel/libtool/libtool-2.4.6-r1.ebuild
@@ -53,6 +53,12 @@ src_prepare() {
popd >/dev/null
AT_NOELIBTOOLIZE=yes eautoreconf
epunt_cxx
+
+ # Make sure timestamps don't trigger a rebuild of man pages. #556512
+ if [[ ${PV} != "9999" ]] ; then
+ touch doc/*.1
+ export HELP2MAN=false
+ fi
}
src_configure() {
diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild
index 923f8b49ee57..8b6ede52b1cf 100644
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ b/sys-devel/libtool/libtool-9999.ebuild
@@ -50,6 +50,12 @@ src_prepare() {
popd >/dev/null
AT_NOELIBTOOLIZE=yes eautoreconf
epunt_cxx
+
+ # Make sure timestamps don't trigger a rebuild of man pages. #556512
+ if [[ ${PV} != "9999" ]] ; then
+ touch doc/*.1
+ export HELP2MAN=false
+ fi
}
src_configure() {
diff --git a/sys-devel/llvm/llvm-3.7.0-r1.ebuild b/sys-devel/llvm/llvm-3.7.0-r1.ebuild
new file mode 100644
index 000000000000..068f1b80eaae
--- /dev/null
+++ b/sys-devel/llvm/llvm-3.7.0-r1.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit check-reqs cmake-utils eutils flag-o-matic multilib \
+ multilib-minimal python-r1 toolchain-funcs pax-utils
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="http://llvm.org/"
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
+ lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
+ !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
+
+LICENSE="UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
+ python +static-analyzer test xml video_cards_radeon kernel_Darwin"
+
+COMMON_DEPEND="
+ sys-libs/zlib:0=
+ clang? (
+ python? ( ${PYTHON_DEPS} )
+ static-analyzer? (
+ dev-lang/perl:*
+ ${PYTHON_DEPS}
+ )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ )
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ ocaml? (
+ dev-lang/ocaml:0=
+ dev-ml/findlib
+ dev-ml/ocaml-ctypes )"
+# configparser-3.2 breaks the build (3.3 or none at all are fine)
+DEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ >=sys-devel/make-3.81
+ >=sys-devel/flex-2.5.4
+ >=sys-devel/bison-1.875d
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
+ )
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
+ kernel_Darwin? ( sys-libs/libcxx )
+ clang? ( xml? ( virtual/pkgconfig ) )
+ doc? ( dev-python/sphinx )
+ libffi? ( virtual/pkgconfig )
+ lldb? ( dev-lang/swig )
+ !!<dev-python/configparser-3.3.0.2
+ ocaml? ( test? ( dev-ml/ounit ) )
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ clang? ( !<=sys-devel/clang-${PV}-r99 )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
+
+# pypy gives me around 1700 unresolved tests due to open file limit
+# being exceeded. probably GC does not close them fast enough.
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ lldb? ( clang )
+ test? ( || ( $(python_gen_useflags 'python*') ) )"
+
+S=${WORKDIR}/${P/_}.src
+
+pkg_pretend() {
+ # in megs
+ # !clang !debug !multitarget -O2 400
+ # !clang !debug multitarget -O2 550
+ # clang !debug !multitarget -O2 950
+ # clang !debug multitarget -O2 1200
+ # !clang debug multitarget -O2 5G
+ # clang !debug multitarget -O0 -g 12G
+ # clang debug multitarget -O2 16G
+ # clang debug multitarget -O0 -g 14G
+
+ local build_size=550
+ use clang && build_size=1200
+
+ if use debug; then
+ ewarn "USE=debug is known to increase the size of package considerably"
+ ewarn "and cause the tests to fail."
+ ewarn
+
+ (( build_size *= 14 ))
+ elif is-flagq '-g?(gdb)?([1-9])'; then
+ ewarn "The C++ compiler -g option is known to increase the size of the package"
+ ewarn "considerably. If you run out of space, please consider removing it."
+ ewarn
+
+ (( build_size *= 10 ))
+ fi
+
+ # Multiply by number of ABIs :).
+ local abis=( $(multilib_get_enabled_abis) )
+ (( build_size *= ${#abis[@]} ))
+
+ local CHECKREQS_DISK_BUILD=${build_size}M
+ check-reqs_pkg_pretend
+
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die
+ ebegin "Trying to build a C++11 test program"
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
+ eerror "to gcc-4.7 or an equivalent version supporting C++11."
+ die "Currently active compiler does not support -std=c++11"
+ fi
+ eend ${?}
+ fi
+}
+
+pkg_setup() {
+ pkg_pretend
+}
+
+src_unpack() {
+ default
+
+ if use clang; then
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
+ || die "clang source directory move failed"
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
+ || die "compiler-rt source directory move failed"
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
+ || die "clang-tools-extra source directory move failed"
+ fi
+
+ if use lldb; then
+ mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
+ || die "lldb source directory move failed"
+ fi
+}
+
+src_prepare() {
+ # Make ocaml warnings non-fatal, bug #537308
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
+ # Fix libdir for ocaml bindings install, bug #559134
+ epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch
+
+ # Make it possible to override Sphinx HTML install dirs
+ # https://llvm.org/bugs/show_bug.cgi?id=23780
+ epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
+
+ # Prevent race conditions with parallel Sphinx runs
+ # https://llvm.org/bugs/show_bug.cgi?id=23781
+ epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
+
+ # Prevent installing libgtest
+ # https://llvm.org/bugs/show_bug.cgi?id=18341
+ epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
+
+ if use clang; then
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
+
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
+
+ sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
+ tools/clang/tools/scan-build/scan-build || die
+
+ # Install clang runtime into /usr/lib/clang
+ # https://llvm.org/bugs/show_bug.cgi?id=23792
+ epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
+ epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
+
+ # Make it possible to override CLANG_LIBDIR_SUFFIX
+ # (that is used only to find LLVMgold.so)
+ # https://llvm.org/bugs/show_bug.cgi?id=23793
+ epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
+
+ # Fix WX sections, bug #421527
+ find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \
+ -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
+ -i {} \; || die
+ fi
+
+ if use lldb; then
+ # Do not install dummy readline.so module from
+ # https://llvm.org/bugs/show_bug.cgi?id=18841
+ sed -e 's/add_subdirectory(readline)/#&/' \
+ -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
+ fi
+
+ # User patches
+ epatch_user
+
+ python_setup
+
+ # Native libdir is used to hold LLVMgold.so
+ NATIVE_LIBDIR=$(get_libdir)
+}
+
+multilib_src_configure() {
+ local targets
+ if use multitarget; then
+ targets=all
+ else
+ targets='host;CppBackend'
+ use video_cards_radeon && targets+=';AMDGPU'
+ fi
+
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$(pkg-config --cflags-only-I libffi)
+ ffi_ldflags=$(pkg-config --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ "${mycmakeargs[@]}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_ENABLE_TIMESTAMPS=OFF
+ -DLLVM_TARGETS_TO_BUILD="${targets}"
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ -DWITH_POLLY=OFF # TODO
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+ -DHAVE_HISTEDIT_H=$(usex libedit)
+ )
+
+ if use lldb; then
+ mycmakeargs+=(
+ -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
+ -DLLDB_DISABLE_CURSES=$(usex !ncurses)
+ -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
+ )
+ fi
+
+ if ! multilib_is_native_abi || ! use ocaml; then
+ mycmakeargs+=(
+ -DOCAMLFIND=NO
+ )
+ fi
+# Note: go bindings have no CMake rules at the moment
+# but let's kill the check in case they are introduced
+# if ! multilib_is_native_abi || ! use go; then
+ mycmakeargs+=(
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
+ )
+# fi
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=$(usex doc)
+ -DLLVM_ENABLE_SPHINX=$(usex doc)
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+
+ if use clang; then
+ mycmakeargs+=(
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
+ )
+ fi
+
+ if use gold; then
+ mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ if use lldb; then
+ mycmakeargs+=(
+ -DLLDB_DISABLE_PYTHON=$(usex !python)
+ )
+ fi
+
+ else
+ if use clang; then
+ mycmakeargs+=(
+ # disable compiler-rt on non-native ABI because:
+ # 1. it fails to configure because of -m32
+ # 2. it is shared between ABIs so no point building
+ # it multiple times
+ -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+ if use lldb; then
+ mycmakeargs+=(
+ # only run swig on native abi
+ -DLLDB_DISABLE_PYTHON=ON
+ )
+ fi
+ fi
+
+ if use clang; then
+ mycmakeargs+=(
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
+ )
+
+ # -- not needed when compiler-rt is built with host compiler --
+ # cmake passes host C*FLAGS to compiler-rt build
+ # which is performed using clang, so we need to filter out
+ # some flags clang does not support
+ # (if you know some more flags that don't work, let us know)
+ #filter-flags -msahf -frecord-gcc-switches
+ fi
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+ # TODO: not sure why this target is not correctly called
+ multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
+
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
+ pax-mark m "${BUILD_DIR}"/bin/lli
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target
+
+ if use test; then
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local test_targets=( check )
+ # clang tests won't work on non-native ABI because we skip compiler-rt
+ multilib_is_native_abi && use clang && test_targets+=( check-clang )
+ cmake-utils_src_make "${test_targets[@]}"
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/config.h
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ if use clang; then
+ # note: magic applied in multilib_src_install()!
+ CLANG_VERSION=${PV%.*}
+
+ MULTILIB_CHOST_TOOLS+=(
+ /usr/bin/clang
+ /usr/bin/clang++
+ /usr/bin/clang-cl
+ /usr/bin/clang-${CLANG_VERSION}
+ /usr/bin/clang++-${CLANG_VERSION}
+ /usr/bin/clang-cl-${CLANG_VERSION}
+ )
+
+ MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/clang/Config/config.h
+ )
+ fi
+
+ multilib-minimal_src_install
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ if multilib_is_native_abi; then
+ # Install man pages.
+ use doc || doman "${WORKDIR}"/${P}-manpages/*.1
+
+ # Symlink the gold plugin.
+ if use gold; then
+ dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
+ dosym "../../../../$(get_libdir)/LLVMgold.so" \
+ "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
+ fi
+ fi
+
+ # apply CHOST and CLANG_VERSION to clang executables
+ # they're statically linked so we don't have to worry about the lib
+ if use clang; then
+ local clang_tools=( clang clang++ clang-cl )
+ local i
+
+ # cmake gives us:
+ # - clang-X.Y
+ # - clang -> clang-X.Y
+ # - clang++, clang-cl -> clang
+ # we want to have:
+ # - clang-X.Y
+ # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
+ # - clang, clang++, clang-cl -> clang*-X.Y
+ # so we need to fix the two tools
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED%/}/usr/bin/${i}" || die
+ dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
+ dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
+ done
+
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it
+ if ! multilib_is_native_abi; then
+ # non-native? let's replace it with a simple wrapper
+ for i in "${clang_tools[@]}"; do
+ rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
+ cat > "${T}"/wrapper.tmp <<-_EOF_
+ #!${EPREFIX}/bin/sh
+ exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
+ _EOF_
+ newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
+ done
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ insinto /usr/share/vim/vimfiles
+ doins -r utils/vim/*/
+ # some users may find it useful
+ dodoc utils/vim/vimrc
+
+ if use clang; then
+ pushd tools/clang >/dev/null || die
+
+ if use static-analyzer ; then
+ pushd tools/scan-build >/dev/null || die
+
+ dobin ccc-analyzer scan-build
+ dosym ccc-analyzer /usr/bin/c++-analyzer
+ doman scan-build.1
+
+ insinto /usr/share/llvm
+ doins scanview.css sorttable.js
+
+ popd >/dev/null || die
+ fi
+
+ python_inst() {
+ if use static-analyzer ; then
+ pushd tools/scan-view >/dev/null || die
+
+ python_doscript scan-view
+
+ touch __init__.py || die
+ python_moduleinto clang
+ python_domodule *.py Resources
+
+ popd >/dev/null || die
+ fi
+
+ if use python ; then
+ pushd bindings/python/clang >/dev/null || die
+
+ python_moduleinto clang
+ python_domodule *.py
+
+ popd >/dev/null || die
+ fi
+
+ # AddressSanitizer symbolizer (currently separate)
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
+ }
+ python_foreach_impl python_inst
+ popd >/dev/null || die
+ fi
+}
+
+pkg_postinst() {
+ if use clang; then
+ elog "To enable OpenMP support in clang, install sys-libs/libomp"
+ elog "and use the '-fopenmp=libomp' command line option"
+ fi
+}
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 325a857ef1d6..1d0a6e61a795 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -30,7 +30,7 @@ COMMON_DEPEND="
dev-lang/perl:*
${PYTHON_DEPS}
)
- xml? ( dev-libs/libxml2:2= )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
)
gold? ( >=sys-devel/binutils-2.22:*[cxx] )
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
@@ -196,9 +196,6 @@ src_prepare() {
find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \
-e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
-i {} \; || die
-
- # Workaround bug #553416 until upstream fixes it
- epatch "${FILESDIR}"/clang-3.7-strip_doc_refs.patch
fi
if use lldb; then
@@ -285,6 +282,8 @@ multilib_src_configure() {
-DLLVM_ENABLE_SPHINX=$(usex doc)
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ -DLLVM_INSTALL_UTILS=ON
)
if use clang; then
@@ -500,3 +499,10 @@ multilib_src_install_all() {
popd >/dev/null || die
fi
}
+
+pkg_postinst() {
+ if use clang; then
+ elog "To enable OpenMP support in clang, install sys-libs/libomp"
+ elog "and use the '-fopenmp=libomp' command line option"
+ fi
+}