parent
0d509c6385
commit
a96af8c4b5
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,2 @@
|
|||||||
DIST restic-0.8.3.tar.gz 48746281 BLAKE2B 4161326068165b5ba19e9ee0e6386aa1df29a961a42509a2cb7924958100b9412abd1dd27d299d1eef76fdd4731d4a56f0a68e796a46071229a3e6767d3a6bb7 SHA512 758b2c69af8aad6bb62dc750141d5f5a1954ca2b51350ef59c35fd10afefaddc4d8d0cdd5914f249594946db6138124a48fba531b8a24353f022ccea773a240c
|
|
||||||
DIST restic-0.9.2.tar.gz 27344284 BLAKE2B 17c121a0d4df470397b467e09ceac559848c34e6a43f289b68eff8b85af86a18a4d2e1340060812613cb7e9cecf86f706565a6bcce31fbcd5aab076a85b57c67 SHA512 e060e0e16031924df7347ec74972bf52c75c84cca8ae996b1c5dd8a6f42c9022062e004ec17af2ebc0b6e9480ecfdff4ca7f64956afab9b9799201848d0be731
|
|
||||||
DIST restic-0.9.3.tar.gz 26183792 BLAKE2B 2bb98bd0b5430f928cdc566e558e503d84e611d05da8866f4f5d6f75a325ed73e7674098d73976d8f37ba8d38232adaedc25e2ea211403ea482cecc81f476ba9 SHA512 a8d906984d17e46533a377fba464d909a92016595d7585f37942bc68c24f9356c47df83f2e6ec15b877ea20f864be87362db4421665b594fecb4bca78b520393
|
|
||||||
DIST restic-0.9.4.tar.gz 26211163 BLAKE2B 950a8da8217500a910f0e5966787b668417f1168e81365ecda70469ef42c24fed876e97b6a44ed9dda89c07760db4678d791960d78760d68c8f1846c827cf340 SHA512 8e75a1da6ee9a364c2bf53ce8f9b014549e7065eae349dc6baf68b0e8a8e9736f83c0495b822aac87480751f448bd42da34c440290b5f0967aea7becda5c448b
|
DIST restic-0.9.4.tar.gz 26211163 BLAKE2B 950a8da8217500a910f0e5966787b668417f1168e81365ecda70469ef42c24fed876e97b6a44ed9dda89c07760db4678d791960d78760d68c8f1846c827cf340 SHA512 8e75a1da6ee9a364c2bf53ce8f9b014549e7065eae349dc6baf68b0e8a8e9736f83c0495b822aac87480751f448bd42da34c440290b5f0967aea7becda5c448b
|
||||||
|
DIST restic-0.9.5.tar.gz 26933971 BLAKE2B 7e6cb87c7ce0f860ed884a631b791d0dc44e770ffabf298f20c60197b32961a2a78380e2933ce3851215ec2e32bee95da67566bf7d2d30c3bb0dddda2c6ca804 SHA512 2541b4d70d23d28360c4398427d65ed08a5eea8c171b93be7b7d54baa7b06099f5473ff2fbe3d6b3d6691592300062ba1b240cc03772868d2a0adb1217c8a85f
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit golang-vcs-snapshot bash-completion-r1
|
|
||||||
|
|
||||||
DESCRIPTION="A backup program that is fast, efficient and secure"
|
|
||||||
HOMEPAGE="https://restic.github.io/"
|
|
||||||
SRC_URI="https://github.com/restic/restic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
EGO_PN="github.com/restic/restic"
|
|
||||||
|
|
||||||
LICENSE="BSD-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~x86"
|
|
||||||
IUSE="test"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
dev-lang/go
|
|
||||||
test? ( sys-fs/fuse:0 )"
|
|
||||||
|
|
||||||
RDEPEND="sys-fs/fuse:0"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
local mygoargs=(
|
|
||||||
-v
|
|
||||||
-work
|
|
||||||
-x
|
|
||||||
-tags release
|
|
||||||
-ldflags "-s -w -X main.version=${PV}"
|
|
||||||
-asmflags "-trimpath=${S}"
|
|
||||||
-gcflags "-trimpath=${S}"
|
|
||||||
-o restic ${EGO_PN}/cmd/restic
|
|
||||||
)
|
|
||||||
|
|
||||||
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
|
|
||||||
go build "${mygoargs[@]}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
|
|
||||||
go test -timeout 30m -v -work -x ${EGO_PN}/cmd/... ${EGO_PN}/internal/... || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin restic
|
|
||||||
|
|
||||||
newbashcomp doc/bash-completion.sh "${PN}"
|
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
|
||||||
newins doc/zsh-completion.zsh _restic
|
|
||||||
|
|
||||||
doman doc/man/*
|
|
||||||
dodoc doc/*.rst
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit bash-completion-r1 golang-vcs-snapshot
|
|
||||||
|
|
||||||
DESCRIPTION="A backup program that is fast, efficient and secure"
|
|
||||||
HOMEPAGE="https://restic.github.io/"
|
|
||||||
SRC_URI="https://github.com/restic/restic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
EGO_PN="github.com/restic/restic"
|
|
||||||
|
|
||||||
LICENSE="BSD-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~x86"
|
|
||||||
IUSE="test"
|
|
||||||
|
|
||||||
RDEPEND="sys-fs/fuse:0"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
local mygoargs=(
|
|
||||||
-v
|
|
||||||
-work
|
|
||||||
-x
|
|
||||||
-tags release
|
|
||||||
-ldflags "-X main.version=${PV}"
|
|
||||||
-asmflags "-trimpath=${S}"
|
|
||||||
-gcflags "-trimpath=${S}"
|
|
||||||
-o restic ${EGO_PN}/cmd/restic
|
|
||||||
)
|
|
||||||
|
|
||||||
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
|
|
||||||
go build "${mygoargs[@]}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
|
|
||||||
go test -timeout 30m -v -work -x ${EGO_PN}/cmd/... ${EGO_PN}/internal/... || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin restic
|
|
||||||
|
|
||||||
newbashcomp doc/bash-completion.sh "${PN}"
|
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
|
||||||
newins doc/zsh-completion.zsh _restic
|
|
||||||
|
|
||||||
doman doc/man/*
|
|
||||||
dodoc doc/*.rst
|
|
||||||
}
|
|
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
DIST nano-3.2.tar.gz 2944045 BLAKE2B 8d29d574ebf543f82608d4df26f551c0b3c77863b2ac8cfd0d3aea45340954abe6221069c9c72beab256c2c8cc4fcd3de27804404d97a98144c69ad26223de09 SHA512 33b3bbc5b5044b4003347e87926046fb5a0e83edfd6de858085526b7eaa9ea7ee26a598da00060a6b62edbd0366c7cb06b5a9878f6f0149a9501e4ada80b88f3
|
DIST nano-3.2.tar.gz 2944045 BLAKE2B 8d29d574ebf543f82608d4df26f551c0b3c77863b2ac8cfd0d3aea45340954abe6221069c9c72beab256c2c8cc4fcd3de27804404d97a98144c69ad26223de09 SHA512 33b3bbc5b5044b4003347e87926046fb5a0e83edfd6de858085526b7eaa9ea7ee26a598da00060a6b62edbd0366c7cb06b5a9878f6f0149a9501e4ada80b88f3
|
||||||
DIST nano-4.1.tar.gz 2918354 BLAKE2B 6f5438b2e4bb9a6de405a7519d1767697df1504e67aae37a75743b658b82d9bf13e0b561177415445827f8a63456afd4f689b1d34b6a3eb53c940972fa01f93d SHA512 982b845197aa2942eb8a49b2ac1bfd8cc65ec9b6b7f60190059367b4f9156b4f0bb5e56a123f0659b23c6c9d1d85733123350a8f04c433ccb32d4c8ef1135d12
|
|
||||||
DIST nano-4.2.tar.gz 2928595 BLAKE2B 42bb0ccbf4961706c6c645eb2310a646a7decd3617117a079ffe9e3718c8054ab823a5aff3e543c06c4c398f83579a679267a9ad6f113ba451b76d67e14b07cc SHA512 a5dd9ce96cd09d12c65108ea6a18b2cf1c2b055929e58d3e84beb0725607b4b5a3f8ae3fda0ab658c853cc4cac70c089fee716e1bb5a700f2506a7a3e1bea1bd
|
DIST nano-4.2.tar.gz 2928595 BLAKE2B 42bb0ccbf4961706c6c645eb2310a646a7decd3617117a079ffe9e3718c8054ab823a5aff3e543c06c4c398f83579a679267a9ad6f113ba451b76d67e14b07cc SHA512 a5dd9ce96cd09d12c65108ea6a18b2cf1c2b055929e58d3e84beb0725607b4b5a3f8ae3fda0ab658c853cc4cac70c089fee716e1bb5a700f2506a7a3e1bea1bd
|
||||||
|
DIST nano-4.3.tar.gz 2939418 BLAKE2B 2464118a1cd16477637a8e98c1d179cbea1f33cc1548eff09b3b77b613b5b2b628915da1d11c04064f7211a0254461eab09ddae6dda582004d77adea9dff2360 SHA512 2fb76e61079efb0a16f3ea27fdc7da749c71d61a752d96beee4f8376ad0071792ecaa5f3dc627fbcce175227ca48c60c1a4a3e17bfbc89180aa484c28fe37746
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST geoclue-2.4.13.tar.bz2 108691 BLAKE2B 5ffc2aca51ad0943931c526da69225e3a0d9b0c850ea688a350c47696b83775dc078e928af8cb0996741386a41ab5ec1ac129676d7e3b4c8584b3720dd370c1e SHA512 ed9c295bbdc22836a548ca4d5014d109af214464d1dd2a00f1ec493a751d949930d9fa512e915c7d65b34c8706c3bf73e06dd5e170846edee9e764d144960e78
|
DIST geoclue-2.4.13.tar.bz2 108691 BLAKE2B 5ffc2aca51ad0943931c526da69225e3a0d9b0c850ea688a350c47696b83775dc078e928af8cb0996741386a41ab5ec1ac129676d7e3b4c8584b3720dd370c1e SHA512 ed9c295bbdc22836a548ca4d5014d109af214464d1dd2a00f1ec493a751d949930d9fa512e915c7d65b34c8706c3bf73e06dd5e170846edee9e764d144960e78
|
||||||
DIST geoclue-2.4.8.tar.xz 368404 BLAKE2B 244aaa01ebbac57839eb8e5a19f543f3940217de9ad076b55c6054ff818e3c2948d3419e7391e05ccc17a5234a76980dee0470ae806d437db95db4a9e128a678 SHA512 1741962b4bdce925af090961bd50f4d0d934f7b81e53968d5d8ea7957e8593c4c9a8084bbd149c454d76f2af35be036748f212c99506b475567384a43f579f3d
|
DIST geoclue-2.4.8.tar.xz 368404 BLAKE2B 244aaa01ebbac57839eb8e5a19f543f3940217de9ad076b55c6054ff818e3c2948d3419e7391e05ccc17a5234a76980dee0470ae806d437db95db4a9e128a678 SHA512 1741962b4bdce925af090961bd50f4d0d934f7b81e53968d5d8ea7957e8593c4c9a8084bbd149c454d76f2af35be036748f212c99506b475567384a43f579f3d
|
||||||
|
DIST geoclue-2.5.3.tar.bz2 85084 BLAKE2B 3f61c16dcb4d0de95499865d83df4bd9b393d9d2f204b70029fb753666caab0e74468ae14f37ed78475d623caae9553e0e69b62765afebc6730212428d377aff SHA512 b4188f1b055f84ce0c58e497896a328d09838073b867598a0ca026c741e4464ae7ee54e53e9f02addd818152dce4a21eb5f83a3245e7ce1a93eec5671d0a9ee9
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
From 56c7ca99dcadbf3e80ff2a9baf3e174f278b6a71 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sobhan Mohammadpour <sobhan@gentoo.org>
|
||||||
|
Date: Wed, 19 Jun 2019 01:16:16 -0400
|
||||||
|
Subject: [PATCH] optinal vala
|
||||||
|
|
||||||
|
---
|
||||||
|
libgeoclue/meson.build | 5 +++--
|
||||||
|
meson_options.txt | 3 +++
|
||||||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libgeoclue/meson.build b/libgeoclue/meson.build
|
||||||
|
index e228ec3..e78a3e8 100644
|
||||||
|
--- a/libgeoclue/meson.build
|
||||||
|
+++ b/libgeoclue/meson.build
|
||||||
|
@@ -58,7 +58,8 @@ libgeoclue_dep = declare_dependency(link_with: libgeoclue,
|
||||||
|
sources: [ libgeoclue_sources, libgeoclue_headers ])
|
||||||
|
|
||||||
|
gir = find_program('g-ir-scanner', required: false)
|
||||||
|
-vapigen = find_program('vapigen', required: false)
|
||||||
|
+vapigen_req = get_option('vapigen')
|
||||||
|
+vapigen = find_program('vapigen-ver', required: false)
|
||||||
|
enable_gir = get_option('introspection')
|
||||||
|
pkg_requirements = ['glib-2.0', 'gio-2.0', 'gio-unix-2.0']
|
||||||
|
gir_sources = [ libgeoclue_sources,
|
||||||
|
@@ -78,7 +79,7 @@ if gir.found() and enable_gir
|
||||||
|
install: true,
|
||||||
|
header: 'geoclue.h',
|
||||||
|
extra_args: [ '--quiet' ])
|
||||||
|
- if vapigen.found()
|
||||||
|
+ if vapigen.found() and vapigen_req
|
||||||
|
gnome.generate_vapi('libgeoclue-' + gclue_api_version,
|
||||||
|
sources: geo_gir[0],
|
||||||
|
packages: pkg_requirements,
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 83bc60e..8611f6c 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -1,3 +1,6 @@
|
||||||
|
+option('vapigen',
|
||||||
|
+ type: 'boolean', value: false,
|
||||||
|
+ description: 'Enable vala?')
|
||||||
|
option('libgeoclue',
|
||||||
|
type: 'boolean', value: true,
|
||||||
|
description: 'Enable convenience library')
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
VALA_USE_DEPEND="vapigen"
|
||||||
|
VALA_MIN_API_VERSION="0.32"
|
||||||
|
|
||||||
|
inherit gnome.org meson systemd vala user xdg
|
||||||
|
|
||||||
|
DESCRIPTION="A geoinformation D-Bus service"
|
||||||
|
HOMEPAGE="https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home"
|
||||||
|
SRC_URI="https://gitlab.freedesktop.org/geoclue/${PN}/-/archive/${PV}/${P}.tar.bz2"
|
||||||
|
|
||||||
|
LICENSE="LGPL-2"
|
||||||
|
SLOT="2.0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
|
||||||
|
#todo maybe add a use flat for libgeoclue
|
||||||
|
IUSE="+introspection gtk-doc modemmanager vala zeroconf"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
>=dev-libs/glib-2.44:2
|
||||||
|
>=dev-libs/json-glib-0.14
|
||||||
|
>=net-libs/libsoup-2.42:2.4
|
||||||
|
sys-apps/dbus
|
||||||
|
introspection? ( >=dev-libs/gobject-introspection-0.9.6:= )
|
||||||
|
modemmanager? ( >=net-misc/modemmanager-1.6 )
|
||||||
|
zeroconf? ( >=net-dns/avahi-0.6.10[dbus] )
|
||||||
|
!<sci-geosciences/geocode-glib-3.10.0
|
||||||
|
x11-libs/libnotify
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-util/gdbus-codegen
|
||||||
|
dev-util/glib-utils
|
||||||
|
>=dev-util/gtk-doc-1
|
||||||
|
sys-devel/gettext
|
||||||
|
virtual/pkgconfig
|
||||||
|
vala? ( $(vala_depend) )
|
||||||
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
epatch "${FILESDIR}"/${P}-optional-vapi.patch
|
||||||
|
|
||||||
|
vala_src_prepare
|
||||||
|
sed -i -e "s:'vapigen-ver':'vapigen-$(vala_best_api_version)':" libgeoclue/meson.build || die
|
||||||
|
xdg_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# debug only affects CFLAGS
|
||||||
|
local emesonargs=(
|
||||||
|
$(meson_use gtk-doc)
|
||||||
|
$(meson_use vala vapigen)
|
||||||
|
-Ddbus-srv-user=geoclue \
|
||||||
|
-Denable-backend=true \
|
||||||
|
-Dlibgeoclue=true \
|
||||||
|
-Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)" \
|
||||||
|
-Ddemo-agent=false \
|
||||||
|
$(meson_use introspection) \
|
||||||
|
$(meson_use modemmanager 3g-source) \
|
||||||
|
$(meson_use modemmanager cdma-source) \
|
||||||
|
$(meson_use modemmanager modem-gps-source) \
|
||||||
|
$(meson_use zeroconf nmea-source)
|
||||||
|
)
|
||||||
|
meson_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
enewgroup geoclue
|
||||||
|
enewuser geoclue -1 -1 /var/lib/geoclue geoclue
|
||||||
|
}
|
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST TeXmacs-1.99.6-src.tar.gz 25081652 BLAKE2B 08d0a141ff1b8ab59def50c636d917f9290488031d6f7f4343be4a04af44d8994dc791eb23a2a2b71b7a853a3a90482313062fbfc045cf585afdf8f1f8d2a5f3 SHA512 2e262037654493075cc4a3d47b93de08c3ad2d6f10ce5fe814a8046b38d327c5dd88c1575dff7e2145f1541f9765dc50ec5abcd63146090eea98ab5db9d103ee
|
DIST TeXmacs-1.99.6-src.tar.gz 25081652 BLAKE2B 08d0a141ff1b8ab59def50c636d917f9290488031d6f7f4343be4a04af44d8994dc791eb23a2a2b71b7a853a3a90482313062fbfc045cf585afdf8f1f8d2a5f3 SHA512 2e262037654493075cc4a3d47b93de08c3ad2d6f10ce5fe814a8046b38d327c5dd88c1575dff7e2145f1541f9765dc50ec5abcd63146090eea98ab5db9d103ee
|
||||||
|
DIST TeXmacs-1.99.9-src.tar.gz 30109108 BLAKE2B 182db26c645e1445780f8e153f7283eb517ec3aa8be6ce137b6c305df33657f15c3efb57198e81f8dd9e1682b3bf1c6c0ff6f3798c54bcb74aedb8b3cef67b40 SHA512 96971060536007e542cd3e1789f07bcc30ceda01cbf32cabf43e3a5e61a2ba15f604e49601d891a956732d90d224353f8dac495be05677758146206b549f9d1f
|
||||||
|
@ -0,0 +1,295 @@
|
|||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/CMakeLists.txt TeXmacs-1.99.9-src/CMakeLists.txt
|
||||||
|
--- TeXmacs-1.99.9-src.orig/CMakeLists.txt 2019-02-01 04:33:32.000000000 -0500
|
||||||
|
+++ TeXmacs-1.99.9-src/CMakeLists.txt 2019-06-02 17:13:47.980498170 -0400
|
||||||
|
@@ -274,7 +274,6 @@
|
||||||
|
elseif(Guile_VERSION_STRING VERSION_LESS 3.0)
|
||||||
|
set(CONFIG_GUILE_SERIAL "D")
|
||||||
|
set(GUILE_D 1)
|
||||||
|
- set(SCM_SIZET size_t)
|
||||||
|
else(Guile_VERSION_STRING VERSION_LESS 1.6)
|
||||||
|
message(ERROR "Not Guile serial A,B,C or D???")
|
||||||
|
endif(Guile_VERSION_STRING VERSION_LESS 1.6)
|
||||||
|
@@ -286,7 +285,7 @@
|
||||||
|
|
||||||
|
MESSAGE(STATUS "Checking the size_t of guile strings")
|
||||||
|
|
||||||
|
-CHECK_C_SOURCE_COMPILES( "#include <guile/gh.h>
|
||||||
|
+CHECK_CXX_SOURCE_COMPILES( "#include <guile/gh.h>
|
||||||
|
#include <libguile.h>
|
||||||
|
void print_string (SCM s) {
|
||||||
|
int len_r;
|
||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/src/CMakeLists.txt.orig TeXmacs-1.99.9-src/src/CMakeLists.txt.orig
|
||||||
|
--- TeXmacs-1.99.9-src.orig/src/CMakeLists.txt.orig 1969-12-31 19:00:00.000000000 -0500
|
||||||
|
+++ TeXmacs-1.99.9-src/src/CMakeLists.txt.orig 2019-06-02 17:12:44.654011478 -0400
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+
|
||||||
|
+add_library(texmacs_body STATIC ${TeXmacs_All_SRCS})
|
||||||
|
+
|
||||||
|
+add_executable (${TeXmacs_binary_name}
|
||||||
|
+ ./Texmacs/Texmacs/texmacs.cpp
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+target_link_libraries (${TeXmacs_binary_name}
|
||||||
|
+ texmacs_body
|
||||||
|
+ ${TeXmacs_Libraries}
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+if (APPLE)
|
||||||
|
+ set(MACOSX_BUNDLE_DISPLAY_NAME TeXmacs)
|
||||||
|
+ set_target_properties (${TeXmacs_binary_name}
|
||||||
|
+ PROPERTIES
|
||||||
|
+ MACOSX_BUNDLE TRUE
|
||||||
|
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in
|
||||||
|
+ DEBUG_OUTPUT_NAME ${TeXmacs_binary_name}${EXE_DEBUG_EXTENSION}
|
||||||
|
+ RELEASE_OUTPUT_NAME ${TeXmacs_binary_name}
|
||||||
|
+ RUNTIME_OUTPUT_DIRECTORY ${TEXMACS_BINARY_DIR}
|
||||||
|
+ )
|
||||||
|
+else (APPLE)
|
||||||
|
+ set_target_properties (${TeXmacs_binary_name}
|
||||||
|
+ PROPERTIES
|
||||||
|
+ DEBUG_OUTPUT_NAME ${TeXmacs_binary_name}${EXE_DEBUG_EXTENSION}
|
||||||
|
+ RELEASE_OUTPUT_NAME ${TeXmacs_binary_name}
|
||||||
|
+ RUNTIME_OUTPUT_DIRECTORY ${TEXMACS_BINARY_DIR}
|
||||||
|
+ )
|
||||||
|
+ install (TARGETS ${TeXmacs_binary_name} DESTINATION lib/texmacs/TeXmacs/bin)
|
||||||
|
+endif (APPLE)
|
||||||
|
+
|
||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/src/CMakeLists.txt.rej TeXmacs-1.99.9-src/src/CMakeLists.txt.rej
|
||||||
|
--- TeXmacs-1.99.9-src.orig/src/CMakeLists.txt.rej 1969-12-31 19:00:00.000000000 -0500
|
||||||
|
+++ TeXmacs-1.99.9-src/src/CMakeLists.txt.rej 2019-06-02 17:12:44.654011478 -0400
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+--- CMakeLists.txt (revision 11761)
|
||||||
|
++++ CMakeLists.txt (working copy)
|
||||||
|
+@@ -274,7 +274,6 @@
|
||||||
|
+ elseif (Guile_VERSION_STRING VERSION_LESS 3.0)
|
||||||
|
+ set (CONFIG_GUILE_SERIAL "D")
|
||||||
|
+ set (GUILE_D 1)
|
||||||
|
+- set (SCM_SIZET size_t)
|
||||||
|
+ else (Guile_VERSION_STRING VERSION_LESS 1.6)
|
||||||
|
+ message (ERROR "Not Guile serial A,B,C or D???")
|
||||||
|
+ endif (Guile_VERSION_STRING VERSION_LESS 1.6)
|
||||||
|
+@@ -286,7 +285,7 @@
|
||||||
|
+
|
||||||
|
+ message (STATUS "Checking the size_t of guile strings")
|
||||||
|
+
|
||||||
|
+-check_c_source_compiles ("
|
||||||
|
++check_cxx_source_compiles ("
|
||||||
|
+ #include <guile/gh.h>
|
||||||
|
+ #include <libguile.h>
|
||||||
|
+ void print_string (SCM s) {
|
||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/src/Scheme/Guile/guile_tm.cpp TeXmacs-1.99.9-src/src/Scheme/Guile/guile_tm.cpp
|
||||||
|
--- TeXmacs-1.99.9-src.orig/src/Scheme/Guile/guile_tm.cpp 2018-03-23 08:44:53.000000000 -0400
|
||||||
|
+++ TeXmacs-1.99.9-src/src/Scheme/Guile/guile_tm.cpp 2019-06-02 17:13:10.420604916 -0400
|
||||||
|
@@ -85,19 +85,34 @@
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
static SCM
|
||||||
|
TeXmacs_lazy_eval_file (char *file) {
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_lazy_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) scm_c_primitive_load, file,
|
||||||
|
(scm_t_catch_handler) TeXmacs_lazy_catcher, file);
|
||||||
|
+#else
|
||||||
|
+ return scm_c_with_throw_handler (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) scm_c_primitive_load, file,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_lazy_catcher,
|
||||||
|
+ file, 0);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SCM
|
||||||
|
TeXmacs_eval_file (char *file) {
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) TeXmacs_lazy_eval_file, file,
|
||||||
|
(scm_t_catch_handler) TeXmacs_catcher, file);
|
||||||
|
#else
|
||||||
|
+ return scm_c_catch (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) TeXmacs_lazy_eval_file, file,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_catcher, file, NULL, NULL);
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
return scm_c_primitive_load (file);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@@ -121,19 +136,33 @@
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
static SCM
|
||||||
|
TeXmacs_lazy_eval_string (char *s) {
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_lazy_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) scm_c_eval_string, s,
|
||||||
|
(scm_t_catch_handler) TeXmacs_lazy_catcher, s);
|
||||||
|
+#else
|
||||||
|
+ return scm_c_with_throw_handler (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) scm_c_eval_string, s,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_lazy_catcher,
|
||||||
|
+ s, 0);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SCM
|
||||||
|
TeXmacs_eval_string (char *s) {
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) TeXmacs_lazy_eval_string, s,
|
||||||
|
(scm_t_catch_handler) TeXmacs_catcher, s);
|
||||||
|
#else
|
||||||
|
+ return scm_c_catch (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) TeXmacs_lazy_eval_string, s,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_catcher, s, NULL, NULL);
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
return scm_c_eval_string(s);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@@ -180,19 +209,35 @@
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
static SCM
|
||||||
|
TeXmacs_lazy_call_scm (arg_list* args) {
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_lazy_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) TeXmacs_call, (void*) args,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_lazy_catcher, (void*) args);
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_lazy_catcher,
|
||||||
|
+ (void*) args);
|
||||||
|
+#else
|
||||||
|
+ return scm_c_with_throw_handler (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) TeXmacs_call, (void*) args,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_lazy_catcher,
|
||||||
|
+ (void*) args, 0);
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SCM
|
||||||
|
TeXmacs_call_scm (arg_list *args) {
|
||||||
|
#ifndef DEBUG_ON
|
||||||
|
+#if (defined(GUILE_A) || defined(GUILE_B))
|
||||||
|
return scm_internal_catch (SCM_BOOL_T,
|
||||||
|
(scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args,
|
||||||
|
(scm_t_catch_handler) TeXmacs_catcher, (void*) args);
|
||||||
|
#else
|
||||||
|
+ return scm_c_catch (SCM_BOOL_T,
|
||||||
|
+ (scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args,
|
||||||
|
+ (scm_t_catch_handler) TeXmacs_catcher, (void*) args,
|
||||||
|
+ NULL, NULL);
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
return TeXmacs_call(args);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@@ -443,7 +488,11 @@
|
||||||
|
return SCM_BOOL_F;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef GUILE_A
|
||||||
|
static scm_sizet
|
||||||
|
+#else
|
||||||
|
+static size_t
|
||||||
|
+#endif
|
||||||
|
free_blackbox (SCM blackbox_smob) {
|
||||||
|
blackbox *ptr = (blackbox *) SCM_CDR (blackbox_smob);
|
||||||
|
#ifdef DEBUG_ON
|
||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/src/Scheme/Guile/guile_tm.hpp TeXmacs-1.99.9-src/src/Scheme/Guile/guile_tm.hpp
|
||||||
|
--- TeXmacs-1.99.9-src.orig/src/Scheme/Guile/guile_tm.hpp 2018-06-28 04:13:37.000000000 -0400
|
||||||
|
+++ TeXmacs-1.99.9-src/src/Scheme/Guile/guile_tm.hpp 2019-06-02 17:13:22.220571381 -0400
|
||||||
|
@@ -83,8 +83,8 @@
|
||||||
|
#define scm_is_double scm_is_real
|
||||||
|
#define scm_new_procedure(name,r,a,b,c) scm_c_define_gsubr(name,a,b,c,(scm_t_subr)r)
|
||||||
|
#define scm_lookup_string(name) scm_variable_ref(scm_c_lookup(name))
|
||||||
|
-#define scm_long2scm scm_long2num
|
||||||
|
-#define scm_scm2long(x) scm_num2long(x,SCM_ARG1,"scm2long")
|
||||||
|
+#define scm_long2scm scm_from_long
|
||||||
|
+#define scm_scm2long(x) scm_to_long(x,SCM_ARG1,"scm2long")
|
||||||
|
#define scm_double2scm scm_from_double
|
||||||
|
#define scm_scm2double scm_to_double
|
||||||
|
#define scm_str2scm scm_from_locale_stringn
|
||||||
|
@@ -103,8 +103,8 @@
|
||||||
|
#define scm_is_double scm_is_real
|
||||||
|
#define scm_new_procedure(name,r,a,b,c) scm_c_define_gsubr(name,a,b,c,r)
|
||||||
|
#define scm_lookup_string(name) scm_variable_ref(scm_c_lookup(name))
|
||||||
|
-#define scm_long2scm scm_long2num
|
||||||
|
-#define scm_scm2long(x) scm_num2long(x,SCM_ARG1,"scm2long")
|
||||||
|
+#define scm_long2scm scm_from_long
|
||||||
|
+#define scm_scm2long(x) scm_to_long(x,SCM_ARG1,"scm2long")
|
||||||
|
#define scm_double2scm scm_from_double
|
||||||
|
#define scm_scm2double scm_to_double
|
||||||
|
#define scm_str2scm scm_from_locale_stringn
|
||||||
|
diff -Naruw TeXmacs-1.99.9-src.orig/src/Scheme/Tiny/tinyscheme_tm.cpp TeXmacs-1.99.9-src/src/Scheme/Tiny/tinyscheme_tm.cpp
|
||||||
|
--- TeXmacs-1.99.9-src.orig/src/Scheme/Tiny/tinyscheme_tm.cpp 2017-09-28 09:44:11.000000000 -0400
|
||||||
|
+++ TeXmacs-1.99.9-src/src/Scheme/Tiny/tinyscheme_tm.cpp 2019-06-02 17:13:27.543889585 -0400
|
||||||
|
@@ -139,22 +139,6 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Evaluation of files
|
||||||
|
******************************************************************************/
|
||||||
|
-#if 0
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_lazy_eval_file (char *file) {
|
||||||
|
-
|
||||||
|
- return scm_internal_lazy_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) scm_c_primitive_load, file,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_lazy_catcher, file);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_eval_file (char *file) {
|
||||||
|
- return scm_internal_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) TeXmacs_lazy_eval_file, file,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_catcher, file);
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
scm
|
||||||
|
eval_scheme_file (string file) {
|
||||||
|
//static int cumul= 0;
|
||||||
|
@@ -172,21 +156,6 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Evaluation of strings
|
||||||
|
******************************************************************************/
|
||||||
|
-#if 0
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_lazy_eval_string (char *s) {
|
||||||
|
- return scm_internal_lazy_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) scm_c_eval_string, s,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_lazy_catcher, s);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_eval_string (char *s) {
|
||||||
|
- return scm_internal_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) TeXmacs_lazy_eval_string, s,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_catcher, s);
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
scm
|
||||||
|
eval_scheme (string s) {
|
||||||
|
// cout << "Eval] " << s << "\n";
|
||||||
|
@@ -214,21 +183,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-#if 0
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_lazy_call_scm (arg_list* args) {
|
||||||
|
- return scm_internal_lazy_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) TeXmacs_call, (void*) args,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_lazy_catcher, (void*) args);
|
||||||
|
-}
|
||||||
|
|
||||||
|
-static scm
|
||||||
|
-TeXmacs_call_scm (arg_list *args) {
|
||||||
|
- return scm_internal_catch (scm_BOOL_T,
|
||||||
|
- (scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args,
|
||||||
|
- (scm_t_catch_handler) TeXmacs_catcher, (void*) args);
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
scm
|
||||||
|
call_scheme (scm fun) {
|
||||||
|
scm a[]= { fun }; arg_list args= { 0, a };
|
@ -0,0 +1,72 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit cmake-utils xdg-utils gnome2-utils qmake-utils
|
||||||
|
|
||||||
|
MY_P=${P/tex/TeX}-src
|
||||||
|
|
||||||
|
DESCRIPTION="Wysiwyg text processor with high-quality maths"
|
||||||
|
HOMEPAGE="http://www.texmacs.org/"
|
||||||
|
SRC_URI="ftp://ftp.texmacs.org/pub/TeXmacs/tmftp/source/${MY_P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="debug jpeg netpbm sqlite svg spell"
|
||||||
|
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
app-text/ghostscript-gpl
|
||||||
|
<dev-scheme/guile-1.9[debug?,deprecated]
|
||||||
|
media-libs/freetype
|
||||||
|
x11-apps/xmodmap
|
||||||
|
x11-libs/libXext
|
||||||
|
virtual/latex-base
|
||||||
|
>=dev-qt/qtcore-5.9.1:5
|
||||||
|
>=dev-qt/qtgui-5.9.1:5
|
||||||
|
>=dev-qt/qtwidgets-5.9.1:5
|
||||||
|
>=dev-qt/qtprintsupport-5.9.1:5
|
||||||
|
sqlite? ( dev-db/sqlite )
|
||||||
|
jpeg? ( || ( media-gfx/imagemagick media-gfx/jpeg2ps ) )
|
||||||
|
netpbm? ( media-libs/netpbm )
|
||||||
|
spell? ( app-text/aspell )
|
||||||
|
svg? ( || ( media-gfx/inkscape gnome-base/librsvg:2 ) )
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
x11-base/xorg-proto"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.99.2-desktop.patch
|
||||||
|
|
||||||
|
# remove new/delete declarations, bug 590002
|
||||||
|
"${FILESDIR}"/${PN}-1.99-remove-new-declaration.patch
|
||||||
|
|
||||||
|
"${FILESDIR}"/${PN}-1.99.6-math_util.patch
|
||||||
|
|
||||||
|
# fix build failure on 32-bit systems, bug #652054
|
||||||
|
# "${FILESDIR}"/${PN}-1.99.6-guile-size_t.patch
|
||||||
|
"${FILESDIR}"/${PN}-1.99.9-guile-remove-deprecated.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DUSE_SQLITE3=$(usex sqlite 1 0)
|
||||||
|
-DDEBUG_ASSERT=$(usex debug 1 0)
|
||||||
|
)
|
||||||
|
cmake-utils_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
xdg_desktop_database_update
|
||||||
|
xdg_mimeinfo_database_update
|
||||||
|
gnome2_icon_cache_update
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
xdg_desktop_database_update
|
||||||
|
xdg_mimeinfo_database_update
|
||||||
|
gnome2_icon_cache_update
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
|
DIST aunit-2019-20190429-18B77-src.tar.gz 624683 BLAKE2B 455c3566ed46138116f258b175e883a59102dc334b41040cd6a332175fc4138d7ccdab1357c5b8886f14e551e3a6f4f4aa73eb755ade4a7a1663ac2d999973ca SHA512 9b1834ebacb9dbaa7a01f702455a44921a26a8d8d00f55ecc2fc8ddf2d884ef2ef2bba0f62551421f5a47d558d0fba88cbd57671459bba0c9f90c6310d714b19
|
||||||
DIST aunit-gpl-2018-src.tar.gz 639544 BLAKE2B a7d7469b0ec4951517b113a794dca4399a27d6d5d848194fc5bfa7728a5cd04644e4b5f1247eb3cfbab64c0294502ac70cdd6e7052cd60b788c7892eddb4294e SHA512 3409b490978e9160e3ec2d9214d50f846c4c38f7a728cd4ff306d6454d1e0944023342f17a580b0449cb528f42d3c608adec58b61318284237d02b7f77498513
|
DIST aunit-gpl-2018-src.tar.gz 639544 BLAKE2B a7d7469b0ec4951517b113a794dca4399a27d6d5d848194fc5bfa7728a5cd04644e4b5f1247eb3cfbab64c0294502ac70cdd6e7052cd60b788c7892eddb4294e SHA512 3409b490978e9160e3ec2d9214d50f846c4c38f7a728cd4ff306d6454d1e0944023342f17a580b0449cb528f42d3c608adec58b61318284237d02b7f77498513
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit multiprocessing
|
||||||
|
|
||||||
|
MYP=${P}-20190429-18B77-src
|
||||||
|
|
||||||
|
DESCRIPTION="Ada unit testing framework"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/tools/aunit/"
|
||||||
|
SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf859431e87aa2cdf16b18
|
||||||
|
-> ${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="gnat_2016 gnat_2017 gnat_2018 +gnat_2019"
|
||||||
|
|
||||||
|
RDEPEND="gnat_2016? ( dev-lang/gnat-gpl:4.9.4 )
|
||||||
|
gnat_2017? ( dev-lang/gnat-gpl:6.3.0 )
|
||||||
|
gnat_2018? ( dev-lang/gnat-gpl:7.3.1 )
|
||||||
|
gnat_2019? ( dev-lang/gnat-gpl:8.3.1 )"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-ada/gprbuild[gnat_2016(-)?,gnat_2017(-)?,gnat_2018(-)?,gnat_2019(-)?]"
|
||||||
|
|
||||||
|
REQUIRED_USE="^^ ( gnat_2016 gnat_2017 gnat_2018 gnat_2019 )"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}"/${PN}-2016-gentoo.patch )
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake GPRBUILD="gprbuild -j$(makeopts_jobs) -v"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake INSTALL="${D}"usr install
|
||||||
|
einstalldocs
|
||||||
|
mv "${D}"usr/share/doc/${PN}/* "${D}"usr/share/doc/${PF}/ || die
|
||||||
|
rmdir "${D}"usr/share/doc/${PN} || die
|
||||||
|
mv "${D}"usr/share/examples/${PN} "${D}"usr/share/doc/${PF}/examples || die
|
||||||
|
rmdir "${D}"usr/share/examples || die
|
||||||
|
rm -r "${D}"/usr/share/gpr/manifests || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
emake PROJECT_PATH_ARG="ADA_PROJECT_PATH=$(pwd)/lib/gnat" -C test
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
|
DIST gnatmem-2019-20190429-19745-src.tar.gz 80136 BLAKE2B 8ae3b41827416f951abb0d0a1fe533946fad2ac8d67ae6aad2b14495a3c068718befbbbf11800c1864f3becaa0ca6dfb838aeec3b3d715b250d4436ccee93c69 SHA512 4354a30efcf95a013f481b3519a79a22f85348840f074c734013d6c73e00fd771118b84eec416260983c383484f7a404217a32c012ca0bd7c37253ba17f2eb85
|
||||||
DIST gnatmem-gpl-2018-src.tar.gz 80101 BLAKE2B c117552c2f8369f588127933ca1ba3075aeea6d7c3867861817b080f633fe26a7692c101b500d7441b49e79e75ce5a771a80287d0fb28bd0f569a358a8976d7d SHA512 539703bcb97cab996a4b4381685b021a419df781be3997538120580944fdcbb021fd28f574f66b8d52adbf5c6f1d7e29495c2115515d761f3cfce5bcc7bd8f56
|
DIST gnatmem-gpl-2018-src.tar.gz 80101 BLAKE2B c117552c2f8369f588127933ca1ba3075aeea6d7c3867861817b080f633fe26a7692c101b500d7441b49e79e75ce5a771a80287d0fb28bd0f569a358a8976d7d SHA512 539703bcb97cab996a4b4381685b021a419df781be3997538120580944fdcbb021fd28f574f66b8d52adbf5c6f1d7e29495c2115515d761f3cfce5bcc7bd8f56
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit multiprocessing autotools
|
||||||
|
|
||||||
|
MYP=${P}-20190429-19745-src
|
||||||
|
|
||||||
|
DESCRIPTION="Monitors dynamic allocation and deallocation activity in a program"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/"
|
||||||
|
SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8e1431e87a8f1d425089
|
||||||
|
-> ${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="gnat_2016 gnat_2017 gnat_2018 +gnat_2019"
|
||||||
|
|
||||||
|
RDEPEND=""
|
||||||
|
DEPEND="dev-ada/gprbuild[gnat_2016(-)?,gnat_2017(-)?,gnat_2018(-)?,gnat_2019(-)?]
|
||||||
|
sys-libs/binutils-libs"
|
||||||
|
|
||||||
|
REQUIRED_USE="^^ ( gnat_2016 gnat_2017 gnat_2018 gnat_2019 )"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}"/${PN}-2018-gentoo.patch )
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
mv configure.in configure.ac
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
gprbuild -v -Pgnatmem.gpr -j$(makeopts_jobs) \
|
||||||
|
-cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS}
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin obj/gnatmem
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
|
DIST gnatsymbolize-2019-20190429-19761-src.tar.gz 14297 BLAKE2B 8ea689266abc485632c04a696c0d30632fdfcc123153ae006158700514ebedd6d067124e59e519a0ebe35569eb0e2fad8dd48a33d49551ba608e14d3ec73d636 SHA512 68e8c9bb2880738160722a2c413c6146c86efd0822236019ca5824eed4a2b392252676d0f96c035830b80068b82344b44953006fc96ea208f6bde6618190336c
|
||||||
DIST gnatsymbolize-gpl-2018-src.tar.gz 14286 BLAKE2B ac655b951b584224e64778fd800c082defee9abce4b3e7e1ac766a38c3b1ed8624c349f249714376e5984e37a9e9df256b6627b6ed2898f2f71fcaa8067cf36b SHA512 4fc21b45c32c08f9911cb7cdc0170e36f1c10d703244bbbfbd525386297b6e6779651751281402e8c4caee668df052e7c1ccc234e5cd88151ee471b8e3f06d0f
|
DIST gnatsymbolize-gpl-2018-src.tar.gz 14286 BLAKE2B ac655b951b584224e64778fd800c082defee9abce4b3e7e1ac766a38c3b1ed8624c349f249714376e5984e37a9e9df256b6627b6ed2898f2f71fcaa8067cf36b SHA512 4fc21b45c32c08f9911cb7cdc0170e36f1c10d703244bbbfbd525386297b6e6779651751281402e8c4caee668df052e7c1ccc234e5cd88151ee471b8e3f06d0f
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit multiprocessing autotools
|
||||||
|
|
||||||
|
MYP=${P}-20190429-19761-src
|
||||||
|
|
||||||
|
DESCRIPTION="Translates addresses into filename, line number, and function names"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/"
|
||||||
|
SRC_URI="http://mirrors.cdn.adacore.com/art/5cc7d5e431e87a23952f18c4 ->
|
||||||
|
${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="gnat_2018 +gnat_2019"
|
||||||
|
|
||||||
|
RDEPEND=""
|
||||||
|
DEPEND="gnat_2018? ( dev-lang/gnat-gpl:7.3.1 )
|
||||||
|
gnat_2019? ( dev-lang/gnat-gpl:8.3.1 )"
|
||||||
|
REQUIRED_USE=" ^^ ( gnat_2018 gnat_2019 )"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if use gnat_2018; then
|
||||||
|
GCC_PV=7.3.1
|
||||||
|
else
|
||||||
|
GCC_PV=8.3.1
|
||||||
|
fi
|
||||||
|
gnatmake-${GCC_PV} -v gnatsymbolize -cargs ${ADAFLAGS} || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin gnatsymbolize
|
||||||
|
}
|
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST psqlodbc-10.01.0000.tar.gz 915109 BLAKE2B a09de8218dbfbacf7972fc02c02863891ed65d19b86217a646aa0176ad7a8b962da83bb5036ad11b819a583409e4d1f3ce257a0457838000bc9cc060753c67b3 SHA512 1c5b9732a9c7e7bff0fd0a04cc7f0b45db9150486a2c3a8a96d85fb55e9296a80f12ee652cfb7ff54700e7dfc10accf9e5420b7ca798df31be51f997bbda88aa
|
DIST psqlodbc-10.01.0000.tar.gz 915109 BLAKE2B a09de8218dbfbacf7972fc02c02863891ed65d19b86217a646aa0176ad7a8b962da83bb5036ad11b819a583409e4d1f3ce257a0457838000bc9cc060753c67b3 SHA512 1c5b9732a9c7e7bff0fd0a04cc7f0b45db9150486a2c3a8a96d85fb55e9296a80f12ee652cfb7ff54700e7dfc10accf9e5420b7ca798df31be51f997bbda88aa
|
||||||
|
DIST psqlodbc-11.01.0000.tar.gz 919372 BLAKE2B ce84b4bb210c4c3c3f2a3e9eae713c875e4bae491e20f207f740a02af69cb771f504de6b1da06fcd12306d986299e1537184a6787eac80e320eea6d8c13dc142 SHA512 57762bfa9925012946e56a3d5b815af00078299c121ba0142865c06f877cabf314512e4e6efc654589fb409c4dd2cbb9a3b7fd7aa1a6ace361879552774b11d7
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
DESCRIPTION="Official ODBC driver for PostgreSQL"
|
||||||
|
HOMEPAGE="https://odbc.postgresql.org/"
|
||||||
|
SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz"
|
||||||
|
SLOT="0"
|
||||||
|
LICENSE="LGPL-2"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="doc iodbc ssl threads"
|
||||||
|
|
||||||
|
DEPEND="dev-db/postgresql:*[ssl?]
|
||||||
|
!iodbc? ( dev-db/unixODBC )
|
||||||
|
iodbc? ( dev-db/libiodbc )
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
$(use_with iodbc) \
|
||||||
|
$(use_with !iodbc unixodbc) \
|
||||||
|
$(use_enable threads pthreads)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${D}" install
|
||||||
|
|
||||||
|
dodoc readme.txt
|
||||||
|
use doc && dodoc docs/*{html,jpg,txt}
|
||||||
|
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
|
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
|
||||||
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
|
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
|
||||||
|
DIST protobuf-3.8.0.tar.gz 4934577 BLAKE2B 4b86ab216e8a8b2c99c3620da9417c0562498e9d4dbf4957db186f51c62b0ed73b1322635a076b2d4054e015bdf6c8c50cc7fd0cb78d24a93b29d2a5b48f66fe SHA512 ba27c64e5193cd4a144bf0c9dc0d195fbbe6e580aaca01960362f0f185074588ca40046d3bcea76e1deae7508b722f6c5be484ea957122ae8e98229c7c3a4ad2
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
# Copyright 2008-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
# True Authors: Arfrever Frehtes Taifersar Arahesis and others
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
JAVA_PKG_IUSE="doc source"
|
||||||
|
|
||||||
|
inherit java-pkg-2 java-pkg-simple
|
||||||
|
|
||||||
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
|
||||||
|
EGIT_SUBMODULES=()
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Google's Protocol Buffers - Java bindings"
|
||||||
|
HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
|
||||||
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
|
SRC_URI=""
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0/19"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~sh ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND="~dev-libs/protobuf-${PV}
|
||||||
|
>=virtual/jdk-1.7"
|
||||||
|
RDEPEND=">=virtual/jre-1.7
|
||||||
|
!<dev-libs/protobuf-3[java(-)]"
|
||||||
|
|
||||||
|
S="${WORKDIR}/protobuf-${PV}/java"
|
||||||
|
|
||||||
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
|
EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
java-pkg-2_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
"${EPREFIX}/usr/bin/protoc" --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto || die
|
||||||
|
JAVA_SRC_DIR="core/src/main/java" JAVA_JAR_FILENAME="protobuf.jar" java-pkg-simple_src_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
JAVA_SRC_DIR="core/src/main/java" JAVA_JAR_FILENAME="protobuf.jar" java-pkg-simple_src_install
|
||||||
|
}
|
Binary file not shown.
@ -1,175 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 versionator toolchain-funcs
|
|
||||||
|
|
||||||
MY_P="rust-${PV}"
|
|
||||||
|
|
||||||
DESCRIPTION="Systems programming language from Mozilla"
|
|
||||||
HOMEPAGE="https://www.rust-lang.org/"
|
|
||||||
SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
|
|
||||||
arm? (
|
|
||||||
https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
|
|
||||||
https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
|
|
||||||
https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
|
|
||||||
)
|
|
||||||
arm64? ( https://static.rust-lang.org/dist/${MY_P}-aarch64-unknown-linux-gnu.tar.xz )
|
|
||||||
x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
|
|
||||||
|
|
||||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
|
||||||
SLOT="stable"
|
|
||||||
KEYWORDS="amd64 ~arm64 x86"
|
|
||||||
IUSE="cargo clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
|
|
||||||
cargo? (
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-util/cargo
|
|
||||||
)
|
|
||||||
!dev-lang/rust:0
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
|
|
||||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
QA_PREBUILT="
|
|
||||||
opt/${P}/bin/*-${PV}
|
|
||||||
opt/${P}/lib/*.so
|
|
||||||
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
|
|
||||||
|
|
||||||
local postfix
|
|
||||||
use amd64 && postfix=x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
|
|
||||||
postfix=arm-unknown-linux-gnueabi
|
|
||||||
elif use arm && [[ ${CHOST} == armv6*h* ]]; then
|
|
||||||
postfix=arm-unknown-linux-gnueabihf
|
|
||||||
elif use arm && [[ ${CHOST} == armv7*h* ]]; then
|
|
||||||
postfix=armv7-unknown-linux-gnueabihf
|
|
||||||
fi
|
|
||||||
|
|
||||||
use arm64 && postfix=aarch64-unknown-linux-gnu
|
|
||||||
use x86 && postfix=i686-unknown-linux-gnu
|
|
||||||
mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local std=$(grep 'std' ./components)
|
|
||||||
local components="rustc,${std}"
|
|
||||||
use doc && components="${components},rust-docs"
|
|
||||||
use cargo && components="${components},cargo"
|
|
||||||
use clippy && components="${components},clippy-preview"
|
|
||||||
use rustfmt && components="${components},rustfmt-preview"
|
|
||||||
./install.sh \
|
|
||||||
--components="${components}" \
|
|
||||||
--disable-verify \
|
|
||||||
--prefix="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
if use cargo; then
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
local clippy_driver=clippy-driver-bin-${PV}
|
|
||||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/usr/bin/rust-lldb
|
|
||||||
EOF
|
|
||||||
if use cargo; then
|
|
||||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,154 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 rust-toolchain versionator toolchain-funcs
|
|
||||||
|
|
||||||
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 ~arm64 ~x86"
|
|
||||||
IUSE="cargo clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
|
|
||||||
cargo? (
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-util/cargo
|
|
||||||
)
|
|
||||||
!dev-lang/rust:0
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
|
|
||||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
QA_PREBUILT="
|
|
||||||
opt/${P}/bin/*-${PV}
|
|
||||||
opt/${P}/lib/*.so
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local std=$(grep 'std' ./components)
|
|
||||||
local components="rustc,${std}"
|
|
||||||
use doc && components="${components},rust-docs"
|
|
||||||
use cargo && components="${components},cargo"
|
|
||||||
use clippy && components="${components},clippy-preview"
|
|
||||||
use rustfmt && components="${components},rustfmt-preview"
|
|
||||||
./install.sh \
|
|
||||||
--components="${components}" \
|
|
||||||
--disable-verify \
|
|
||||||
--prefix="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
if use cargo; then
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
local clippy_driver=clippy-driver-bin-${PV}
|
|
||||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/usr/bin/rust-lldb
|
|
||||||
EOF
|
|
||||||
if use cargo; then
|
|
||||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,144 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 rust-toolchain versionator toolchain-funcs
|
|
||||||
|
|
||||||
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 ~arm64 ~ppc64 ~x86"
|
|
||||||
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-20190311
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-lang/rust:0
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
QA_PREBUILT="
|
|
||||||
opt/${P}/bin/*-${PV}
|
|
||||||
opt/${P}/lib/*.so
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local 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="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,144 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 rust-toolchain toolchain-funcs
|
|
||||||
|
|
||||||
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 ~arm64 ~ppc64 ~x86"
|
|
||||||
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-20190311
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-lang/rust:0
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
QA_PREBUILT="
|
|
||||||
opt/${P}/bin/*-${PV}
|
|
||||||
opt/${P}/lib/*.so
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local 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="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,156 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 rust-toolchain toolchain-funcs
|
|
||||||
|
|
||||||
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 ~arm64 ~ppc64 ~x86"
|
|
||||||
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-20190311
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-lang/rust:0
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local 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="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
# ugly hack for https://bugs.gentoo.org/679806
|
|
||||||
if use ppc64; then
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die
|
|
||||||
sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die
|
|
||||||
cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}"
|
|
||||||
#!/bin/sh
|
|
||||||
OPENSSL_ppccap=0 $(realpath $0).bin "${@}"
|
|
||||||
EOF
|
|
||||||
fperms +x "/opt/${P}/bin/${cargo}"
|
|
||||||
else
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
fi
|
|
||||||
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 "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,156 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit eutils bash-completion-r1 rust-toolchain toolchain-funcs
|
|
||||||
|
|
||||||
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 ~arm64 ~ppc64 ~x86"
|
|
||||||
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND=">=app-eselect/eselect-rust-20190311
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
!dev-lang/rust:0
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local 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="${D}/opt/${P}" \
|
|
||||||
--mandir="${D}/usr/share/${P}/man" \
|
|
||||||
--disable-ldconfig \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
local rustc=rustc-bin-${PV}
|
|
||||||
local rustdoc=rustdoc-bin-${PV}
|
|
||||||
local rustgdb=rust-gdb-bin-${PV}
|
|
||||||
local rustlldb=rust-lldb-bin-${PV}
|
|
||||||
|
|
||||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
|
||||||
|
|
||||||
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/${rustlldb}" "/usr/bin/${rustlldb}"
|
|
||||||
|
|
||||||
local cargo=cargo-bin-${PV}
|
|
||||||
# ugly hack for https://bugs.gentoo.org/679806
|
|
||||||
if use ppc64; then
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die
|
|
||||||
sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die
|
|
||||||
cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}"
|
|
||||||
#!/bin/sh
|
|
||||||
OPENSSL_ppccap=0 $(realpath $0).bin "${@}"
|
|
||||||
EOF
|
|
||||||
fperms +x "/opt/${P}/bin/${cargo}"
|
|
||||||
else
|
|
||||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
|
||||||
fi
|
|
||||||
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 "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
|
||||||
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 "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
|
||||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
|
||||||
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="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 now,"
|
|
||||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
--- a/src/tools/clippy/src/driver.rs 2018-10-04 16:30:42.438486058 +0300
|
|
||||||
+++ b/src/tools/clippy/src/driver.rs 2018-10-04 16:31:45.044484028 +0300
|
|
||||||
@@ -20,54 +20,22 @@
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- let sys_root = option_env!("SYSROOT")
|
|
||||||
- .map(String::from)
|
|
||||||
- .or_else(|| std::env::var("SYSROOT").ok())
|
|
||||||
- .or_else(|| {
|
|
||||||
- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
|
|
||||||
- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
|
|
||||||
- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
|
|
||||||
- })
|
|
||||||
- .or_else(|| {
|
|
||||||
- Command::new("rustc")
|
|
||||||
- .arg("--print")
|
|
||||||
- .arg("sysroot")
|
|
||||||
- .output()
|
|
||||||
- .ok()
|
|
||||||
- .and_then(|out| String::from_utf8(out.stdout).ok())
|
|
||||||
- .map(|s| s.trim().to_owned())
|
|
||||||
- })
|
|
||||||
- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
|
|
||||||
-
|
|
||||||
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
|
|
||||||
// We're invoking the compiler programmatically, so we ignore this/
|
|
||||||
- let mut orig_args: Vec<String> = env::args().collect();
|
|
||||||
- if orig_args.len() <= 1 {
|
|
||||||
+ let mut args: Vec<String> = env::args().collect();
|
|
||||||
+ if args.len() <= 1 {
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
- if orig_args[1] == "rustc" {
|
|
||||||
+ if args[1] == "rustc" {
|
|
||||||
// we still want to be able to invoke it normally though
|
|
||||||
- orig_args.remove(1);
|
|
||||||
+ args.remove(1);
|
|
||||||
}
|
|
||||||
- // this conditional check for the --sysroot flag is there so users can call
|
|
||||||
- // `clippy_driver` directly
|
|
||||||
- // without having to pass --sysroot or anything
|
|
||||||
- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
|
|
||||||
- orig_args.clone()
|
|
||||||
- } else {
|
|
||||||
- orig_args
|
|
||||||
- .clone()
|
|
||||||
- .into_iter()
|
|
||||||
- .chain(Some("--sysroot".to_owned()))
|
|
||||||
- .chain(Some(sys_root))
|
|
||||||
- .collect()
|
|
||||||
- };
|
|
||||||
|
|
||||||
// this check ensures that dependencies are built but not linted and the final
|
|
||||||
// crate is
|
|
||||||
// linted but not built
|
|
||||||
let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
|
|
||||||
- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
|
|
||||||
if clippy_enabled {
|
|
||||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
|
@ -1,62 +0,0 @@
|
|||||||
--- a/src/tools/clippy/src/driver.rs 2018-10-25 20:09:06.143109996 +0300
|
|
||||||
+++ b/src/tools/clippy/src/driver.rs 2018-10-25 20:11:09.204106005 +0300
|
|
||||||
@@ -29,54 +29,22 @@
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
- let sys_root = option_env!("SYSROOT")
|
|
||||||
- .map(String::from)
|
|
||||||
- .or_else(|| std::env::var("SYSROOT").ok())
|
|
||||||
- .or_else(|| {
|
|
||||||
- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
|
|
||||||
- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
|
|
||||||
- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
|
|
||||||
- })
|
|
||||||
- .or_else(|| {
|
|
||||||
- Command::new("rustc")
|
|
||||||
- .arg("--print")
|
|
||||||
- .arg("sysroot")
|
|
||||||
- .output()
|
|
||||||
- .ok()
|
|
||||||
- .and_then(|out| String::from_utf8(out.stdout).ok())
|
|
||||||
- .map(|s| s.trim().to_owned())
|
|
||||||
- })
|
|
||||||
- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
|
|
||||||
-
|
|
||||||
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
|
|
||||||
// We're invoking the compiler programmatically, so we ignore this/
|
|
||||||
- let mut orig_args: Vec<String> = env::args().collect();
|
|
||||||
- if orig_args.len() <= 1 {
|
|
||||||
+ let mut args: Vec<String> = env::args().collect();
|
|
||||||
+ if args.len() <= 1 {
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
|
|
||||||
+ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
|
|
||||||
// we still want to be able to invoke it normally though
|
|
||||||
- orig_args.remove(1);
|
|
||||||
+ args.remove(1);
|
|
||||||
}
|
|
||||||
- // this conditional check for the --sysroot flag is there so users can call
|
|
||||||
- // `clippy_driver` directly
|
|
||||||
- // without having to pass --sysroot or anything
|
|
||||||
- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
|
|
||||||
- orig_args.clone()
|
|
||||||
- } else {
|
|
||||||
- orig_args
|
|
||||||
- .clone()
|
|
||||||
- .into_iter()
|
|
||||||
- .chain(Some("--sysroot".to_owned()))
|
|
||||||
- .chain(Some(sys_root))
|
|
||||||
- .collect()
|
|
||||||
- };
|
|
||||||
|
|
||||||
// this check ensures that dependencies are built but not linted and the final
|
|
||||||
// crate is
|
|
||||||
// linted but not built
|
|
||||||
let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
|
|
||||||
- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
|
|
||||||
if clippy_enabled {
|
|
||||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
|
@ -1,32 +0,0 @@
|
|||||||
Revert "[CMake] Unconditionally add .h and .td files to target sources"
|
|
||||||
|
|
||||||
This reverts commit https://github.com/llvm-mirror/llvm/commit/6fb010f388bb2cb2f00fe039123092308ac4865d.
|
|
||||||
|
|
||||||
Bug: https://bugs.gentoo.org/675752#c7
|
|
||||||
--- a/src/llvm/cmake/modules/LLVMProcessSources.cmake
|
|
||||||
+++ b/src/llvm/cmake/modules/LLVMProcessSources.cmake
|
|
||||||
@@ -52,15 +52,16 @@ function(llvm_process_sources OUT_VAR)
|
|
||||||
cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN})
|
|
||||||
set(sources ${ARG_UNPARSED_ARGUMENTS})
|
|
||||||
llvm_check_source_file_list( ${sources} )
|
|
||||||
-
|
|
||||||
- # This adds .td and .h files to the Visual Studio solution:
|
|
||||||
- add_td_sources(sources)
|
|
||||||
- find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
|
|
||||||
- if (hdrs)
|
|
||||||
- set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
|
|
||||||
+ if( LLVM_ENABLE_IDE )
|
|
||||||
+ # This adds .td and .h files to the Visual Studio solution:
|
|
||||||
+ add_td_sources(sources)
|
|
||||||
+ find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
|
|
||||||
+ if (hdrs)
|
|
||||||
+ set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
|
|
||||||
+ endif()
|
|
||||||
+ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
|
|
||||||
+ list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
|
|
||||||
endif()
|
|
||||||
- set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
|
|
||||||
- list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
|
|
||||||
|
|
||||||
set( ${OUT_VAR} ${sources} PARENT_SCOPE )
|
|
||||||
endfunction(llvm_process_sources)
|
|
@ -1,30 +0,0 @@
|
|||||||
diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
|
|
||||||
index 0a703777e..0063f9e9d 100644
|
|
||||||
--- a/vendor/openssl-sys/.cargo-checksum.json
|
|
||||||
+++ b/vendor/openssl-sys/.cargo-checksum.json
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-{"files":{"Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"f509c63668156ce48b93d05d5483a5bfb112dc8f786ff6296f7801add2db7452","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58fa19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"0fd6fd2d7215f6b4a2065d352708155938f268a51df044fb7bd0b184b7cd122b","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58fa19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"}
|
|
||||||
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
|
|
||||||
index 2b1691230..024491358 100644
|
|
||||||
--- a/vendor/openssl-sys/build/main.rs
|
|
||||||
+++ b/vendor/openssl-sys/build/main.rs
|
|
||||||
@@ -500,6 +500,8 @@ See rust-openssl README for more information:
|
|
||||||
(7, _) => ('7', 'x'),
|
|
||||||
(8, 0) => ('8', '0'),
|
|
||||||
(8, 1) => ('8', '1'),
|
|
||||||
+ (8, _) => ('8', 'x'),
|
|
||||||
+ (9, 0) => ('9', '0'),
|
|
||||||
_ => version_error(),
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -540,7 +542,7 @@ fn version_error() -> ! {
|
|
||||||
"
|
|
||||||
|
|
||||||
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
|
|
||||||
-through 2.8.1, but a different version of OpenSSL was found. The build is now aborting
|
|
||||||
+through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
|
|
||||||
due to this version mismatch.
|
|
||||||
|
|
||||||
"
|
|
@ -1,33 +0,0 @@
|
|||||||
From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Tromey <tom@tromey.com>
|
|
||||||
Date: Tue, 22 Jan 2019 11:13:53 -0700
|
|
||||||
Subject: [PATCH] Fix issue 57762
|
|
||||||
|
|
||||||
Issue 57762 points out a compiler crash when the compiler was built
|
|
||||||
using a stock LLVM 7. LLVM 7 was released without a necessary fix for
|
|
||||||
a bug in the DWARF discriminant code.
|
|
||||||
|
|
||||||
This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
|
|
||||||
|
|
||||||
Closes #57762
|
|
||||||
---
|
|
||||||
src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
||||||
index 6deedd0b5ea3..a354eef6887a 100644
|
|
||||||
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
||||||
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
||||||
@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
|
|
||||||
// On MSVC we have to use the fallback mode, because LLVM doesn't
|
|
||||||
// lower variant parts to PDB.
|
|
||||||
return cx.sess().target.target.options.is_like_msvc
|
|
||||||
- || llvm_util::get_major_version() < 7;
|
|
||||||
+ || llvm_util::get_major_version() < 7
|
|
||||||
+ // LLVM version 7 did not release with an important bug fix;
|
|
||||||
+ // but the required patch is in the equivalent Rust LLVM.
|
|
||||||
+ // See https://github.com/rust-lang/rust/issues/57762.
|
|
||||||
+ || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
|
|
||||||
}
|
|
||||||
|
|
||||||
// Describes the members of an enum value: An enum is described as a union of
|
|
@ -1,62 +0,0 @@
|
|||||||
--- a/src/tools/clippy/src/driver.rs 2019-03-01 20:52:40.685331653 +0300
|
|
||||||
+++ b/src/tools/clippy/src/driver.rs 2019-03-01 20:54:44.161327649 +0300
|
|
||||||
@@ -31,54 +31,22 @@
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
- let sys_root = option_env!("SYSROOT")
|
|
||||||
- .map(String::from)
|
|
||||||
- .or_else(|| std::env::var("SYSROOT").ok())
|
|
||||||
- .or_else(|| {
|
|
||||||
- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
|
|
||||||
- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
|
|
||||||
- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
|
|
||||||
- })
|
|
||||||
- .or_else(|| {
|
|
||||||
- Command::new("rustc")
|
|
||||||
- .arg("--print")
|
|
||||||
- .arg("sysroot")
|
|
||||||
- .output()
|
|
||||||
- .ok()
|
|
||||||
- .and_then(|out| String::from_utf8(out.stdout).ok())
|
|
||||||
- .map(|s| s.trim().to_owned())
|
|
||||||
- })
|
|
||||||
- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
|
|
||||||
-
|
|
||||||
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
|
|
||||||
// We're invoking the compiler programmatically, so we ignore this/
|
|
||||||
- let mut orig_args: Vec<String> = env::args().collect();
|
|
||||||
- if orig_args.len() <= 1 {
|
|
||||||
+ let mut args: Vec<String> = env::args().collect();
|
|
||||||
+ if args.len() <= 1 {
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
|
|
||||||
+ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
|
|
||||||
// we still want to be able to invoke it normally though
|
|
||||||
- orig_args.remove(1);
|
|
||||||
+ args.remove(1);
|
|
||||||
}
|
|
||||||
- // this conditional check for the --sysroot flag is there so users can call
|
|
||||||
- // `clippy_driver` directly
|
|
||||||
- // without having to pass --sysroot or anything
|
|
||||||
- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
|
|
||||||
- orig_args.clone()
|
|
||||||
- } else {
|
|
||||||
- orig_args
|
|
||||||
- .clone()
|
|
||||||
- .into_iter()
|
|
||||||
- .chain(Some("--sysroot".to_owned()))
|
|
||||||
- .chain(Some(sys_root))
|
|
||||||
- .collect()
|
|
||||||
- };
|
|
||||||
|
|
||||||
// this check ensures that dependencies are built but not linted and the final
|
|
||||||
// crate is
|
|
||||||
// linted but not built
|
|
||||||
let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
|
|
||||||
- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
|
|
||||||
|
|
||||||
if clippy_enabled {
|
|
||||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
|
@ -1,290 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
|
||||||
|
|
||||||
inherit eapi7-ver multiprocessing multilib-build python-any-r1 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 ~arm64 x86"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CHOST_amd64=x86_64-unknown-linux-gnu
|
|
||||||
CHOST_x86=i686-unknown-linux-gnu
|
|
||||||
CHOST_arm64=aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
|
|
||||||
RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
|
|
||||||
RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
|
|
||||||
RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
|
|
||||||
|
|
||||||
CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
|
|
||||||
|
|
||||||
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
|
|
||||||
amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz )
|
|
||||||
x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
|
|
||||||
arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
|
|
||||||
"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
|
|
||||||
|
|
||||||
COMMON_DEPEND="jemalloc? ( dev-libs/jemalloc )
|
|
||||||
cargo? (
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
)"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-0.3_pre20150425
|
|
||||||
cargo? ( !dev-util/cargo )
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
|
|
||||||
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
local rust_stage0_name="RUST_STAGE0_${ARCH}"
|
|
||||||
local rust_stage0="${!rust_stage0_name}"
|
|
||||||
|
|
||||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local rust_target="" rust_targets="" rust_target_name arch_cflags
|
|
||||||
|
|
||||||
# Collect rust target names to compile standard libs for all ABIs.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
rust_target_name="CHOST_${v##*.}"
|
|
||||||
rust_targets="${rust_targets},\"${!rust_target_name}\""
|
|
||||||
done
|
|
||||||
if use wasm; then
|
|
||||||
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="false" tools=""
|
|
||||||
if use cargo; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"cargo\","
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target_name="CHOST_${ARCH}"
|
|
||||||
rust_target="${!rust_target_name}"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
[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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
use-jemalloc = $(toml_usex jemalloc)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
rust_target=$(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
|
|
||||||
done
|
|
||||||
|
|
||||||
if use wasm; then
|
|
||||||
cat <<- EOF >> "${S}"/config.toml
|
|
||||||
[target.wasm32-unknown-unknown]
|
|
||||||
linker = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
if use cargo; then
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(get_abi_CHOST ${v##*.})
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/usr/bin/rust-lldb
|
|
||||||
EOF
|
|
||||||
if use cargo; then
|
|
||||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
|
||||||
echo /usr/bin/cargo-clippy >> "${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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,279 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
|
||||||
|
|
||||||
inherit eapi7-ver 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 ~arm64 ~x86"
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
|
|
||||||
|
|
||||||
CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
|
|
||||||
|
|
||||||
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
|
|
||||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
|
|
||||||
|
|
||||||
COMMON_DEPEND="jemalloc? ( dev-libs/jemalloc )
|
|
||||||
cargo? (
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
)"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMOND_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-0.3_pre20150425
|
|
||||||
cargo? ( !dev-util/cargo )
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
|
|
||||||
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
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
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local rust_target="" rust_targets="" rust_target_name 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\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="false" tools=""
|
|
||||||
if use cargo; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"cargo\","
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
extended="true"
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target="$(rust_abi)"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
[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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)/${P}"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
use-jemalloc = $(toml_usex jemalloc)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
rust_target=$(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
|
|
||||||
done
|
|
||||||
|
|
||||||
if use wasm; then
|
|
||||||
cat <<- EOF >> "${S}"/config.toml
|
|
||||||
[target.wasm32-unknown-unknown]
|
|
||||||
linker = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
if use cargo; then
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(get_abi_CHOST ${v##*.})
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/usr/bin/rust-lldb
|
|
||||||
EOF
|
|
||||||
if use cargo; then
|
|
||||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
|
||||||
fi
|
|
||||||
if use clippy; then
|
|
||||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
|
||||||
echo /usr/bin/cargo-clippy >> "${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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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 || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,299 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
|
||||||
|
|
||||||
LLVM_MAX_SLOT=7
|
|
||||||
|
|
||||||
inherit check-reqs eapi7-ver 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 ~arm64 ~ppc64 ~x86"
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
|
|
||||||
|
|
||||||
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
|
|
||||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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 +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
|
|
||||||
|
|
||||||
COMMON_DEPEND="
|
|
||||||
jemalloc? ( dev-libs/jemalloc )
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
system-llvm? ( >=sys-devel/llvm-6:= )"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-20190311
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
pre_build_checks() {
|
|
||||||
CHECKREQS_DISK_BUILD="7G"
|
|
||||||
eshopts_push -s extglob
|
|
||||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
|
||||||
CHECKREQS_DISK_BUILD="10G"
|
|
||||||
fi
|
|
||||||
eshopts_pop
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
pre_build_checks
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
pre_build_checks
|
|
||||||
python-any-r1_pkg_setup
|
|
||||||
if use system-llvm; then
|
|
||||||
llvm_pkg_setup
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
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
|
|
||||||
|
|
||||||
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\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="true" tools="\"cargo\","
|
|
||||||
if use clippy; then
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target="$(rust_abi)"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
experimental-targets = "$(usex wasm WebAssembly '')"
|
|
||||||
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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)/${P}"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
use-jemalloc = $(toml_usex jemalloc)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
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
|
|
||||||
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 = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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 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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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}."
|
|
||||||
|
|
||||||
ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
|
|
||||||
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
|
|
||||||
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,298 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
|
||||||
|
|
||||||
LLVM_MAX_SLOT=7
|
|
||||||
|
|
||||||
inherit check-reqs eapi7-ver 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 ~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
|
|
||||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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 +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
|
|
||||||
|
|
||||||
COMMON_DEPEND="jemalloc? ( dev-libs/jemalloc )
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
system-llvm? ( >=sys-devel/llvm-6:= )"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-20190311
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch )
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
pre_build_checks() {
|
|
||||||
CHECKREQS_DISK_BUILD="7G"
|
|
||||||
eshopts_push -s extglob
|
|
||||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
|
||||||
CHECKREQS_DISK_BUILD="10G"
|
|
||||||
fi
|
|
||||||
eshopts_pop
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
pre_build_checks
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
pre_build_checks
|
|
||||||
python-any-r1_pkg_setup
|
|
||||||
if use system-llvm; then
|
|
||||||
llvm_pkg_setup
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
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
|
|
||||||
|
|
||||||
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\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="true" tools="\"cargo\","
|
|
||||||
if use clippy; then
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target="$(rust_abi)"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
experimental-targets = "$(usex wasm WebAssembly '')"
|
|
||||||
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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)/${P}"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
use-jemalloc = $(toml_usex jemalloc)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
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
|
|
||||||
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 = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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 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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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}."
|
|
||||||
|
|
||||||
ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
|
|
||||||
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
|
|
||||||
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,309 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
|
||||||
|
|
||||||
LLVM_MAX_SLOT=7
|
|
||||||
|
|
||||||
inherit check-reqs eapi7-ver 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 ~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
|
|
||||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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 rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
|
|
||||||
|
|
||||||
COMMON_DEPEND="sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
system-llvm? ( sys-devel/llvm:7= )"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-20190311
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/1.30.1-clippy-sysroot.patch
|
|
||||||
"${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
|
|
||||||
"${FILESDIR}"/1.32.0-system-llvm-7-SIGSEGV.patch
|
|
||||||
# Support LibreSSL 2.8.x: https://github.com/sfackler/rust-openssl/commit/9fd7584a84168655cb27e03b7e19a9847b88e77f
|
|
||||||
# Support LibreSSL 2.9.0: https://github.com/sfackler/rust-openssl/commit/af4488357c9b3e003b883e89c16aaa675ad0c6ac
|
|
||||||
"${FILESDIR}"/1.32.0-libressl.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
pre_build_checks() {
|
|
||||||
CHECKREQS_DISK_BUILD="7G"
|
|
||||||
eshopts_push -s extglob
|
|
||||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
|
||||||
CHECKREQS_DISK_BUILD="10G"
|
|
||||||
fi
|
|
||||||
eshopts_pop
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
pre_build_checks
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
pre_build_checks
|
|
||||||
python-any-r1_pkg_setup
|
|
||||||
if use system-llvm; then
|
|
||||||
llvm_pkg_setup
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
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
|
|
||||||
|
|
||||||
# ugly hack for https://bugs.gentoo.org/679806
|
|
||||||
if use ppc64; then
|
|
||||||
sed -i 's/getentropy/gEtEnTrOpY/g' "${rust_stage0_root}"/bin/cargo || die
|
|
||||||
export OPENSSL_ppccap=0
|
|
||||||
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\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="true" tools="\"cargo\","
|
|
||||||
if use clippy; then
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target="$(rust_abi)"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
experimental-targets = "$(usex wasm WebAssembly '')"
|
|
||||||
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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)/${P}"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
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
|
|
||||||
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 = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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 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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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}."
|
|
||||||
|
|
||||||
ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
|
|
||||||
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
|
|
||||||
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -1,322 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
|
|
||||||
|
|
||||||
inherit check-reqs eapi7-ver 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 ~arm64 ~ppc64 ~x86"
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
|
|
||||||
|
|
||||||
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
|
|
||||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
|
||||||
|
|
||||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
|
||||||
NVPTX PowerPC Sparc SystemZ 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 rls rustfmt 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 one than more 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. < 8.
|
|
||||||
# 3. Specify LLVM_MAX_SLOT, e.g. 7.
|
|
||||||
LLVM_DEPEND="
|
|
||||||
|| (
|
|
||||||
sys-devel/llvm:7
|
|
||||||
)
|
|
||||||
<sys-devel/llvm-8:=
|
|
||||||
"
|
|
||||||
LLVM_MAX_SLOT=7
|
|
||||||
|
|
||||||
COMMON_DEPEND="
|
|
||||||
sys-libs/zlib
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
net-libs/libssh2
|
|
||||||
net-libs/http-parser:=
|
|
||||||
net-misc/curl[ssl]
|
|
||||||
system-llvm? (
|
|
||||||
${LLVM_DEPEND}
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
|| (
|
|
||||||
>=sys-devel/gcc-4.7
|
|
||||||
>=sys-devel/clang-3.5
|
|
||||||
)
|
|
||||||
dev-util/cmake"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
>=app-eselect/eselect-rust-20190311
|
|
||||||
!dev-util/cargo
|
|
||||||
rustfmt? ( !dev-util/rustfmt )"
|
|
||||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
|
||||||
x86? ( cpu_flags_x86_sse2 )"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
|
|
||||||
"${FILESDIR}"/1.33.0-clippy-sysroot.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
toml_usex() {
|
|
||||||
usex "$1" true false
|
|
||||||
}
|
|
||||||
|
|
||||||
pre_build_checks() {
|
|
||||||
CHECKREQS_DISK_BUILD="7G"
|
|
||||||
eshopts_push -s extglob
|
|
||||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
|
||||||
CHECKREQS_DISK_BUILD="10G"
|
|
||||||
fi
|
|
||||||
eshopts_pop
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
pre_build_checks
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
pre_build_checks
|
|
||||||
python-any-r1_pkg_setup
|
|
||||||
use system-llvm && llvm_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
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
|
|
||||||
|
|
||||||
# ugly hack for https://bugs.gentoo.org/679806
|
|
||||||
if use ppc64; then
|
|
||||||
sed -i 's/getentropy/gEtEnTrOpY/g' "${rust_stage0_root}"/bin/cargo || die
|
|
||||||
export OPENSSL_ppccap=0
|
|
||||||
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\""
|
|
||||||
fi
|
|
||||||
rust_targets="${rust_targets#,}"
|
|
||||||
|
|
||||||
local extended="true" tools="\"cargo\","
|
|
||||||
if use clippy; then
|
|
||||||
tools="\"clippy\",$tools"
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
tools="\"rustfmt\",$tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
|
||||||
|
|
||||||
rust_target="$(rust_abi)"
|
|
||||||
|
|
||||||
cat <<- EOF > "${S}"/config.toml
|
|
||||||
[llvm]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
release-debuginfo = $(toml_usex debug)
|
|
||||||
assertions = $(toml_usex debug)
|
|
||||||
targets = "${LLVM_TARGETS// /;}"
|
|
||||||
experimental-targets = "$(usex wasm WebAssembly '')"
|
|
||||||
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)
|
|
||||||
submodules = false
|
|
||||||
python = "${EPYTHON}"
|
|
||||||
locked-deps = true
|
|
||||||
vendor = true
|
|
||||||
extended = ${extended}
|
|
||||||
tools = [${tools}]
|
|
||||||
[install]
|
|
||||||
prefix = "${EPREFIX}/usr"
|
|
||||||
libdir = "$(get_libdir)/${P}"
|
|
||||||
docdir = "share/doc/${P}"
|
|
||||||
mandir = "share/${P}/man"
|
|
||||||
[rust]
|
|
||||||
optimize = $(toml_usex !debug)
|
|
||||||
debuginfo = $(toml_usex debug)
|
|
||||||
debug-assertions = $(toml_usex debug)
|
|
||||||
default-linker = "$(tc-getCC)"
|
|
||||||
channel = "stable"
|
|
||||||
rpath = false
|
|
||||||
lld = $(toml_usex wasm)
|
|
||||||
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
|
|
||||||
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 = "rust-lld"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
env $(cat "${S}"/config.env)\
|
|
||||||
"${EPYTHON}" ./x.py build -v --config="${S}"/config.toml -j$(makeopts_jobs) \
|
|
||||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local rust_target abi_libdir
|
|
||||||
|
|
||||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install -v || die
|
|
||||||
|
|
||||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
|
||||||
if use clippy; then
|
|
||||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rls; then
|
|
||||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
|
||||||
fi
|
|
||||||
if use rustfmt; then
|
|
||||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
|
||||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy shared library versions of standard libraries for all targets
|
|
||||||
# into the system's abi-dependent lib directories because the rust
|
|
||||||
# installer only does so for the native ABI.
|
|
||||||
for v in $(multilib_get_enabled_abi_pairs); do
|
|
||||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
|
||||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
|
||||||
mkdir -p "${D}/usr/${abi_libdir}"
|
|
||||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
|
||||||
"${D}/usr/${abi_libdir}" || die
|
|
||||||
done
|
|
||||||
|
|
||||||
dodoc COPYRIGHT
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Really not sure if that env is needed, specailly LDPATH
|
|
||||||
cat <<-EOF > "${T}"/50${P}
|
|
||||||
LDPATH="/usr/$(get_libdir)/${P}"
|
|
||||||
MANPATH="/usr/share/${P}/man"
|
|
||||||
EOF
|
|
||||||
doenvd "${T}"/50${P}
|
|
||||||
|
|
||||||
cat <<-EOF > "${T}/provider-${P}"
|
|
||||||
/usr/bin/rustdoc
|
|
||||||
/usr/bin/rust-gdb
|
|
||||||
/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 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
|
|
||||||
dodir /etc/env.d/rust
|
|
||||||
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}."
|
|
||||||
|
|
||||||
ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
|
|
||||||
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
|
|
||||||
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
|
|
||||||
|
|
||||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
|
|
||||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
eselect rust unset --if-invalid
|
|
||||||
}
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From 6ff7ad09daf98e5b804cf73c066c382a76e74e8c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Miller <alex.miller@gmx.de>
|
||||||
|
Date: Wed, 12 Jun 2019 00:29:23 -0500
|
||||||
|
Subject: [PATCH] Fix breakage with lto builds
|
||||||
|
|
||||||
|
<artificial>:(.text+0x7a): undefined reference to `PopActiveVMFrame'
|
||||||
|
collect2: error: ld returned 1 exit status
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Miller <alex.miller@gmx.de>
|
||||||
|
---
|
||||||
|
js/src/methodjit/InvokeHelpers.cpp | 2 +-
|
||||||
|
js/src/methodjit/MethodJIT.cpp | 6 +++---
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/js/src/methodjit/InvokeHelpers.cpp b/js/src/methodjit/InvokeHelpers.cpp
|
||||||
|
index d017c2a..abde396 100644
|
||||||
|
--- a/js/src/methodjit/InvokeHelpers.cpp
|
||||||
|
+++ b/js/src/methodjit/InvokeHelpers.cpp
|
||||||
|
@@ -500,7 +500,7 @@ stubs::PutActivationObjects(VMFrame &f)
|
||||||
|
js::PutActivationObjects(f.cx, f.fp());
|
||||||
|
}
|
||||||
|
|
||||||
|
-extern "C" void *
|
||||||
|
+extern "C" void * __attribute__((used))
|
||||||
|
js_InternalThrow(VMFrame &f)
|
||||||
|
{
|
||||||
|
JSContext *cx = f.cx;
|
||||||
|
diff --git a/js/src/methodjit/MethodJIT.cpp b/js/src/methodjit/MethodJIT.cpp
|
||||||
|
index 4feefbc..66099e6 100644
|
||||||
|
--- a/js/src/methodjit/MethodJIT.cpp
|
||||||
|
+++ b/js/src/methodjit/MethodJIT.cpp
|
||||||
|
@@ -120,20 +120,20 @@ static uint32 StubCallsForOp[STUB_CALLS_FOR_OP_COUNT];
|
||||||
|
|
||||||
|
extern "C" void JaegerTrampolineReturn();
|
||||||
|
|
||||||
|
-extern "C" void JS_FASTCALL
|
||||||
|
+extern "C" void JS_FASTCALL __attribute__((used))
|
||||||
|
PushActiveVMFrame(VMFrame &f)
|
||||||
|
{
|
||||||
|
f.entryfp->script()->compartment->jaegerCompartment->pushActiveFrame(&f);
|
||||||
|
f.regs.fp->setNativeReturnAddress(JS_FUNC_TO_DATA_PTR(void*, JaegerTrampolineReturn));
|
||||||
|
}
|
||||||
|
|
||||||
|
-extern "C" void JS_FASTCALL
|
||||||
|
+extern "C" void JS_FASTCALL __attribute__((used))
|
||||||
|
PopActiveVMFrame(VMFrame &f)
|
||||||
|
{
|
||||||
|
f.entryfp->script()->compartment->jaegerCompartment->popActiveFrame();
|
||||||
|
}
|
||||||
|
|
||||||
|
-extern "C" void JS_FASTCALL
|
||||||
|
+extern "C" void JS_FASTCALL __attribute__((used))
|
||||||
|
SetVMFrameRegs(VMFrame &f)
|
||||||
|
{
|
||||||
|
f.cx->setCurrentRegs(&f.regs);
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
@ -0,0 +1,148 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
WANT_AUTOCONF="2.1"
|
||||||
|
PYTHON_COMPAT=( python2_7 )
|
||||||
|
PYTHON_REQ_USE="threads"
|
||||||
|
inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils
|
||||||
|
|
||||||
|
MY_PN="js"
|
||||||
|
TARBALL_PV="$(replace_all_version_separators '' $(get_version_component_range 1-3))"
|
||||||
|
MY_P="${MY_PN}-${PV}"
|
||||||
|
TARBALL_P="${MY_PN}${TARBALL_PV}-1.0.0"
|
||||||
|
DESCRIPTION="Stand-alone JavaScript C library"
|
||||||
|
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
|
||||||
|
SRC_URI="https://archive.mozilla.org/pub/js/${TARBALL_P}.tar.gz
|
||||||
|
https://dev.gentoo.org/~axs/distfiles/${PN}-slot0-patches-02.tar.xz
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="NPL-1.1"
|
||||||
|
SLOT="0/mozjs185"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
|
||||||
|
IUSE="debug minimal static-libs test"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
BUILDDIR="${S}/js/src"
|
||||||
|
|
||||||
|
RDEPEND=">=dev-libs/nspr-4.7.0
|
||||||
|
sys-libs/readline:0=
|
||||||
|
x64-macos? ( dev-libs/jemalloc )"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
app-arch/zip
|
||||||
|
virtual/pkgconfig"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${WORKDIR}"/sm0/${P}-fix-install-symlinks.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-fix-ppc64.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-arm_respect_cflags-3.patch
|
||||||
|
"${WORKDIR}"/sm0/${PN}-1.8.7-freebsd-pthreads.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-perf_event-check.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-symbol-versions.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-ia64-fix.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-ia64-static-strings.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-isfinite.patch
|
||||||
|
"${FILESDIR}"/${PN}-perl-defined-array-check.patch
|
||||||
|
"${WORKDIR}"/sm0/${PN}-1.8.7-x32.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-gcc6.patch
|
||||||
|
"${WORKDIR}"/sm0/${P}-drop-asm-volatile-toplevel.patch
|
||||||
|
"${FILESDIR}"/${P}-LTO.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
DOCS=( ${S}/README )
|
||||||
|
HTML_DOCS=( ${BUILDDIR}/README.html )
|
||||||
|
|
||||||
|
pkg_setup(){
|
||||||
|
if [[ ${MERGE_TYPE} != "binary" ]]; then
|
||||||
|
export LC_ALL="C"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
pwd
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
cd "${BUILDDIR}" || die
|
||||||
|
eautoconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
cd "${BUILDDIR}" || die
|
||||||
|
|
||||||
|
CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
|
||||||
|
AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
|
||||||
|
LD="$(tc-getLD)" \
|
||||||
|
ac_cv_lib_dnet_dnet_ntoa=no \
|
||||||
|
ac_cv_lib_dnet_stub_dnet_ntoa=no \
|
||||||
|
econf \
|
||||||
|
${myopts} \
|
||||||
|
--enable-jemalloc \
|
||||||
|
--enable-readline \
|
||||||
|
--enable-threadsafe \
|
||||||
|
--with-system-nspr \
|
||||||
|
--disable-optimize \
|
||||||
|
--disable-profile-guided-optimization \
|
||||||
|
$(use_enable debug) \
|
||||||
|
$(use_enable static-libs static) \
|
||||||
|
$(use_enable test tests)
|
||||||
|
}
|
||||||
|
|
||||||
|
cross_make() {
|
||||||
|
emake \
|
||||||
|
CFLAGS="${BUILD_CFLAGS}" \
|
||||||
|
CXXFLAGS="${BUILD_CXXFLAGS}" \
|
||||||
|
AR="${BUILD_AR}" \
|
||||||
|
CC="${BUILD_CC}" \
|
||||||
|
CXX="${BUILD_CXX}" \
|
||||||
|
RANLIB="${BUILD_RANLIB}" \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
src_compile() {
|
||||||
|
cd "${BUILDDIR}" || die
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
|
||||||
|
cross_make jscpucfg host_jsoplengen host_jskwgen
|
||||||
|
cross_make -C config nsinstall
|
||||||
|
mv {,native-}jscpucfg || die
|
||||||
|
mv {,native-}host_jskwgen || die
|
||||||
|
mv {,native-}host_jsoplengen || die
|
||||||
|
mv config/{,native-}nsinstall || die
|
||||||
|
sed -i \
|
||||||
|
-e 's@./jscpucfg@./native-jscpucfg@' \
|
||||||
|
-e 's@./host_jskwgen@./native-host_jskwgen@' \
|
||||||
|
-e 's@./host_jsoplengen@./native-host_jsoplengen@' \
|
||||||
|
Makefile || die
|
||||||
|
sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
|
||||||
|
rm -f config/host_nsinstall.o \
|
||||||
|
config/host_pathsub.o \
|
||||||
|
host_jskwgen.o \
|
||||||
|
host_jsoplengen.o || die
|
||||||
|
fi
|
||||||
|
emake
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
cd "${BUILDDIR}/jsapi-tests" || die
|
||||||
|
# for bug 415791
|
||||||
|
pax-mark mr jsapi-tests
|
||||||
|
emake check
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cd "${BUILDDIR}" || die
|
||||||
|
emake DESTDIR="${D}" install
|
||||||
|
# bug 437520 , exclude js shell for small systems
|
||||||
|
if ! use minimal ; then
|
||||||
|
dobin shell/js
|
||||||
|
pax-mark m "${ED}/usr/bin/js"
|
||||||
|
fi
|
||||||
|
einstalldocs
|
||||||
|
|
||||||
|
if ! use static-libs; then
|
||||||
|
# We can't actually disable building of static libraries
|
||||||
|
# They're used by the tests and in a few other places
|
||||||
|
find "${D}" -iname '*.a' -delete || die
|
||||||
|
fi
|
||||||
|
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
|
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
|
||||||
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
|
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
|
||||||
|
DIST protobuf-3.8.0.tar.gz 4934577 BLAKE2B 4b86ab216e8a8b2c99c3620da9417c0562498e9d4dbf4957db186f51c62b0ed73b1322635a076b2d4054e015bdf6c8c50cc7fd0cb78d24a93b29d2a5b48f66fe SHA512 ba27c64e5193cd4a144bf0c9dc0d195fbbe6e580aaca01960362f0f185074588ca40046d3bcea76e1deae7508b722f6c5be484ea957122ae8e98229c7c3a4ad2
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
|
||||||
|
|
||||||
|
--- /src/Makefile.am
|
||||||
|
+++ /src/Makefile.am
|
||||||
|
@@ -715,7 +715,7 @@
|
||||||
|
GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
|
||||||
|
check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
|
||||||
|
protobuf-lite-test test_plugin protobuf-lite-arena-test \
|
||||||
|
- no-warning-test $(GZCHECKPROGRAMS)
|
||||||
|
+ $(GZCHECKPROGRAMS)
|
||||||
|
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
||||||
|
$(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
|
||||||
|
$(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
|
||||||
|
@@ -899,4 +899,4 @@
|
||||||
|
|
||||||
|
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
|
||||||
|
google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
|
||||||
|
- protobuf-lite-arena-test no-warning-test
|
||||||
|
+ protobuf-lite-arena-test
|
@ -0,0 +1,121 @@
|
|||||||
|
--- /Makefile.am
|
||||||
|
+++ /Makefile.am
|
||||||
|
@@ -11,28 +11,10 @@
|
||||||
|
# Always include third_party directories in distributions.
|
||||||
|
DIST_SUBDIRS = src conformance benchmarks third_party/googletest
|
||||||
|
|
||||||
|
-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
|
||||||
|
-# because then "make check" would also build and run all of gmock's own tests,
|
||||||
|
-# which takes a lot of time and is generally not useful to us. Also, we don't
|
||||||
|
-# want "make install" to recurse into gmock since we don't want to overwrite
|
||||||
|
-# the installed version of gmock if there is one.
|
||||||
|
check-local:
|
||||||
|
- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
|
||||||
|
- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
|
||||||
|
- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
|
||||||
|
|
||||||
|
-# We would like to clean gmock when "make clean" is invoked. But we have to
|
||||||
|
-# be careful because clean-local is also invoked during "make distclean", but
|
||||||
|
-# "make distclean" already recurses into gmock because it's listed among the
|
||||||
|
-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
|
||||||
|
-# cd to the directory again and "make clean" it will fail. So, check that the
|
||||||
|
-# Makefile exists before recursing.
|
||||||
|
clean-local:
|
||||||
|
- @if test -e third_party/googletest/Makefile; then \
|
||||||
|
- echo "Making clean in googletest"; \
|
||||||
|
- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
|
||||||
|
- fi; \
|
||||||
|
- if test -e conformance/Makefile; then \
|
||||||
|
+ @if test -e conformance/Makefile; then \
|
||||||
|
echo "Making clean in conformance"; \
|
||||||
|
cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
|
||||||
|
fi; \
|
||||||
|
--- /configure.ac
|
||||||
|
+++ /configure.ac
|
||||||
|
@@ -218,12 +218,5 @@
|
||||||
|
esac
|
||||||
|
AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
|
||||||
|
|
||||||
|
-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
|
||||||
|
-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
|
||||||
|
-# too.
|
||||||
|
-export CFLAGS
|
||||||
|
-export CXXFLAGS
|
||||||
|
-AC_CONFIG_SUBDIRS([third_party/googletest])
|
||||||
|
-
|
||||||
|
AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
|
||||||
|
AC_OUTPUT
|
||||||
|
--- /src/Makefile.am
|
||||||
|
+++ /src/Makefile.am
|
||||||
|
@@ -709,19 +709,11 @@
|
||||||
|
google/protobuf/testing/file.cc \
|
||||||
|
google/protobuf/testing/file.h
|
||||||
|
|
||||||
|
-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
|
||||||
|
-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
|
||||||
|
-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
|
||||||
|
-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
|
||||||
|
check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
|
||||||
|
protobuf-lite-test test_plugin protobuf-lite-arena-test \
|
||||||
|
$(GZCHECKPROGRAMS)
|
||||||
|
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
||||||
|
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
|
||||||
|
-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
|
||||||
|
- -I$(GOOGLEMOCK_SRC_DIR)/include
|
||||||
|
+ -lgtest -lgmock -lgmock_main
|
||||||
|
# Disable optimization for tests unless the user explicitly asked for it,
|
||||||
|
# since test_util.cc takes forever to compile with optimization (with GCC).
|
||||||
|
# See configure.ac for more info.
|
||||||
|
@@ -810,12 +802,8 @@
|
||||||
|
# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
|
||||||
|
protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
|
||||||
|
libprotoc.la \
|
||||||
|
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
|
||||||
|
-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
|
||||||
|
- -I$(GOOGLETEST_SRC_DIR)/include \
|
||||||
|
- -DPROTOBUF_TEST_NO_DESCRIPTORS
|
||||||
|
+ -lgtest -lgmock -lgmock_main
|
||||||
|
+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
|
||||||
|
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
||||||
|
protobuf_lazy_descriptor_test_SOURCES = \
|
||||||
|
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
||||||
|
@@ -836,11 +824,7 @@
|
||||||
|
# full runtime and we want to make sure this test builds without full
|
||||||
|
# runtime.
|
||||||
|
protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
|
||||||
|
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
|
||||||
|
-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
|
||||||
|
- -I$(GOOGLETEST_SRC_DIR)/include
|
||||||
|
+ -lgtest -lgmock -lgmock_main
|
||||||
|
protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
||||||
|
protobuf_lite_test_SOURCES = \
|
||||||
|
google/protobuf/lite_unittest.cc \
|
||||||
|
@@ -852,11 +836,7 @@
|
||||||
|
# gtest when building the test internally our memory sanitizer doesn't detect
|
||||||
|
# memory leaks (don't know why).
|
||||||
|
protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
|
||||||
|
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
|
||||||
|
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
|
||||||
|
-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
|
||||||
|
- -I$(GOOGLETEST_SRC_DIR)/include
|
||||||
|
+ -lgtest -lgmock -lgmock_main
|
||||||
|
protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
||||||
|
protobuf_lite_arena_test_SOURCES = \
|
||||||
|
google/protobuf/lite_arena_unittest.cc \
|
||||||
|
@@ -866,8 +846,7 @@
|
||||||
|
|
||||||
|
# Test plugin binary.
|
||||||
|
test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
||||||
|
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
|
||||||
|
-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
|
||||||
|
+ -lgtest
|
||||||
|
test_plugin_SOURCES = \
|
||||||
|
google/protobuf/compiler/mock_code_generator.cc \
|
||||||
|
google/protobuf/testing/file.cc \
|
@ -0,0 +1,126 @@
|
|||||||
|
# Copyright 2008-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
# True Authors: Arfrever Frehtes Taifersar Arahesis and others
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
|
||||||
|
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
|
||||||
|
|
||||||
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
|
||||||
|
EGIT_SUBMODULES=()
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
|
||||||
|
HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
|
||||||
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
|
SRC_URI=""
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0/19"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
|
||||||
|
IUSE="emacs examples static-libs test zlib"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
BDEPEND="emacs? ( virtual/emacs )"
|
||||||
|
DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
|
||||||
|
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
|
||||||
|
RDEPEND="emacs? ( virtual/emacs )
|
||||||
|
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-3.8.0-disable_no-warning-test.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.8.0-system_libraries.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.8.0-protoc_input_output_files.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
|
||||||
|
|
||||||
|
if tc-ld-is-gold; then
|
||||||
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=24527
|
||||||
|
tc-ld-disable-gold
|
||||||
|
fi
|
||||||
|
|
||||||
|
multilib-minimal_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
local options=(
|
||||||
|
$(use_enable static-libs static)
|
||||||
|
$(use_with zlib)
|
||||||
|
)
|
||||||
|
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
# Build system uses protoc when building, so protoc copy runnable on host is needed.
|
||||||
|
mkdir -p "${WORKDIR}/build" || die
|
||||||
|
pushd "${WORKDIR}/build" > /dev/null || die
|
||||||
|
ECONF_SOURCE="${S}" econf_build "${options[@]}"
|
||||||
|
options+=(--with-protoc="$(pwd)/src/protoc")
|
||||||
|
popd > /dev/null || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
ECONF_SOURCE="${S}" econf "${options[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
multilib-minimal_src_compile
|
||||||
|
|
||||||
|
if use emacs; then
|
||||||
|
elisp-compile editors/protobuf-mode.el
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_compile() {
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
emake -C "${WORKDIR}/build/src" protoc
|
||||||
|
fi
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_test() {
|
||||||
|
emake check
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install_all() {
|
||||||
|
find "${D}" -name "*.la" -delete || die
|
||||||
|
|
||||||
|
insinto /usr/share/vim/vimfiles/syntax
|
||||||
|
doins editors/proto.vim
|
||||||
|
insinto /usr/share/vim/vimfiles/ftdetect
|
||||||
|
doins "${FILESDIR}/proto.vim"
|
||||||
|
|
||||||
|
if use emacs; then
|
||||||
|
elisp-install ${PN} editors/protobuf-mode.el*
|
||||||
|
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
DOCS+=(examples)
|
||||||
|
docompress -x /usr/share/doc/${PF}/examples
|
||||||
|
fi
|
||||||
|
|
||||||
|
einstalldocs
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
use emacs && elisp-site-regen
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
use emacs && elisp-site-regen
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST PyGithub-1.39.tar.gz 2662602 BLAKE2B 5e3e4ca2483e7ade968f170e7615258b4bcca0f1c6741146c38b3c7405fb1fb66351fa5686863892a6751bc4cb6ea39b6cf4ec0d8e6cc878b302c87512c9d159 SHA512 5fa6e5a1b8e7cbe2be13e7f866ce8586f6ba37bfc8f3bfb5a52497a9edc267c14512e4572f56e898c61b8c84dfc8aa8f325c5eb2563e68450b8a3b2acf8308d4
|
DIST PyGithub-1.39.tar.gz 2662602 BLAKE2B 5e3e4ca2483e7ade968f170e7615258b4bcca0f1c6741146c38b3c7405fb1fb66351fa5686863892a6751bc4cb6ea39b6cf4ec0d8e6cc878b302c87512c9d159 SHA512 5fa6e5a1b8e7cbe2be13e7f866ce8586f6ba37bfc8f3bfb5a52497a9edc267c14512e4572f56e898c61b8c84dfc8aa8f325c5eb2563e68450b8a3b2acf8308d4
|
||||||
DIST PyGithub-1.40a4.tar.gz 2668409 BLAKE2B 5638f228620fc5c6741f79e3272ba374a71b1a0a9fe3d6f0edd45a7b0468fd4ed1a6fe967d37e6169a4cfc90a3f084c948f0d72592cd225569275a3d8ae3546a SHA512 6d832e2a101a80e2b0aec45a99ec2f28d9d64d130bf23f291a643bc8450a86c4ed9296a005de000c975e28d91d52e648937abb09399554b9d17988fd58f280e7
|
DIST PyGithub-1.40a4.tar.gz 2668409 BLAKE2B 5638f228620fc5c6741f79e3272ba374a71b1a0a9fe3d6f0edd45a7b0468fd4ed1a6fe967d37e6169a4cfc90a3f084c948f0d72592cd225569275a3d8ae3546a SHA512 6d832e2a101a80e2b0aec45a99ec2f28d9d64d130bf23f291a643bc8450a86c4ed9296a005de000c975e28d91d52e648937abb09399554b9d17988fd58f280e7
|
||||||
|
DIST PyGithub-1.43.7.gh.tar.gz 2832588 BLAKE2B df1bf783d8644493151b7192325cd2feded48dd95853e0f2ccef9e0560c39877de3e38e95a339291e585612c795d2180900dc5db5fecb0f844a97a6d0a5bf04c SHA512 15d7c7ca6a505a259fe59c96db667a278179df7acfe794116f118bb18966c573cbdcd9276fe50b321fd759988810250a0268c2e8e330c1ef5a8bdcc3a50b6391
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
|
||||||
|
|
||||||
|
inherit distutils-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Python library to access the Github API v3"
|
||||||
|
HOMEPAGE="https://github.com/PyGithub/PyGithub/"
|
||||||
|
# Use github since pypi is missing test data
|
||||||
|
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="LGPL-3+"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
RDEPEND="dev-python/deprecated[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyjwt[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/requests-2.14.0[${PYTHON_USEDEP}]"
|
||||||
|
DEPEND="
|
||||||
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||||
|
test? (
|
||||||
|
${RDEPEND}
|
||||||
|
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||||
|
dev-python/httpretty[${PYTHON_USEDEP}]
|
||||||
|
)"
|
||||||
|
|
||||||
|
python_prepare_all() {
|
||||||
|
# tests requiring network access
|
||||||
|
sed -i -e 's:testDecodeJson:_&:' tests/Issue142.py || die
|
||||||
|
|
||||||
|
distutils-r1_python_prepare_all
|
||||||
|
}
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
# silly!
|
||||||
|
cp -r tests "${BUILD_DIR}" || die
|
||||||
|
if python_is_python3; then
|
||||||
|
2to3 --no-diffs -n -w "${BUILD_DIR}"/tests || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${BUILD_DIR}" || die
|
||||||
|
"${EPYTHON}" -m unittest -v tests.AllTests || die "Tests fail with ${EPYTHON}"
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
DIST deprecated-1.2.5.gh.tar.gz 5038752 BLAKE2B 82ceadca4ccef4309b2a7d493620cc8a4dd9160ab7449a3019c9e9bc3a99e8016b6125d4165b71813d9543b7629d55372affdbd14ad2c71d101061595bdb677c SHA512 3a16b5d4f2475788ce919c327b668bb8852dab88adfa959826c9b68ccbfba3207a1c60ca164edacde8a756bd3895225af944a51eebde1230a93a973145231234
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue