parent
d3c928b471
commit
0ac52c964d
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST gpgme-1.13.0.tar.bz2 1820504 BLAKE2B 71fbb034e3c5939d1953554ccbe0e89e2089c53a4c79e90ee51bdf96500bf4be8a5e1633772ab8dadd44616dde7be551ad7d3af0a59d7e1df10a19cd9cf56baa SHA512 47a7a67dcc6d111cddd805d288d42e870948114a6dc09ce0675ad8b3d1580bbc2a683e1e70cb2f416919cf2129c72a9ff30e2e3b9527809d04e863cc1f87267b
|
||||
DIST gpgme-1.13.1.tar.bz2 1759616 BLAKE2B 17fff261ab76b72e096aa42cc847443bfd3bbf0eb6d04af1d38561ddce1d11cfe9a98b6ced268b28f33e2cb7d900a9e6b3dfc56f1c784a021dbefbf493522e70 SHA512 11de670c6cf512508103fe67af56d9fbb2a9dda6fc6fa3cd321371bbe337c7c2c81913ca557d07187adb2a63d37ea1a44da97ab22345bbe6022c405d0cb083b8
|
||||
DIST gpgme-1.14.0.tar.bz2 1678910 BLAKE2B 75051166b1f3777d630236c5afbd1786df238272b7ccfd053c5a4b2a207ba146550f6be46c1211f3bacbe19fee2f67adbc5be558d69175c19230a1a02e32d9f2 SHA512 b7ffa30a046c75215e1c73e2f34e5e65532e4dcf6bea55796adc6f82fd38dafe264bcd4332b2001155d6f9476d6fd82a77112dad31c1bb29db9ddefc532ae668
|
||||
|
@ -0,0 +1,110 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
DISTUTILS_OPTIONAL=1
|
||||
|
||||
inherit distutils-r1 flag-o-matic libtool qmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
|
||||
HOMEPAGE="http://www.gnupg.org/related_software/gpgme"
|
||||
SRC_URI="mirror://gnupg/gpgme/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="1/11" # subslot = soname major version
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="common-lisp static-libs +cxx python qt5"
|
||||
|
||||
RDEPEND=">=app-crypt/gnupg-2
|
||||
>=dev-libs/libassuan-2.5.3:=
|
||||
>=dev-libs/libgpg-error-1.29:=
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
qt5? ( dev-qt/qtcore:5 )"
|
||||
#doc? ( app-doc/doxygen[dot] )
|
||||
DEPEND="${RDEPEND}
|
||||
qt5? ( dev-qt/qttest:5 )"
|
||||
BDEPEND="python? ( dev-lang/swig )"
|
||||
|
||||
REQUIRED_USE="qt5? ( cxx ) python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
do_python() {
|
||||
if use python; then
|
||||
pushd "lang/python" > /dev/null || die
|
||||
top_builddir="../.." srcdir="." CPP=$(tc-getCPP) distutils-r1_src_${EBUILD_PHASE}
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
addpredict /run/user/$(id -u)/gnupg
|
||||
|
||||
local MAX_WORKDIR=66
|
||||
if [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
|
||||
ewarn "Disabling tests as WORKDIR '${WORKDIR}' is longer than ${MAX_WORKDIR} which will fail tests"
|
||||
SKIP_TESTS=1
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
elibtoolize
|
||||
|
||||
# Make best effort to allow longer PORTAGE_TMPDIR
|
||||
# as usock limitation fails build/tests
|
||||
ln -s "${P}" "${WORKDIR}/b"
|
||||
S="${WORKDIR}/b"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local languages=()
|
||||
use common-lisp && languages+=( "cl" )
|
||||
use cxx && languages+=( "cpp" )
|
||||
if use qt5; then
|
||||
languages+=( "qt" )
|
||||
#use doc ||
|
||||
export DOXYGEN=true
|
||||
export MOC="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$([[ -n "${SKIP_TESTS}" ]] && echo "--disable-gpg-test --disable-gpgsm-test") \
|
||||
--enable-languages="${languages[*]}" \
|
||||
$(use_enable static-libs static)
|
||||
|
||||
use python && make -C lang/python prepare
|
||||
|
||||
do_python
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
do_python
|
||||
}
|
||||
|
||||
src_test() {
|
||||
[[ -z "${SKIP_TESTS}" ]] || return
|
||||
|
||||
default
|
||||
if use python; then
|
||||
test_python() {
|
||||
emake -C lang/python/tests check \
|
||||
PYTHON=${EPYTHON} \
|
||||
PYTHONS=${EPYTHON} \
|
||||
TESTFLAGS="--python-libdir=${BUILD_DIR}/lib"
|
||||
}
|
||||
python_foreach_impl test_python
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
do_python
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
# backward compatibility for gentoo
|
||||
# in the past we had slots
|
||||
dodir /usr/include/gpgme
|
||||
dosym ../gpgme.h /usr/include/gpgme/gpgme.h
|
||||
}
|
Binary file not shown.
@ -1,204 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools bash-completion-r1 eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="Fast, dense and secure container management"
|
||||
HOMEPAGE="https://linuxcontainers.org/lxd/introduction/ https://github.com/lxc/lxd"
|
||||
SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
|
||||
|
||||
# Needs to include licenses for all bundled programs and libraries.
|
||||
LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+ipv6 nls"
|
||||
|
||||
DEPEND="app-arch/xz-utils
|
||||
>=app-emulation/lxc-3.0.0[seccomp]
|
||||
dev-lang/tcl
|
||||
dev-libs/libuv
|
||||
dev-libs/lzo
|
||||
net-dns/dnsmasq[dhcp,ipv6?]"
|
||||
RDEPEND="${DEPEND}
|
||||
acct-group/lxd
|
||||
net-firewall/ebtables
|
||||
net-firewall/iptables[ipv6?]
|
||||
sys-apps/iproute2[ipv6?]
|
||||
sys-fs/fuse:0=
|
||||
sys-fs/lxcfs
|
||||
sys-fs/squashfs-tools
|
||||
virtual/acl"
|
||||
BDEPEND="dev-lang/go
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
CONFIG_CHECK="
|
||||
~BRIDGE
|
||||
~DUMMY
|
||||
~IP6_NF_NAT
|
||||
~IP6_NF_TARGET_MASQUERADE
|
||||
~IPV6
|
||||
~IP_NF_NAT
|
||||
~IP_NF_TARGET_MASQUERADE
|
||||
~MACVLAN
|
||||
~NETFILTER_XT_MATCH_COMMENT
|
||||
~NET_IPGRE
|
||||
~NET_IPGRE_DEMUX
|
||||
~NET_IPIP
|
||||
~NF_NAT_MASQUERADE_IPV4
|
||||
~VSOCKETS
|
||||
~VXLAN
|
||||
"
|
||||
|
||||
# Uses internet connection.
|
||||
RESTRICT="test"
|
||||
|
||||
# Go magic.
|
||||
QA_PREBUILT="/usr/lib/lxd/libdqlite.so.0.0.1
|
||||
/usr/bin/fuidshift
|
||||
/usr/bin/lxc
|
||||
/usr/bin/lxc-to-lxd
|
||||
/usr/bin/lxd-agent
|
||||
/usr/bin/lxd-benchmark
|
||||
/usr/bin/lxd-p2c
|
||||
/usr/sbin/lxd"
|
||||
|
||||
EGO_PN="github.com/lxc/lxd"
|
||||
GOPATH="${S}/_dist" # this seems to reset every now and then, though
|
||||
|
||||
common_op() {
|
||||
local i
|
||||
for i in dqlite raft; do
|
||||
cd "${GOPATH}"/deps/${i} || die "failed to switch dir to ${i}"
|
||||
"${@}"
|
||||
cd "${S}" || die "failed to switch dir back from ${i} to ${S}"
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
sed -i \
|
||||
-e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/lxd:g" \
|
||||
-e "s:make:make ${MAKEOPTS}:g" \
|
||||
Makefile || die
|
||||
|
||||
sed -i 's#lib$#lib/lxd#' "${GOPATH}"/deps/libco/Makefile || die
|
||||
sed -i 's#zfs version 2>/dev/null | cut -f 2 -d - | head -1#< /sys/module/zfs/version cut -f 1#' "${GOPATH}"/deps/raft/configure.ac || die
|
||||
|
||||
common_op eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
export CO_CFLAGS="-I${GOPATH}/deps/libco/"
|
||||
export CO_LIBS="${GOPATH}/deps/libco/"
|
||||
|
||||
export RAFT_CFLAGS="-I${GOPATH}/deps/raft/include/"
|
||||
export RAFT_LIBS="${GOPATH}/deps/raft/.libs"
|
||||
|
||||
export SQLITE_CFLAGS="-I${GOPATH}/deps/sqlite"
|
||||
export SQLITE_LIBS="${GOPATH}/deps/sqlite/.libs"
|
||||
|
||||
export PKG_CONFIG_PATH="${GOPATH}/sqlite/:${GOPATH}/libco/:${GOPATH}/raft/"
|
||||
|
||||
cd "${GOPATH}/deps/sqlite" || die
|
||||
econf --enable-replication --disable-amalgamation --disable-tcl --libdir="${EPREFIX}/usr/lib/lxd"
|
||||
|
||||
common_op econf --libdir="${EPREFIX}"/usr/lib/lxd
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
export CGO_CFLAGS="${CGO_CFLAGS} -I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/dqlite/include/ -I${GOPATH}/deps/raft/include/ -I${GOPATH}/deps/libco/"
|
||||
export CGO_LDFLAGS="${CGO_LDFLAGS} -L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/dqlite/.libs/ -L${GOPATH}/deps/raft/.libs -L${GOPATH}/deps/libco/ -Wl,-rpath,${EPREFIX}/usr/lib/lxd"
|
||||
export LD_LIBRARY_PATH="${GOPATH}/deps/sqlite/.libs/:${GOPATH}/deps/dqlite/.libs/:${GOPATH}/deps/raft/.libs:${GOPATH}/deps/libco/:${LD_LIBRARY_PATH}"
|
||||
|
||||
local j
|
||||
for j in sqlite raft libco; do
|
||||
cd "${GOPATH}"/deps/${j} || die
|
||||
emake
|
||||
done
|
||||
|
||||
ln -s libco.so.0.1.0 libco.so || die
|
||||
|
||||
cd "${GOPATH}/deps/dqlite" || die
|
||||
emake CFLAGS="-I${GOPATH}/deps/sqlite -I${GOPATH}/deps/raft/include" LDFLAGS="-L${GOPATH}/deps/sqlite -L${GOPATH}/deps/raft"
|
||||
|
||||
cd "${S}" || die
|
||||
|
||||
for k in fuidshift lxd-agent lxd-benchmark lxd-p2c lxc lxc-to-lxd; do
|
||||
go install -v -x ${EGO_PN}/${k} || die "failed compiling ${k}"
|
||||
done
|
||||
|
||||
go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
|
||||
|
||||
use nls && emake build-mo
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
# This is mostly a copy/paste from the Makefile's "check" rule, but
|
||||
# patching the Makefile to work in a non "fully-qualified" go namespace
|
||||
# was more complicated than this modest copy/paste.
|
||||
# Also: sorry, for now a network connection is needed to run tests.
|
||||
# Will properly bundle test dependencies later.
|
||||
go get -v -x github.com/rogpeppe/godeps || die
|
||||
go get -v -x github.com/remyoudompheng/go-misc/deadcode || die
|
||||
go get -v -x github.com/golang/lint/golint || die
|
||||
go test -v ${EGO_PN}/lxd || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local bindir="_dist/bin"
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
dosbin ${bindir}/lxd
|
||||
|
||||
for l in fuidshift lxd-agent lxd-benchmark lxd-p2c lxc lxc-to-lxd; do
|
||||
dobin ${bindir}/${l}
|
||||
done
|
||||
|
||||
for m in dqlite libco raft sqlite; do
|
||||
cd "${GOPATH}"/deps/${m} || die "failed switching into ${GOPATH}/${m}"
|
||||
emake DESTDIR="${D}" install
|
||||
done
|
||||
|
||||
cd "${S}" || die
|
||||
|
||||
# We only need libraries, and we don't want anything to link against these.
|
||||
rm "${ED}"/usr/bin/sqlite3 || die
|
||||
rm -r "${ED}"/usr/include || die
|
||||
rm -r "${ED}"/usr/lib/lxd/*.a || die
|
||||
rm -r "${ED}"/usr/lib/lxd/pkgconfig || die
|
||||
|
||||
newbashcomp scripts/bash/lxd-client lxc
|
||||
|
||||
newconfd "${FILESDIR}"/${PN}-4.0.0.confd lxd
|
||||
newinitd "${FILESDIR}"/${PN}-4.0.0.initd lxd
|
||||
|
||||
systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
|
||||
|
||||
dodoc AUTHORS doc/*
|
||||
use nls && domo po/*.mo
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
|
||||
elog "including a Quick Start."
|
||||
elog
|
||||
elog "Optional features:"
|
||||
optfeature "apparmor support" app-emulation/lxc[apparmor]
|
||||
optfeature "btrfs storage backend" sys-fs/btrfs-progs
|
||||
optfeature "lvm2 storage backend" sys-fs/lvm2
|
||||
optfeature "zfs storage backend" sys-fs/zfs
|
||||
elog
|
||||
elog "Be sure to add your local user to the lxd group."
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,175 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal
|
||||
|
||||
MY_P="rust-${PV}"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
SRC_URI="$(rust_all_arch_uris ${MY_P})"
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
SLOT="stable"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="clippy cpu_flags_x86_sse2 doc rustfmt"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=app-eselect/eselect-rust-20190311"
|
||||
|
||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
||||
|
||||
QA_PREBUILT="
|
||||
opt/${P}/bin/*-${PV}
|
||||
opt/${P}/lib/*.so
|
||||
opt/${P}/lib/rustlib/*/bin/*
|
||||
opt/${P}/lib/rustlib/*/lib/*.so
|
||||
opt/${P}/lib/rustlib/*/lib/*.rlib*
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
|
||||
die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
if multilib_is_native_abi; then
|
||||
|
||||
# start native abi install
|
||||
pushd "${S}" >/dev/null || die
|
||||
local std
|
||||
std="$(grep 'std' ./components)"
|
||||
local components="rustc,cargo,${std}"
|
||||
use doc && components="${components},rust-docs"
|
||||
use clippy && components="${components},clippy-preview"
|
||||
use rustfmt && components="${components},rustfmt-preview"
|
||||
./install.sh \
|
||||
--components="${components}" \
|
||||
--disable-verify \
|
||||
--prefix="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/opt/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustgdbgui=rust-gdbgui-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "${rustc}" "/opt/${P}/bin/rustc"
|
||||
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
|
||||
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
|
||||
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
|
||||
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "${cargo}" "/opt/${P}/bin/cargo"
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
|
||||
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
|
||||
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/opt/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
popd >/dev/null || die
|
||||
#end native abi install
|
||||
|
||||
else
|
||||
local rust_target
|
||||
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
|
||||
dodir "/opt/${P}/lib/rustlib"
|
||||
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
|
||||
"${ED}/opt/${P}/lib/rustlib" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -0,0 +1,503 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
SRC_URI="
|
||||
https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
|
||||
!system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
|
||||
"
|
||||
|
||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
||||
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
|
||||
# we need to *really* make sure we're not pulling more than one slot
|
||||
# simultaneously.
|
||||
|
||||
# How to use it:
|
||||
# 1. List all the working slots (with min versions) in ||, newest first.
|
||||
# 2. Update the := to specify *max* version, e.g. < 11.
|
||||
# 3. Specify LLVM_MAX_SLOT, e.g. 10.
|
||||
LLVM_DEPEND="
|
||||
|| (
|
||||
sys-devel/llvm:10[${LLVM_TARGET_USEDEPS// /,}]
|
||||
sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}]
|
||||
)
|
||||
<sys-devel/llvm-11:=
|
||||
wasm? ( sys-devel/lld )
|
||||
"
|
||||
LLVM_MAX_SLOT=10
|
||||
|
||||
BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)) >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
|
||||
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
app-eselect/eselect-rust
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7
|
||||
>=sys-devel/clang-3.5
|
||||
)
|
||||
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
|
||||
!system-llvm? (
|
||||
dev-util/cmake
|
||||
dev-util/ninja
|
||||
)
|
||||
"
|
||||
|
||||
# libgit2 should be at least same as bundled into libgit-sys #707746
|
||||
DEPEND="
|
||||
>=dev-libs/libgit2-0.99:=
|
||||
net-libs/libssh2:=
|
||||
net-libs/http-parser:=
|
||||
net-misc/curl:=[ssl]
|
||||
sys-libs/zlib:=
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
elibc_musl? ( sys-libs/libunwind )
|
||||
system-llvm? (
|
||||
${LLVM_DEPEND}
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
app-eselect/eselect-rust
|
||||
"
|
||||
|
||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
||||
miri? ( nightly )
|
||||
parallel-compiler? ( nightly )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/bin/.*-${PV}
|
||||
usr/lib.*/lib.*.so
|
||||
usr/lib/rustlib/.*/codegen-backends/librustc_codegen_llvm-llvm.so
|
||||
usr/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_SONAME="
|
||||
usr/lib.*/lib.*.so
|
||||
usr/lib.*/librustc_macros.*.s
|
||||
"
|
||||
|
||||
# tests need a bit more work, currently they are causing multiple
|
||||
# re-compilations and somewhat fragile.
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/0012-Ignore-broken-and-non-applicable-tests.patch
|
||||
"${FILESDIR}"/1.44.0-libressl.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pre_build_checks() {
|
||||
CHECKREQS_DISK_BUILD="9G"
|
||||
eshopts_push -s extglob
|
||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
||||
CHECKREQS_DISK_BUILD="15G"
|
||||
fi
|
||||
eshopts_pop
|
||||
check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
pre_build_checks
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
pre_build_checks
|
||||
python-any-r1_pkg_setup
|
||||
|
||||
# required to link agains system libs, otherwise
|
||||
# crates use bundled sources and compile own static version
|
||||
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
export PKG_CONFIG_ALLOW_CROSS=1
|
||||
|
||||
if use system-llvm; then
|
||||
llvm_pkg_setup
|
||||
|
||||
local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
|
||||
|
||||
export LLVM_LINK_SHARED=1
|
||||
export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if ! use system-bootstrap; then
|
||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
||||
|
||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
|
||||
--destdir="${rust_stage0_root}" --prefix=/ || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local rust_target="" rust_targets="" arch_cflags
|
||||
|
||||
# Collect rust target names to compile standard libs for all ABIs.
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
|
||||
done
|
||||
if use wasm; then
|
||||
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
|
||||
if use system-llvm; then
|
||||
# un-hardcode rust-lld linker for this target
|
||||
# https://bugs.gentoo.org/715348
|
||||
sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die
|
||||
fi
|
||||
fi
|
||||
rust_targets="${rust_targets#,}"
|
||||
|
||||
local tools="\"cargo\","
|
||||
if use clippy; then
|
||||
tools="\"clippy\",$tools"
|
||||
fi
|
||||
if use miri; then
|
||||
tools="\"miri\",$tools"
|
||||
fi
|
||||
if use rls; then
|
||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
tools="\"rustfmt\",$tools"
|
||||
fi
|
||||
|
||||
local rust_stage0_root
|
||||
if use system-bootstrap; then
|
||||
rust_stage0_root="$(rustc --print sysroot)"
|
||||
else
|
||||
rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
fi
|
||||
|
||||
rust_target="$(rust_abi)"
|
||||
|
||||
cat <<- EOF > "${S}"/config.toml
|
||||
[llvm]
|
||||
optimize = $(toml_usex !debug)
|
||||
release-debuginfo = $(toml_usex debug)
|
||||
assertions = $(toml_usex debug)
|
||||
ninja = true
|
||||
targets = "${LLVM_TARGETS// /;}"
|
||||
experimental-targets = ""
|
||||
link-shared = $(toml_usex system-llvm)
|
||||
[build]
|
||||
build = "${rust_target}"
|
||||
host = ["${rust_target}"]
|
||||
target = [${rust_targets}]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
docs = $(toml_usex doc)
|
||||
compiler-docs = $(toml_usex doc)
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = true
|
||||
tools = [${tools}]
|
||||
verbose = 2
|
||||
sanitizers = false
|
||||
profiler = false
|
||||
cargo-native-static = false
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "lib"
|
||||
docdir = "share/doc/${PF}"
|
||||
mandir = "share/man"
|
||||
[rust]
|
||||
optimize = true
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
debuginfo-level-rustc = 0
|
||||
backtrace = true
|
||||
incremental = false
|
||||
default-linker = "$(tc-getCC)"
|
||||
parallel-compiler = $(toml_usex parallel-compiler)
|
||||
channel = "$(usex nightly nightly stable)"
|
||||
rpath = false
|
||||
verbose-tests = true
|
||||
optimize-tests = $(toml_usex !debug)
|
||||
codegen-tests = true
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||
backtrace-on-ice = true
|
||||
jemalloc = false
|
||||
[dist]
|
||||
src-tarball = false
|
||||
EOF
|
||||
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
||||
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
|
||||
|
||||
cat <<- EOF >> "${S}"/config.env
|
||||
CFLAGS_${rust_target}=${arch_cflags}
|
||||
EOF
|
||||
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.${rust_target}]
|
||||
cc = "$(tc-getBUILD_CC)"
|
||||
cxx = "$(tc-getBUILD_CXX)"
|
||||
linker = "$(tc-getCC)"
|
||||
ar = "$(tc-getAR)"
|
||||
EOF
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
EOF
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then #whitespace intentionally shifted below
|
||||
# experimental cross support
|
||||
# discussion: https://bugs.gentoo.org/679878
|
||||
# TODO: c*flags, clang, system-llvm, cargo.eclass target support
|
||||
# it would be much better if we could split out stdlib
|
||||
# complilation to separate ebuild and abuse CATEGORY to
|
||||
# just install to /usr/lib/rustlib/<target>
|
||||
|
||||
# extra targets defined as a bash array
|
||||
# spec format: <LLVM target>:<rust-target>:<CTARGET>
|
||||
# best place would be /etc/portage/env/dev-lang/rust
|
||||
# Example:
|
||||
# RUST_CROSS_TARGETS=(
|
||||
# "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
|
||||
# )
|
||||
# no extra hand holding is done, no target transformations, all
|
||||
# values are passed as-is with just basic checks, so it's up to user to supply correct values
|
||||
# valid rust targets can be obtained with
|
||||
# rustc --print target-list
|
||||
# matching cross toolchain has to be installed
|
||||
# matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
|
||||
# only gcc toolchains installed with crossdev are checked for now.
|
||||
|
||||
# BUG: we can't pass host flags to cross compiler, so just filter for now
|
||||
# BUG: this should be more fine-grained.
|
||||
filter-flags '-mcpu=*' '-march=*' '-mtune=*'
|
||||
|
||||
local cross_target_spec
|
||||
for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
|
||||
# extracts first element form <LLVM target>:<rust-target>:<CTARGET>
|
||||
local cross_llvm_target="${cross_target_spec%%:*}"
|
||||
# extracts toolchain triples, <rust-target>:<CTARGET>
|
||||
local cross_triples="${cross_target_spec#*:}"
|
||||
# extracts first element after before : separator
|
||||
local cross_rust_target="${cross_triples%%:*}"
|
||||
# extracts last element after : separator
|
||||
local cross_toolchain="${cross_triples##*:}"
|
||||
use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
|
||||
command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
|
||||
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.${cross_rust_target}]
|
||||
cc = "${cross_toolchain}-gcc"
|
||||
cxx = "${cross_toolchain}-g++"
|
||||
linker = "${cross_toolchain}-gcc"
|
||||
ar = "${cross_toolchain}-ar"
|
||||
EOF
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
|
||||
# append cross target to "normal" target list
|
||||
# example 'target = ["powerpc64le-unknown-linux-gnu"]'
|
||||
# becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
|
||||
|
||||
rust_targets="${rust_targets},\"${cross_rust_target}\""
|
||||
sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
|
||||
|
||||
ewarn
|
||||
ewarn "Enabled ${cross_rust_target} rust target"
|
||||
ewarn "Using ${cross_toolchain} cross toolchain"
|
||||
ewarn
|
||||
if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
|
||||
ewarn "'sys-devel/binutils[multitarget]' is not installed"
|
||||
ewarn "'strip' will be unable to strip cross libraries"
|
||||
ewarn "cross targets will be installed with full debug information"
|
||||
ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
|
||||
ewarn
|
||||
ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
|
||||
ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
|
||||
ewarn
|
||||
fi
|
||||
done
|
||||
fi # I_KNOW_WHAT_I_AM_DOING_CROSS
|
||||
|
||||
einfo "Rust configured with the following settings:"
|
||||
cat "${S}"/config.toml || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
|
||||
"${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
|
||||
"${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml -j$(makeopts_jobs) --no-doc --no-fail-fast \
|
||||
src/test/codegen \
|
||||
src/test/codegen-units \
|
||||
src/test/compile-fail \
|
||||
src/test/incremental \
|
||||
src/test/mir-opt \
|
||||
src/test/pretty \
|
||||
src/test/run-fail \
|
||||
src/test/run-make \
|
||||
src/test/run-make-fulldeps \
|
||||
src/test/ui \
|
||||
src/test/ui-fulldeps || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
env $(cat "${S}"/config.env) DESTDIR="${D}" \
|
||||
"${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
|
||||
|
||||
# bug #689562, #689160
|
||||
rm "${D}/etc/bash_completion.d/cargo" || die
|
||||
rmdir "${D}"/etc{/bash_completion.d,} || die
|
||||
dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
|
||||
|
||||
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use miri; then
|
||||
mv "${ED}/usr/bin/miri" "${ED}/usr/bin/miri-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-miri" "${ED}/usr/bin/cargo-miri-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# Move public shared libs to abi specific libdir
|
||||
# Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
|
||||
if [[ $(get_libdir) != lib ]]; then
|
||||
dodir /usr/$(get_libdir)
|
||||
mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
|
||||
fi
|
||||
|
||||
dodoc COPYRIGHT
|
||||
rm "${ED}/usr/share/doc/${P}"/*.old || die
|
||||
rm "${ED}/usr/share/doc/${P}/LICENSE-APACHE" || die
|
||||
rm "${ED}/usr/share/doc/${P}/LICENSE-MIT" || die
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/cargo
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use miri; then
|
||||
echo /usr/bin/miri >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
Binary file not shown.
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
MODULE_AUTHOR=GBARR
|
||||
MODULE_VERSION=0.27
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Standard en/decode of ASN.1 structures"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}
|
||||
>=virtual/perl-ExtUtils-MakeMaker-6.300.0
|
||||
test? (
|
||||
>=virtual/perl-Math-BigInt-1.997.0
|
||||
>=virtual/perl-Test-Simple-0.900.0
|
||||
)
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-perl-526.patch"
|
||||
)
|
||||
|
||||
SRC_TEST=do
|
@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=BAREFOOT
|
||||
DIST_VERSION=0.13
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="A module used to generate random data"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~sparc ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
virtual/perl-Carp
|
||||
virtual/perl-Exporter
|
||||
>=virtual/perl-Time-Piece-1.160.0
|
||||
"
|
||||
BDEPEND="
|
||||
>=virtual/perl-ExtUtils-MakeMaker-6.360.0
|
||||
>=dev-perl/File-ShareDir-Install-0.60.0
|
||||
test? (
|
||||
virtual/perl-File-Temp
|
||||
dev-perl/Test-MockTime
|
||||
>=virtual/perl-Test-Simple-0.880.0
|
||||
)
|
||||
"
|
||||
PERL_RM_FILES=(
|
||||
"t/author-pod-syntax.t"
|
||||
"t/z0_pod.t"
|
||||
"t/z1_pod-coverage.t"
|
||||
)
|
||||
|
||||
src_test() {
|
||||
ewarn "Comprehensive testing of this package may involve manual steps."
|
||||
ewarn "For details, see:"
|
||||
ewarn " https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#Testing"
|
||||
perl-module_src_test
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "This package may require additional dependencies for some optional features."
|
||||
ewarn "For details, see:"
|
||||
ewarn " https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#Optional_Features"
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST Data-Random-0.12.tar.gz 166951 BLAKE2B 84df509577687c1de60f675b881f245c944bb81b5fb6455473f4b842c301db3bee3dc9d4bb2e5991d857e19831b4636ec72532dcad2838814087f15a61f370ce SHA512 ae898af42a44576f5b968fb44015339e6db4c8542e6198d87aa4346eba767a81bfdd35c33f10d52adddad9fe38d24475bcc7fa87e8223f1a2756ece1da84ee97
|
||||
DIST Data-Random-0.13.tar.gz 158143 BLAKE2B 8a7c7f56c563e149f890d341db89690cc2a4f31ff1f5662cc16f80c47a2b9ca4b615cec89f2a10ad3b472e37614995e2af4487a830d6e71d533c0df263fe7355 SHA512 7cf3811ee26a3b93a8170cc9c863ad2cf03f5997cabe66cd78646a4d93a6568ef247f636782b8c707c3064120b30609f3562d8654b31e5e31890aa302b03cdb5
|
||||
|
@ -0,0 +1,47 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=NEELY
|
||||
DIST_VERSION=0.65
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Modules that serialize data structures"
|
||||
# License note: "perl 5.8.2 or later"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
virtual/perl-AutoLoader
|
||||
>=virtual/perl-Data-Dumper-2.80.0
|
||||
virtual/perl-Digest-SHA
|
||||
virtual/perl-Exporter
|
||||
"
|
||||
DEPEND="
|
||||
dev-perl/Module-Build
|
||||
"
|
||||
BDEPEND="${RDEPEND}
|
||||
virtual/perl-File-Spec
|
||||
>=dev-perl/Module-Build-0.350.0
|
||||
test? (
|
||||
virtual/perl-Test-Simple
|
||||
)
|
||||
"
|
||||
PERL_RM_FILES=(
|
||||
"t/00-01-Signature.t"
|
||||
"t/00-02-Kwalitee.t"
|
||||
"t/10-01-Pod.t"
|
||||
"t/10-02-Pod-Coverage.t"
|
||||
)
|
||||
# Parallelism broken: https://rt.cpan.org/Ticket/Display.html?id=123331
|
||||
DIST_TEST="do"
|
||||
|
||||
src_test() {
|
||||
ewarn "Additional dependencies may need installation for comprehensive tests."
|
||||
ewarn "For details, see:"
|
||||
ewarn " https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
|
||||
perl-module_src_test
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST Data-Serializer-0.60.tar.gz 43291 BLAKE2B 381ea06c0d34321daf6ae818a10f6114e602b91c4c82b6713f03a6ceede36f206d3abaa6b4b91894c68d65cf270576413019b2962be765a65738b309f43cece3 SHA512 85211d2ca5db19219f89da5300b93835866baa5e12237efa61ea82d2b841f6b5a05bca889d98878151d1f7517b2af5d9a1535e7bbcd64245936b270a82be21bb
|
||||
DIST Data-Serializer-0.65.tar.gz 43582 BLAKE2B aab6038dd454b765728171f49b9c3fb8143828f3192cc329d372bc04eaaf5c7e22e4bc3029d6c71663929991144231d8a0d76aeaa775f525ba7a4dafddb5ccf1 SHA512 cc6cd25779f08598bebac38301b3bac667098f8582be8b4cd63cac7723ebc9d58e081b205e9326fd762eba5e378160545c718d50a8a1ead945be6da188c4de0d
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue