parent
c71c031ac1
commit
1b86ebc05a
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST yadm-1.12.0.tar.gz 47340 BLAKE2B ef710f56c96244c082bfcc887cae4aee00aaaadec5e7466500dde263c5e4f43df046e11742fd275e989bd9704b39a123f17248cd70d64f6ca552b28db6c44814 SHA512 402a67770154ce3ae7ab947ff4d4e26ca5040d343110fb749195ca5c3f4ee435aba1d8cdf02d4ecf4a81d3f331c1b891bed4fb3fcfcc893867e0fce45b9c8cd8
|
||||
DIST yadm-2.4.0.tar.gz 96877 BLAKE2B 462a5816e106c4502007ff34ab338904e14a9851ebcfc7ff79a32a8b11fbbe3e0b7e6538ed6b489ab67e2205c84b2250749e3091c77fa663886dc9792078a576 SHA512 43e16a9502f9dd9f6c6dba3bb5403bb048244a406d44cb42a96a43e62bf7342efd5f302304dbedede61423546787fc929f378d68da9031207e70239ec4e265ce
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit bash-completion-r1
|
||||
|
||||
DESCRIPTION="A dotfile manager for the config files in your home folder"
|
||||
HOMEPAGE="https://github.com/TheLocehiliosan/yadm/"
|
||||
SRC_URI="https://github.com/TheLocehiliosan/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="zsh-completion test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
test? (
|
||||
dev-tcltk/expect
|
||||
dev-util/bats
|
||||
dev-vcs/git
|
||||
)"
|
||||
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
app-crypt/gnupg
|
||||
zsh-completion? ( app-shells/gentoo-zsh-completions )"
|
||||
|
||||
src_compile() {
|
||||
emake "${PN}.md"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# 109_accept_encryption tests are interactive, thus fail. Skip them
|
||||
# 113_accept_jinja_alt.bats are depepending on the optional envtpl
|
||||
while IFS="" read -d $'\0' -r f ; do
|
||||
bats "${f}" || die "test ${f} failed"
|
||||
done < <(find test -name '*.bats' -and -not -name '109_accept_encryption.bats' -and -not -name '113_accept_jinja_alt.bats' -print0)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
|
||||
dobin "${PN}"
|
||||
doman "${PN}.1"
|
||||
|
||||
dobashcomp completion/yadm.bash_completion
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins completion/yadm.zsh_completion _${PN}
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST gnupg-2.2.19.tar.bz2 6754972 BLAKE2B fc1b9afb398ef78a6d239c62fc88cba7148679b1b666ac39dbd9644847e99de1a683a7938bc112cb33adafe555472319dde4f64860071446a66cd79934f7d69c SHA512 d7700136ac9f0a8cf04b33da4023a42427fced648c2f90d76250c92904353b85fe728bdd89a713d847e8d38e5900c98d46075614492fdc3d1421f927a92f49dd
|
||||
DIST gnupg-2.2.20.tar.bz2 6786913 BLAKE2B 43cf9402a26e67d6c7c2444eb2faaee3f06ea0bf6c07708a50834c5d7424db2f9c38e1f0046dd3a35082abc08d401b2951655e7e068f0873db297560b87d2667 SHA512 3e69f102366ec3415f439ab81aae2458182fa1a18dfb86565b1d9dc638f3fc4c179a5947f0042b7c5a813345676285a662793664a1803ea9ad8328f0548e0edc
|
||||
|
@ -0,0 +1,165 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
|
||||
HOMEPAGE="http://www.gnupg.org/"
|
||||
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server"
|
||||
|
||||
# Existence of executables is checked during configuration.
|
||||
DEPEND="!app-crypt/dirmngr
|
||||
>=dev-libs/libassuan-2.5.0
|
||||
>=dev-libs/libgcrypt-1.7.3
|
||||
>=dev-libs/libgpg-error-1.28
|
||||
>=dev-libs/libksba-1.3.4
|
||||
>=dev-libs/npth-1.2
|
||||
>=net-misc/curl-7.10
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
ldap? ( net-nds/openldap )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
smartcard? ( usb? ( virtual/libusb:1 ) )
|
||||
ssl? ( >=net-libs/gnutls-3.0:0= )
|
||||
sys-libs/zlib
|
||||
tofu? ( >=dev-db/sqlite-3.7 )"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
app-crypt/pinentry
|
||||
nls? ( virtual/libintl )
|
||||
selinux? ( sec-policy/selinux-gpg )
|
||||
wks-server? ( virtual/mta )"
|
||||
|
||||
BDEPEND="virtual/pkgconfig
|
||||
doc? ( sys-apps/texinfo )
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=(
|
||||
ChangeLog NEWS README THANKS TODO VERSION
|
||||
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
|
||||
# idea borrowed from libdbus, see
|
||||
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
|
||||
#
|
||||
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
|
||||
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
|
||||
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
|
||||
-i doc/examples/systemd-user/gpg-agent-ssh.socket || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
if use prefix && use usb; then
|
||||
# bug #649598
|
||||
append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
|
||||
fi
|
||||
|
||||
if use elibc_SunOS || use elibc_AIX; then
|
||||
myconf+=( --disable-symcryptrun )
|
||||
else
|
||||
myconf+=( --enable-symcryptrun )
|
||||
fi
|
||||
|
||||
#bug 663142
|
||||
if use user-socket; then
|
||||
myconf+=( --enable-run-gnupg-user-socket )
|
||||
fi
|
||||
|
||||
# glib fails and picks up clang's internal stdint.h causing weird errors
|
||||
[[ ${CC} == *clang ]] && \
|
||||
export gl_cv_absolute_stdint_h=/usr/include/stdint.h
|
||||
|
||||
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
|
||||
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
|
||||
# by wks-client & wks-server; and if it's autodetected but not not exist at
|
||||
# build time, then then 'gpg-wks-client --send' functionality will not
|
||||
# work. This has an unwanted side-effect in stage3 builds: there was a
|
||||
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
|
||||
# the build where the install guide previously make the user chose the
|
||||
# logger & mta early in the install.
|
||||
|
||||
econf \
|
||||
"${myconf[@]}" \
|
||||
$(use_enable bzip2) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable smartcard scdaemon) \
|
||||
$(use_enable ssl gnutls) \
|
||||
$(use_enable tofu) \
|
||||
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') \
|
||||
$(use_enable wks-server wks-tools) \
|
||||
$(use_with ldap) \
|
||||
$(use_with readline) \
|
||||
--with-mailprog=/usr/libexec/sendmail \
|
||||
--disable-ntbtls \
|
||||
--enable-all-tests \
|
||||
--enable-gpg \
|
||||
--enable-gpgsm \
|
||||
--enable-large-secmem \
|
||||
CC_FOR_BUILD="$(tc-getBUILD_CC)" \
|
||||
GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config" \
|
||||
KSBA_CONFIG="${EROOT}/usr/bin/ksba-config" \
|
||||
LIBASSUAN_CONFIG="${EROOT}/usr/bin/libassuan-config" \
|
||||
LIBGCRYPT_CONFIG="${EROOT}/usr/bin/${CHOST}-libgcrypt-config" \
|
||||
NPTH_CONFIG="${EROOT}/usr/bin/npth-config" \
|
||||
$("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
#Bug: 638574
|
||||
use tofu && export TESTFLAGS=--parallel
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
use tools &&
|
||||
dobin \
|
||||
tools/{convert-from-106,gpg-check-pattern} \
|
||||
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
|
||||
tools/make-dns-cert
|
||||
|
||||
dosym gpg /usr/bin/gpg2
|
||||
dosym gpgv /usr/bin/gpgv2
|
||||
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
|
||||
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
|
||||
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
|
||||
|
||||
use doc && dodoc doc/gnupg.html/* doc/*.png
|
||||
|
||||
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg"
|
||||
elog
|
||||
elog "If you wish to use 'gpg-wks-client --send', you must install an MTA!"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,28 +1,14 @@
|
||||
DIST icedtea-bin-core-3.14.0-amd64.tar.xz 62155444 BLAKE2B cfa6a11778d159026151fffcfa7189fe45d23d22d810375f36f237afcdcd646be73788cb5cfa0a2e4822026ae58456b69f6f4baa03c7d143429f2ffe55d73e19 SHA512 2d29f7f61ef67d93b57318c34fbccf99077f40c6322bc774326e33ba11c8dc2a07d34c8e9d8b500feaeabe4aa45644d03140b57a3996261d13da9f9bf85ebf5c
|
||||
DIST icedtea-bin-core-3.14.0-arm.tar.xz 58158680 BLAKE2B 3899136ccb43550129a33996ec50f7b60b9b3d118f758e3d5c51a837f6222033a32677fca58f8c95de12abb4b1b8940190a442d9b1901808307634662af7aeb8 SHA512 8a56048439f50bd01ce4723f8f9b97f764f655370927dad0a92db9d678e8eb797ce3a6d813a247f60d4c38ae1a3de3ab9a3b78341d19977ef05d939e85194e67
|
||||
DIST icedtea-bin-core-3.14.0-arm64.tar.xz 61710384 BLAKE2B f02c68f71a057232f9a8ea7476b476a376c0bd508b53f1043dfc6a6f86b5701e50d0d6be7d627436c3cff931ebe3c56f0d634196d8e1b96058142421214d525d SHA512 853b7ef0d21d0d9645ef3bc4b5cb24ed43ca71687d2630a10d3087a4ea82855f98cc7c8190b0de62a746cfa214489c8ac3afdc17dfc13dbb61dd4c8a908da31b
|
||||
DIST icedtea-bin-core-3.14.0-ppc64.tar.xz 55154368 BLAKE2B 0a509f1ae6ef885c18cf15a7c4dbe984650e242ea820aa65602cfc1a001f0123151fb5c33f25546391c9a62cc735c5a6a6cb98ef97c61900d65154c5b44ab3d2 SHA512 f6b19b8e7dd80df8a162665d7c3dcc8f7d739fefcd1e6a1e8d588cbbf7de08240ef49c6542524bcd173f7150a1ff5d752a9c7532dc6a9b37954ea29928bf123c
|
||||
DIST icedtea-bin-core-3.14.0-ppc64le.tar.xz 55152852 BLAKE2B 198dffad2beefa5fed0fb0a9151ba68bf4f24e8dd1ff2a430983ecb72131d82119423eba6192365620731e030a58b60bb3492b34e2a87d19a58178c43e69853d SHA512 8ccfd5ba3ae3d0a7125b99c52db7ee37229f9071209e2011023398c3dd4746e7edda92f361427667739b298ee2d0de7777bab4346cffbe6572f2729e59971ef7
|
||||
DIST icedtea-bin-core-3.14.0-x86.tar.xz 61674516 BLAKE2B 9297b3192985e1925f732c38229854781ebc61a49b487d147380c0fcd088601908f59488f8795f2c9069d103613785082f0fe4e227659fe3916d807a6622c3bf SHA512 ca61c53a1a424a059b4a0b2b8fea8fa2a8ab9cf1e3dc8f5600b89b29f280f71841a7b853bfd1e88d756211816e733aef8fb232fcfdebca85978cf50c9026f0fb
|
||||
DIST icedtea-bin-core-3.15.0-amd64.tar.xz 62196772 BLAKE2B 0da09f58d785c3a9d8acffbe1daeb1d944370a5256ff85f4a8b92d48f465ad19d1ae6eb91729807aa67a43a00e029e9d2978b7848f59bbcddbd40252da930426 SHA512 6d9415449b5c937357f1a1b7610658446d1ac9c07a0203e02f89f5ca2077712ca59157f35f02a106674aa17c6f3e0c9b54d983c3278ca0eb8c1d25d639293db5
|
||||
DIST icedtea-bin-core-3.15.0-arm.tar.xz 58228516 BLAKE2B cc975c461ad1246257c993434035e679e57193ee70b073a072a15ba9b1f3b00848138092ad427356822a216f1142685fcfb31f4e36551846f5298a2338abc215 SHA512 517f73b41ac93dead8896b6c0894464ae2d3cae5d249258fe7426817947d1332245de5be60f027e5fb92566e062ea1fb74bbcb2fed600238713202519d70f3b7
|
||||
DIST icedtea-bin-core-3.15.0-arm64.tar.xz 61788580 BLAKE2B f2c8d1d0ac823838881f07fc3aa47f07b048924c49ec7a0f8ce5b1f942ede8d2aab70d7fd25ea75b6fe7ea68dcd181d9f834ba4b075977470181cf10b6f26696 SHA512 f0c9d683048e0cc5ab44a9bdf31b5f2c2f8a2bc425dd1a78fe366791f8b2bae4e7b77f43d9553d95c388673ccac5c1e5a916dadecb9dac2059daa66af97927f2
|
||||
DIST icedtea-bin-core-3.15.0-ppc64.tar.xz 55179660 BLAKE2B 3404f1b4ddc6f1109d141e8a88ff1a913153660b318b84fee43ffe013164c578f9fcad6b75f8212cb11cc9ee89a8260d55b39c7f9516aa910d3838b0490fe923 SHA512 7d5e3c16e156f09610e915d3c9062b0f24f5d15045545009f48ba616e8f45184161018ed4136145ab9d15bab6d853052df7fabda43b9bcbcf99aabea8e52477d
|
||||
DIST icedtea-bin-core-3.15.0-ppc64le.tar.xz 55188860 BLAKE2B 732973320837e689b42942da80015109868d5772097111d5789a3bbee100a0b8d75cb581e1825a0c62bd582e93fe828b5575ac307efb73083d248c154cc28cd0 SHA512 887af69cc6c0a4227922da2500f228b108d9ac445e62c1836411d09a88df8579e0397d89b3f62b94f73e794a0014c67f4b1c8d2247ac1118967a63092e704078
|
||||
DIST icedtea-bin-core-3.15.0-x86.tar.xz 61650896 BLAKE2B ed5140790ac2946c4162ead15cd1d8aae812d41d4be3e4fff6669eedb438576e293385ec53405a2c67674c9fad9279497b2f334ef58040f6744b62059dc4882c SHA512 2efbacbcd77474d4a8506f9c4f7d66c3ad57f929644e4c541bb76139b6f1c6a776639a9708257a4ce5085660ddf2d50f54ef179a63746a9eeeba83384f810cc5
|
||||
DIST icedtea-bin-doc-3.14.0.tar.xz 11406340 BLAKE2B 249832aaa0093f70c8bfff78bfcbe6fe32c3e6210789e1f7993d24098d467fc0b5dba505b58135da82a3e55a357891a90a03eb8032b4c4db9af15d3c16915db9 SHA512 3665b702f25e548061970a1078c4f6fb6b412bbcf59391ad04850d64cc3a664357990ad55ef1ba0a7e1fd214b23e408ca59314ad79ca0736e0f1dd94d6f92ab8
|
||||
DIST icedtea-bin-doc-3.15.0.tar.xz 11666068 BLAKE2B a4df6db09dfe47220cbfa07e12adaa03df490e81fcf38df490710502e78cfae741bf9d8f88ee81e8cf65465fa912b3139b239e858e5479e8af79a48c08444d5c SHA512 b990ceabf846b5be889ab706c3f259c23c335bf56aaa0e660206bedec4caef3d00fdd712d2eba5326e0b716010299b5b13e1089d91fd747cdf8cf58e4acce13b
|
||||
DIST icedtea-bin-examples-3.14.0-amd64.tar.xz 1855132 BLAKE2B 751c5ce41983960a0e08c7e544cf04379a591ef7077ce72aca33bfe5237a887e47ce00f2070d6bc2bfc0660ab0ac15dd1c408dd46f9bd66b2d70ad6d06235027 SHA512 96fd2459d61d5fafe798688f1b4e0c352975728255c779a91f640bbbda01149e3522025db0c1e01b9f14200be63f242eff73689c3c81ae8fb14930e460ab9c93
|
||||
DIST icedtea-bin-examples-3.14.0-arm.tar.xz 1840984 BLAKE2B 52c58563f24033203f95a4a4ece6a44e056aef145fae4221090c417c5cf091fdb79cf38d847c80f67c79711514173f99a2d62eeb39a4a7811b3fd1c8b46d235f SHA512 1b8c1738a485fa91e3a48835fa6ca8570bf4b428bd96837dd3c1f713c73de596ab874610a7d570fc54d31795168483912462ba2a8566b798265e351f8352fe5f
|
||||
DIST icedtea-bin-examples-3.14.0-arm64.tar.xz 1849808 BLAKE2B 2faa1faa65662ceb0ccf13142781ff01d2fa8601cbff0cdf30a8f53247012d3d68355780f77701804eb82e4b26082977996e10ab38181f372318165d3e08c624 SHA512 7b09e125ae6d65096ca3ee0165347336a36dc1cd016bf6fbfb3fadb0530681b5291a93429bf820533740306e75d09632bf3a1071609951e87d447d126ead2737
|
||||
DIST icedtea-bin-examples-3.14.0-ppc64.tar.xz 1864844 BLAKE2B 393f501701f6255692026fee6f6f03758828ae9771de2527ac00fb5378f4d7e8e8c15bd2f3a25d5f27dac0e57dbd19f9b93ca1b8bb453ee7460bfbb3ffa3eb74 SHA512 02c93ca019ffd281b54747c0dae47b5283d4f96b7a174dc2d433b803ae57afb04486ea6c8cf59bce34fefa64b0bb3b565c7e083fe606d161a5033bec06a25c5f
|
||||
DIST icedtea-bin-examples-3.14.0-ppc64le.tar.xz 1862512 BLAKE2B 2ebc865f23fd94c9065bf94d718ea2eea45f3c513d066f6513f190d83565378975491a66caff521e85e3f1307178979b0435487f46373615c1980c258e600c0c SHA512 9fff9c5b490010b06b695a864ec8ddc8ce44acfddde104fcb83742d9ecff70906669e02da36cef8e903ef1ef923cf9e92342daafde47e6fa35885865dd079eb7
|
||||
DIST icedtea-bin-examples-3.14.0-x86.tar.xz 1860288 BLAKE2B a2c8eb4cee690615f624fa97e0360cd25776beabbdd52089747fa48ab0f8b440a776e601455c87803f36889d1caeee6ffc44a43c9d366e2913bd07f877997a48 SHA512 862f6a23e9eef4b271491b19b9c4a98baa76fead458d6230424693151695b0a6e082a38ef4ad2cb05fbd80db4967840de718898cab25269a10bff3ea5f5acf01
|
||||
DIST icedtea-bin-examples-3.15.0-amd64.tar.xz 1854220 BLAKE2B 3572d1571da58c493402421db4163879aece2f3b2717f2769ef94cf9612b429a0156f278ef2ee5e114de8b171cdac787f46b7cdd0d533cf2a5568c987c836ee4 SHA512 8dd6017f4a9c90b56e5559277155afce2c37995cca3bb2a96bf62e0310a3eb9e259023faac51b5d4e5688dceaa33efad9372a5f7667b314685578c97fc937e43
|
||||
DIST icedtea-bin-examples-3.15.0-arm.tar.xz 1839548 BLAKE2B 1903f85534b49ef71a548ccf29065d301871e024402540038a81561d02ac988a9060b7c33307366dee55838c8f9a2cf277e86e152701f8e5312241e5cf499850 SHA512 de9eaf56ce6b10ea2d3d676b1896884a5a98f1def01175e3456487ebb10f0da618a5d238a7fc9fe25607e5fbf53dc6fa7c65d71d6858731c3540e270357a13c9
|
||||
DIST icedtea-bin-examples-3.15.0-arm64.tar.xz 1850912 BLAKE2B bf047a0d606bcb766e84ef90fcb169446e9bb97ada118c51762d58ed2f4fe5a9139549676fc731b2230a75c65e3a4f23b06b0f2a3224d85567f5601a1320e66c SHA512 2d5527d7daabb3cf5bcfb262bdd072af2e051cca3171aa3a973ac81b53f74b898d8c5045a0bcea28db18edca602d8ca9912cd90a157ef6026e535a0087b576a2
|
||||
DIST icedtea-bin-examples-3.15.0-ppc64.tar.xz 1865608 BLAKE2B 34afb142c6db332d399868783d2972f3d4a2a7de90120e88f70edae3d2b0ae8299dc1587c1431d810ff8d69f26f884a51d676d2b7738ee04089780f6a5719f8b SHA512 d23adb53d6df49b607ea4267570ffe8f16801d6bd9a570b1311b881cf02329804da17464ca284cd6f4b316856a3cb504ebb347e9e76fa37c8cf8c41dbc20366d
|
||||
DIST icedtea-bin-examples-3.15.0-ppc64le.tar.xz 1862752 BLAKE2B 03cf9411aef4c3797c5a542072ef7ea53f3565d7c90b2e9e2dfc9caac8ffe41cc4588b848e5c6cfc5c275245a625dbee66fa170aa38aeae3ee2110f1d4d08888 SHA512 0bacf0f9d2b7b396e5afe1962d54cd559bf777dc896dc9bf6d7581380bce1aaeff4156e4c2082ee1955f2d503a5c6b8537bf32da1d4846b264026229c22ef01a
|
||||
DIST icedtea-bin-examples-3.15.0-x86.tar.xz 1860232 BLAKE2B e0b9fa6d5c452ea8d258cc035e7d9913f9423ec972d3729b266cf03b686f3012ae16101a0d97db660ffabacd05e92e3ce47624346a7ea5fc5b42a2d89d69fb0c SHA512 2a7b7a1e45fc84d115ba09bb2617c298a8c0d8084e61ea274c16df0f36bc1e240d0a74a37ff9f0cf0dd6dfe4be8f6208f7c6c132bc5637be95b2d9e19c1fe5d7
|
||||
DIST icedtea-bin-src-3.14.0.tar.xz 45781864 BLAKE2B b4bef50c7c8ea17cb7e5c60ea17c31120181d0616869f2ca99676328cf1ba3eef95e5750301c1dc8d1b0024ccfa56088aa0ab4ca26bebf7253de7d75cab5d346 SHA512 00e0637e825073d33099665e2aff95c1a6555fda7177c0c0057298b5a74263acb35f98db946877ddd82c1d1bfb421a07da2801c8d3013ebb99e1a0229f9781ea
|
||||
DIST icedtea-bin-src-3.15.0.tar.xz 45859888 BLAKE2B 39926cb75a2eb784bb29322724ff452bd6fd259e5dfd583436a980073bf4b82277676d10ce29e155a1122a424718be6277e307d781d825d93b3909f1e6f1da91 SHA512 9523180f27da1936593a41322013a3147e4bd8bfded0589e39775dcd856736b97160a356c717969eb0a26d27c05cfb1dce6f08f6c09193a722e581f22f7a1dc4
|
||||
|
@ -1,165 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
# Don't block arm. See bug #600134.
|
||||
#MULTILIB_COMPAT=( abi_ppc_64 abi_x86_{32,64} )
|
||||
KEYWORDS="-* amd64 ~arm arm64 ppc64 x86"
|
||||
|
||||
inherit java-vm-2 multilib-build toolchain-funcs
|
||||
|
||||
abi_uri() {
|
||||
echo "${2-$1}? (
|
||||
${BASE_URI}/${PN}-core-${PV}${3+-r${3}}-${1}.tar.xz
|
||||
examples? ( ${BASE_URI}/${PN}-examples-${PV}${3+-r${3}}-${1}.tar.xz )
|
||||
)"
|
||||
}
|
||||
|
||||
BASE_URI="https://dev.gentoo.org/~gyakovlev/distfiles"
|
||||
SRC_URI="doc? ( ${BASE_URI}/${PN}-doc-${PV}.tar.xz )
|
||||
source? ( ${BASE_URI}/${PN}-src-${PV}.tar.xz )
|
||||
multilib? ( amd64? ( abi_x86_32? ( ${BASE_URI}/${PN}-core-${PV}-x86.tar.xz ) ) )
|
||||
big-endian? ( $(abi_uri ppc64) )
|
||||
!big-endian? ( $(abi_uri ppc64le ppc64) )
|
||||
$(abi_uri amd64)
|
||||
$(abi_uri arm)
|
||||
$(abi_uri arm64)
|
||||
$(abi_uri x86)"
|
||||
|
||||
DESCRIPTION="A Gentoo-made binary build of the IcedTea JDK"
|
||||
HOMEPAGE="http://icedtea.classpath.org"
|
||||
LICENSE="GPL-2-with-classpath-exception"
|
||||
SLOT="8"
|
||||
|
||||
IUSE="+alsa big-endian cups doc examples +gtk headless-awt multilib nsplugin pulseaudio selinux source webstart"
|
||||
REQUIRED_USE="gtk? ( !headless-awt ) nsplugin? ( !headless-awt )"
|
||||
|
||||
RESTRICT="preserve-libs strip"
|
||||
QA_PREBUILT="opt/.*"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.58:2%
|
||||
>=media-libs/fontconfig-2.13:1.0%
|
||||
>=media-libs/freetype-2.9.1:2%
|
||||
>=media-libs/lcms-2.9:2%
|
||||
>=sys-apps/baselayout-java-0.1.0-r1
|
||||
>=sys-libs/zlib-1.2.11-r1%
|
||||
virtual/jpeg-compat:62%
|
||||
alsa? ( >=media-libs/alsa-lib-1.0% )
|
||||
cups? ( >=net-print/cups-2.0% )
|
||||
gtk? (
|
||||
>=dev-libs/atk-2.28.1%
|
||||
>=x11-libs/cairo-1.16.0%
|
||||
x11-libs/gdk-pixbuf:2%
|
||||
>=x11-libs/gtk+-2.24:2%
|
||||
>=x11-libs/pango-1.42%
|
||||
)
|
||||
!headless-awt? (
|
||||
media-libs/giflib:0/7%
|
||||
=media-libs/libpng-1.6*%
|
||||
>=x11-libs/libX11-1.6%
|
||||
>=x11-libs/libXcomposite-0.4%
|
||||
>=x11-libs/libXext-1.3%
|
||||
>=x11-libs/libXi-1.7%
|
||||
>=x11-libs/libXrender-0.9.10%
|
||||
>=x11-libs/libXtst-1.2%
|
||||
)"
|
||||
|
||||
RDEPEND=">=sys-devel/gcc-9.2.0[multilib?]
|
||||
>=sys-libs/glibc-2.29[multilib?]
|
||||
virtual/ttf-fonts
|
||||
selinux? ( sec-policy/selinux-java )
|
||||
multilib? ( ${RDEPEND//%/[${MULTILIB_USEDEP}]} )
|
||||
!multilib? ( ${RDEPEND//%/} )"
|
||||
|
||||
PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
|
||||
nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )
|
||||
pulseaudio? ( dev-java/icedtea-sound )"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ "$(tc-is-softfloat)" != "no" ]]; then
|
||||
die "These binaries require a hardfloat system."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# I wouldn't normally use -f below but symlinks in the arm files
|
||||
# make this fail otherwise and any other approach would be tedious.
|
||||
|
||||
if ! use alsa; then
|
||||
rm -fv */jre/lib/*/libjsoundalsa.* || die
|
||||
fi
|
||||
|
||||
if use headless-awt; then
|
||||
rm -fvr */jre/lib/*/lib*{[jx]awt,splashscreen}* \
|
||||
*/{,jre/}bin/policytool */bin/appletviewer || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local dest="/opt/${P}-${ABI}"
|
||||
dest="${dest/%-${DEFAULT_ABI}/}"
|
||||
local ddest="${ED}${dest#/}"
|
||||
dodir "${dest}"
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
dodoc ${P}-${ABI}/doc/{ASSEMBLY_EXCEPTION,AUTHORS,NEWS,README,THIRD_PARTY_README}
|
||||
use doc && dodoc -r ${P}/doc/html
|
||||
|
||||
# doins doesn't preserve executable bits.
|
||||
cp -pRP ${P}-${ABI}/{bin,include,jre,lib,man} "${ddest}" || die
|
||||
|
||||
if use examples; then
|
||||
cp -pRP ${P}-${ABI}/{demo,sample} "${ddest}" || die
|
||||
fi
|
||||
|
||||
if use source; then
|
||||
cp ${P}/src.zip "${ddest}" || die
|
||||
fi
|
||||
|
||||
# use system-wide cacert store
|
||||
rm "${ddest}"/jre/lib/security/cacerts || die
|
||||
dosym "${EPREFIX}"/etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
|
||||
|
||||
# Use default VMHANDLE.
|
||||
java-vm_install-env "${FILESDIR}/icedtea-bin.env.sh"
|
||||
else
|
||||
local x native=$(get_system_arch ${DEFAULT_ABI})
|
||||
|
||||
for x in {,/jre}/{bin,lib/$(get_system_arch)} /jre/lib/rt.jar; do
|
||||
dodir "${dest}"${x%/*}
|
||||
cp -pRP ${P}-${ABI}${x} "${ddest}"${x} || die
|
||||
done
|
||||
|
||||
for x in ${P}-${DEFAULT_ABI}{,/jre}/lib/*; do
|
||||
[[ ${x##*/} = ${native} ]] && continue
|
||||
[[ -e "${ddest}"/${x#*/} ]] && continue
|
||||
dosym "${EPREFIX}"/opt/${P}/${x#*/} "${dest}"/${x#*/}
|
||||
done
|
||||
|
||||
# Use ABI-suffixed VMHANDLE.
|
||||
VMHANDLE+="-${ABI}" java-vm_install-env "${FILESDIR}/icedtea-bin.env.sh"
|
||||
fi
|
||||
|
||||
# Both icedtea itself and the icedtea ebuild set PAX markings but we
|
||||
# disable them for the icedtea-bin build because the line below will
|
||||
# respect end-user settings when icedtea-bin is actually installed.
|
||||
java-vm_set-pax-markings "${ddest}"
|
||||
|
||||
# Each invocation appends to the config.
|
||||
java-vm_revdep-mask "${EPREFIX}${dest}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use multilib; then
|
||||
multilib_foreach_abi multilib_src_install
|
||||
else
|
||||
multilib_src_install
|
||||
fi
|
||||
|
||||
java-vm_sandbox-predict /proc/self/coredump_filter
|
||||
}
|
@ -1,3 +1,2 @@
|
||||
DIST OpenJDK11U-jre_x64_linux_hotspot_11.0.5_10.tar.gz 42132415 BLAKE2B f857b9618f653ce3df1a1f6b3a3f3fd0ceaaa2d66b9d58872817fdbb7846195459b0fd1d79cddb444e0cd17faafc46bcea85fa22b810d2e93b95a9829da6dad5 SHA512 b13ee8af718c701195765eb6c36c8a6dfc32a5a39f8da4118db4e5ef8ab2012f8952cea73a964fcac079487b6372c0be727f0f2df43b948ccdd4663e6b327d1d
|
||||
DIST OpenJDK11U-jre_x64_linux_hotspot_11.0.6_10.tar.gz 42198347 BLAKE2B e0022f46f0f3de41d28baf19bcea2c7d6237e80586b7a1e3fb2b97aced18d564fe03a6706b8a3fe97375ff6be395aceafd1e0dba6adaddaa7285b0b8eb24310b SHA512 0d1366c68ad12fafc76edddc7d385f612751182b5492cff4309d542a0e12b13c9b17ca89a0a8218ad0f8182b24285189158c43759db54645758c7ea8dc4d6ce9
|
||||
DIST OpenJDK8U-jre_x64_linux_hotspot_8u242b08.tar.gz 40987250 BLAKE2B ba3f15b938b4462a186c13ca8ea12c5e5e5bbfe5e716af1911e9525875e6956caf3155423f32433be05ebd1a3c873d94b33a797298d6d09577a775c7dfe2a658 SHA512 11dddf75813aa3b88b2bfb2ca89e186cc15601f75ec4f9cbe92c8b60f61438f75a76e45c26bc614eb54de16a584e906f8935cb2146937b96f2970eb89dddea09
|
||||
|
@ -1,97 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit java-vm-2
|
||||
|
||||
abi_uri() {
|
||||
echo "${2-$1}? (
|
||||
https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jre_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz
|
||||
)"
|
||||
}
|
||||
|
||||
MY_PV=${PV/_p/+}
|
||||
SLOT=${MY_PV%%[.+]*}
|
||||
|
||||
SRC_URI="
|
||||
$(abi_uri x64 amd64)
|
||||
"
|
||||
|
||||
DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK"
|
||||
HOMEPAGE="https://adoptopenjdk.net"
|
||||
LICENSE="GPL-2-with-classpath-exception"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="alsa cups +gentoo-vm headless-awt nsplugin selinux webstart"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/fontconfig:1.0
|
||||
media-libs/freetype:2
|
||||
>net-libs/libnet-1.1
|
||||
>=sys-apps/baselayout-java-0.1.0-r1
|
||||
>=sys-libs/glibc-2.2.5:*
|
||||
sys-libs/zlib
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
cups? ( net-print/cups )
|
||||
selinux? ( sec-policy/selinux-java )
|
||||
!headless-awt? (
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrender
|
||||
x11-libs/libXtst
|
||||
)"
|
||||
|
||||
PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
|
||||
nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
|
||||
|
||||
RESTRICT="preserve-libs splitdebug"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
S="${WORKDIR}/jdk-${MY_PV}-jre"
|
||||
|
||||
src_install() {
|
||||
local dest="/opt/${P}"
|
||||
local ddest="${ED%/}/${dest#/}"
|
||||
|
||||
# Not sure why they bundle this as it's commonly available and they
|
||||
# only do so on x86_64. It's needed by libfontmanager.so. IcedTea
|
||||
# also has an explicit dependency while Oracle seemingly dlopens it.
|
||||
rm -vf lib/libfreetype.so || die
|
||||
|
||||
# Oracle and IcedTea have libjsoundalsa.so depending on
|
||||
# libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
|
||||
if ! use alsa ; then
|
||||
rm -v lib/libjsound.* || die
|
||||
fi
|
||||
|
||||
if use headless-awt ; then
|
||||
rm -v lib/lib*{[jx]awt,splashscreen}* || die
|
||||
fi
|
||||
|
||||
rm -v lib/security/cacerts || die
|
||||
dosym ../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
|
||||
|
||||
dodir "${dest}"
|
||||
cp -pPR * "${ddest}" || die
|
||||
|
||||
use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
|
||||
java-vm_set-pax-markings "${ddest}"
|
||||
java-vm_revdep-mask
|
||||
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
java-vm-2_pkg_postinst
|
||||
|
||||
if use gentoo-vm ; then
|
||||
ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE"
|
||||
ewarn "recognised by the system. This will almost certainly break things."
|
||||
else
|
||||
ewarn "The experimental gentoo-vm USE flag has not been enabled so this JRE"
|
||||
ewarn "will not be recognised by the system. For example, simply calling"
|
||||
ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
|
||||
ewarn "fully supports Java 11. This JRE must therefore be invoked using its"
|
||||
ewarn "absolute location under ${EPREFIX}/opt/${P}."
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,4 +1,8 @@
|
||||
DIST ruby-2.4.10.tar.xz 10100664 BLAKE2B 7301f34b94bb6d88c0d049eed4220ddb290c877b130e90c822226bc454b3e72c90ae151db0e828068c8fe02b21cd41c8f3cd43d4e95ab688d2cd6f3f3840ea9d SHA512 11c7a9ea1353f752763b189815ac34674cc8ebf7141517838b7f040823e892780d94ec3091c1f5d1415f9bc1b838b7f6f9de13a706df7bef80ce3b146a7d6660
|
||||
DIST ruby-2.4.9.tar.xz 10078316 BLAKE2B ad83adf6b884a9a36e83cc754077f706afa221a9e8b81d92f6b6a1b829dc0350bdacd67b0b4e1e196a17e3f7d1c65f1e9b38e245aeddf089576eaca7d051701b SHA512 9046575315c29c789427c2d00c832f0c0970e47fd158bbe8e4f2df5cff2ea9c06c65c3493adb4656e5b32ebfdc546092911f98a8ad7f698bc001c290db5888c7
|
||||
DIST ruby-2.5.7.tar.xz 11296440 BLAKE2B 6f3590f30c7b196145a83490abed24b0059521374a03086646186b20670bfed548ea744c910c8eda0d11607d8673644d7fb23ff9091dd2f6dfcbc43080fe0f97 SHA512 63b7c75fab44cd1bd22f22ddec00c740cf379ac7240da0dfafcec54347766695faef47428ce1c433fd77fa96992e976c984697067fa526236d383b12adc9ce75
|
||||
DIST ruby-2.5.8.tar.xz 11298404 BLAKE2B 3256c0448e72b63c0bd89f89a27fa9c09c8feed54d42cd79899b7d5cfe9dbc29ca708d12c630b3f52ff85b0c6a4011ae7ff0483d64b2fd445700a72a91028035 SHA512 2886be764a454425c5beef2777c64a70ee0d048b07896b327633d904f5077fea4299526689f9e2ac4dcd2fc4811cf9a6c8ce75367ed35d29dfe1a54222872e0d
|
||||
DIST ruby-2.6.5.tar.xz 11553580 BLAKE2B 07739a92ff17467fe6d31bb4dce56ae35fd9c67bb697ebc00b4845474c75d8377c77916e6e129512cfffcf76bd60e6327e818e899b6160f3222912654d5eb118 SHA512 e8ae3b5d4d23a93d0ef6057235ad0e573665a8b4b6544e1c70b4cce9c4d2fb9094e5c8fe8a9ab7b9996efe3ada603f9b4ef1fd08fb5a83253c1ae2b5e3f202db
|
||||
DIST ruby-2.6.6.tar.xz 11567284 BLAKE2B 45e910dd9b128c46bff3003834c4fdcbbc2e2e4d3e44f298ff4356a285de2c375d6b6021a3aa28d89336b32a1655fa4a7c086d07f4a0f6bcd578a11dd4a894da SHA512 86caf93dbf61d03781767ab5375a7edf4761f13ba08ccfefe16c0a7550499237e7390c2f72a95d42670d4fe76b2401b4218936187c62ec1572799e9e04c50d62
|
||||
DIST ruby-2.7.0.tar.xz 11990900 BLAKE2B 0f4969780618979190a92ca317963f825d854ecb437e7031cb7848b04bc9cb9532145968e33f5b8022449bccd1b0828b87a0ed0c0a09b182e2484d0811975a0d SHA512 dd5690c631bf3a2b76cdc06902bcd76a89713a045e136debab9b8a81ff8c433bbb254aa09e4014ca1cf85a69ff4bcb13de11da5e40c224e7268be43ef2194af7
|
||||
DIST ruby-2.7.1.tar.xz 12003684 BLAKE2B 90a35c3e246cfe982a146be29a3d121d6e2c251ed96703dbc46b98c21e0e43e5445132e6119e584ae35f7193f063ff1b14822f947a4e07037c37fbba5e4038da SHA512 79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31
|
||||
|
@ -0,0 +1,228 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools flag-o-matic multilib
|
||||
|
||||
MY_P="${PN}-$(ver_cut 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(ver_cut 1-2)
|
||||
MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
|
||||
RUBYVERSION=${SLOT}.0
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="https://www.ruby-lang.org/"
|
||||
SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm:= )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
tk? (
|
||||
dev-lang/tcl:0=[threads]
|
||||
dev-lang/tk:0=[threads]
|
||||
)
|
||||
dev-libs/libyaml
|
||||
dev-libs/libffi:=
|
||||
sys-libs/readline:0=
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20161226
|
||||
!<dev-ruby/rdoc-3.9.4
|
||||
!<dev-ruby/rubygems-1.8.10-r1"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24]
|
||||
>=dev-ruby/minitest-5.10.1[ruby_targets_ruby24]
|
||||
>=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24]
|
||||
>=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24]
|
||||
>=dev-ruby/rake-12.0.0[ruby_targets_ruby24]
|
||||
>=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24]
|
||||
>=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby24]
|
||||
>=dev-ruby/json-2.0.2[ruby_targets_ruby24]
|
||||
rdoc? ( >=dev-ruby/rdoc-5.1.0-r1[ruby_targets_ruby24] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch
|
||||
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700. Use explicit version numbers to ensure rm fails when they
|
||||
# change so we can update dependencies accordingly.
|
||||
rm -f gems/{did_you_mean-1.1.0,minitest-5.10.1,net-telnet-0.1.1,power_assert-0.4.1,rake-12.0.0,test-unit-3.2.3,xmlrpc-0.2.1}.gem || die
|
||||
|
||||
einfo "Removing bundled libraries..."
|
||||
rm -fr ext/fiddle/libffi-3.2.1 || die
|
||||
|
||||
# Fix a hardcoded lib path in configure script
|
||||
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
|
||||
configure.in || die "sed failed"
|
||||
|
||||
eapply_user
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local modules= myconf=
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use tk ; then
|
||||
modules="${modules},tk"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_with jemalloc jemalloc) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable static-libs install-static-library) \
|
||||
$(use_with static-libs static-linked-ext) \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
emake V=1 DESTDIR="${D}" install
|
||||
|
||||
# Remove installed rubygems and rdoc copy
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
make DESTDIR="${D}" install-doc || die "make install-doc failed"
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README*
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(23|24|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -0,0 +1,223 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools flag-o-matic multilib
|
||||
|
||||
MY_P="${PN}-$(ver_cut 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(ver_cut 1-2)
|
||||
MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
|
||||
RUBYVERSION=${SLOT}.0
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="https://www.ruby-lang.org/"
|
||||
SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm:= )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
tk? (
|
||||
dev-lang/tcl:0=[threads]
|
||||
dev-lang/tk:0=[threads]
|
||||
)
|
||||
dev-libs/libyaml
|
||||
dev-libs/libffi:=
|
||||
sys-libs/readline:0=
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20171225
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25]
|
||||
>=dev-ruby/minitest-5.10.3[ruby_targets_ruby25]
|
||||
>=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25]
|
||||
>=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25]
|
||||
>=dev-ruby/rake-12.3.0[ruby_targets_ruby25]
|
||||
>=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25]
|
||||
>=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby25]
|
||||
>=dev-ruby/json-2.0.2[ruby_targets_ruby25]
|
||||
rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}"/${SLOT}/{001,005,011}*.patch
|
||||
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700. Use explicit version numbers to ensure rm fails when they
|
||||
# change so we can update dependencies accordingly.
|
||||
rm -f gems/{did_you_mean-1.2.0,minitest-5.10.3,net-telnet-0.1.1,power_assert-1.1.1,rake-12.3.0,test-unit-3.2.7,xmlrpc-0.3.0}.gem || die
|
||||
|
||||
einfo "Removing bundled libraries..."
|
||||
rm -fr ext/fiddle/libffi-3.2.1 || die
|
||||
|
||||
eapply_user
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local modules= myconf=
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use tk ; then
|
||||
modules="${modules},tk"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_with jemalloc jemalloc) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable static-libs install-static-library) \
|
||||
$(use_with static-libs static-linked-ext) \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
emake V=1 DESTDIR="${D}" install
|
||||
|
||||
# Remove installed rubygems and rdoc copy
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
make DESTDIR="${D}" install-doc || die "make install-doc failed"
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README*
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(23|24|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -0,0 +1,235 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools flag-o-matic multilib
|
||||
|
||||
MY_P="${PN}-$(ver_cut 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(ver_cut 1-2)
|
||||
MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
|
||||
RUBYVERSION=${SLOT}.0
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="https://www.ruby-lang.org/"
|
||||
SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm:= )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
tk? (
|
||||
dev-lang/tcl:0=[threads]
|
||||
dev-lang/tk:0=[threads]
|
||||
)
|
||||
dev-libs/libyaml
|
||||
dev-libs/libffi:=
|
||||
sys-libs/readline:0=
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20171225
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
|
||||
>=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
|
||||
>=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
|
||||
>=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
|
||||
>=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
|
||||
>=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
|
||||
>=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby26]
|
||||
>=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
|
||||
>=dev-ruby/json-2.0.2[ruby_targets_ruby26]
|
||||
rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
# 005 does not compile bigdecimal and is questionable because it
|
||||
# compiles ruby in a non-standard way, may be dropped
|
||||
eapply "${FILESDIR}"/2.6/010*.patch
|
||||
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700.
|
||||
rm -fr gems/* || die
|
||||
|
||||
einfo "Removing bundled libraries..."
|
||||
rm -fr ext/fiddle/libffi-3.2.1 || die
|
||||
|
||||
eapply_user
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local modules= myconf=
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use tk ; then
|
||||
modules="${modules},tk"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_with jemalloc jemalloc) \
|
||||
$(use_enable jit jit-support ) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable static-libs install-static-library) \
|
||||
$(use_with static-libs static-linked-ext) \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no
|
||||
|
||||
# Makefile is broken because it lacks -ldl
|
||||
rm -rf ext/-test-/popen_deadlock || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
# Create directory for the default gems
|
||||
local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
|
||||
mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
|
||||
|
||||
emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
|
||||
|
||||
# Remove installed rubygems and rdoc copy
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README*
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(23|24|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -0,0 +1,237 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools flag-o-matic multilib
|
||||
|
||||
MY_P="${PN}-$(ver_cut 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(ver_cut 1-2)
|
||||
MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
|
||||
RUBYVERSION=${SLOT}.0
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="https://www.ruby-lang.org/"
|
||||
SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm:= )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
tk? (
|
||||
dev-lang/tcl:0=[threads]
|
||||
dev-lang/tk:0=[threads]
|
||||
)
|
||||
dev-libs/libyaml
|
||||
dev-libs/libffi:=
|
||||
sys-libs/readline:0=
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20171225
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
|
||||
>=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
|
||||
>=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
|
||||
>=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
|
||||
>=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
|
||||
>=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby27]
|
||||
>=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
|
||||
>=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
|
||||
>=dev-ruby/json-2.0.2[ruby_targets_ruby27]
|
||||
rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
# 005 does not compile bigdecimal and is questionable because it
|
||||
# compiles ruby in a non-standard way, may be dropped
|
||||
eapply "${FILESDIR}"/2.7/010*.patch
|
||||
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700.
|
||||
rm -fr gems/* || die
|
||||
# Don't install CLI tools since they will clash with the gem
|
||||
rm -f bin/{racc,racc2y,y2racc} || die
|
||||
sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
|
||||
|
||||
einfo "Removing bundled libraries..."
|
||||
rm -fr ext/fiddle/libffi-3.2.1 || die
|
||||
|
||||
eapply_user
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local modules= myconf=
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use tk ; then
|
||||
modules="${modules},tk"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_with jemalloc jemalloc) \
|
||||
$(use_enable jit jit-support ) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable static-libs install-static-library) \
|
||||
$(use_with static-libs static-linked-ext) \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no
|
||||
|
||||
# Makefile is broken because it lacks -ldl
|
||||
rm -rf ext/-test-/popen_deadlock || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
# Create directory for the default gems
|
||||
local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
|
||||
mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
|
||||
|
||||
emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
|
||||
|
||||
# Remove installed rubygems and rdoc copy
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
dodoc -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README*
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(23|24|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
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="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/usr/share/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustgdbgui=rust-gdbgui-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "${rustc}" "/opt/${P}/bin/rustc"
|
||||
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
|
||||
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
|
||||
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
|
||||
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "${cargo}" "/opt/${P}/bin/cargo"
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
|
||||
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
|
||||
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
MY_P="rust-${PV}"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
SRC_URI="$(rust_all_arch_uris ${MY_P})"
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
SLOT="stable"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="clippy cpu_flags_x86_sse2 doc 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="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/usr/share/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustgdbgui=rust-gdbgui-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "${rustc}" "/opt/${P}/bin/rustc"
|
||||
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
|
||||
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
|
||||
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
|
||||
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "${cargo}" "/opt/${P}/bin/cargo"
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
|
||||
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
|
||||
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
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="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/usr/share/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustgdbgui=rust-gdbgui-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "${rustc}" "/opt/${P}/bin/rustc"
|
||||
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
|
||||
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
|
||||
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
|
||||
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "${cargo}" "/opt/${P}/bin/cargo"
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
|
||||
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
|
||||
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
MY_P="rust-${PV}"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
SRC_URI="$(rust_all_arch_uris ${MY_P})"
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
SLOT="stable"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="clippy cpu_flags_x86_sse2 doc 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="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/usr/share/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustgdbgui=rust-gdbgui-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
|
||||
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "${rustc}" "/opt/${P}/bin/rustc"
|
||||
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
|
||||
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
|
||||
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
|
||||
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "${cargo}" "/opt/${P}/bin/cargo"
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
|
||||
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
|
||||
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
From 1f68002cb725c6a8fb5ca8425c1c86495a053f4f Mon Sep 17 00:00:00 2001
|
||||
From: Michal Gorny <mgorny@gentoo.org>
|
||||
Date: Thu, 4 Apr 2019 14:21:38 +0000
|
||||
Subject: [PATCH] [llvm] [cmake] Add additional headers only if they exist
|
||||
|
||||
Modify the add_header_files_for_glob() function to only add files
|
||||
that do exist, rather than all matches of the glob. This fixes CMake
|
||||
error when one of the include directories (which happen to include
|
||||
/usr/include) contain broken symlinks.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D59632
|
||||
|
||||
llvm-svn: 357701
|
||||
---
|
||||
llvm/cmake/modules/LLVMProcessSources.cmake | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
|
||||
index 7cbd2863500..d0be0e8b3ba 100644
|
||||
--- a/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
|
||||
+++ b/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
|
||||
@@ -30,7 +30,15 @@ endmacro(add_td_sources)
|
||||
|
||||
function(add_header_files_for_glob hdrs_out glob)
|
||||
file(GLOB hds ${glob})
|
||||
- set(${hdrs_out} ${hds} PARENT_SCOPE)
|
||||
+ set(filtered)
|
||||
+ foreach(file ${hds})
|
||||
+ # Explicit existence check is necessary to filter dangling symlinks
|
||||
+ # out. See https://bugs.gentoo.org/674662.
|
||||
+ if(EXISTS ${file})
|
||||
+ list(APPEND filtered ${file})
|
||||
+ endif()
|
||||
+ endforeach()
|
||||
+ set(${hdrs_out} ${filtered} PARENT_SCOPE)
|
||||
endfunction(add_header_files_for_glob)
|
||||
|
||||
function(find_all_header_files hdrs_out additional_headerdirs)
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,36 +0,0 @@
|
||||
From c1aa2a464ed1a0fa2430a1e604fe6a3b9d785048 Mon Sep 17 00:00:00 2001
|
||||
From: O01eg <o01eg@yandex.ru>
|
||||
Date: Mon, 8 Jul 2019 22:49:24 +0300
|
||||
Subject: [PATCH] Fix double resolving custom libdir
|
||||
|
||||
---
|
||||
src/bootstrap/dist.rs | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index 45bc77ec97d4..5ddd1c3da949 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -485,7 +485,9 @@ impl Step for Rustc {
|
||||
let name = entry.file_name();
|
||||
if let Some(s) = name.to_str() {
|
||||
if is_dylib(s) {
|
||||
- builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
|
||||
+ // Don't use custom libdir here because ^lib/ will be resolved again
|
||||
+ // with installer
|
||||
+ builder.install(&entry.path(), &image.join("lib"), 0o644);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -493,8 +495,9 @@ impl Step for Rustc {
|
||||
|
||||
// Copy over the codegen backends
|
||||
let backends_src = builder.sysroot_codegen_backends(compiler);
|
||||
- let backends_rel = backends_src.strip_prefix(&src).unwrap();
|
||||
- let backends_dst = image.join(&backends_rel);
|
||||
+ let backends_rel = backends_src.strip_prefix(&libdir).unwrap();
|
||||
+ // Don't use custom libdir here because ^lib/ will be resolved again with installer
|
||||
+ let backends_dst = image.join("lib").join(&backends_rel);
|
||||
t!(fs::create_dir_all(&backends_dst));
|
||||
builder.cp_r(&backends_src, &backends_dst);
|
||||
|
@ -1,117 +0,0 @@
|
||||
From d6bd0a479ceaf6abdd696c3b955a56f66275c562 Mon Sep 17 00:00:00 2001
|
||||
From: Georgy Yakovlev <gyakovlev@gentoo.org>
|
||||
Date: Sat, 25 May 2019 22:21:16 -0700
|
||||
Subject: [PATCH] revert commits triggering multiple llvm rebuilds
|
||||
|
||||
this reverts the following commits
|
||||
https://github.com/rust-lang/rust/commit/105692c3ad281c63bf0f75a26a66bb9cff5b4553
|
||||
https://github.com/rust-lang/rust/commit/975ba58f42b34ff07cd7c2bd73350daed2057186
|
||||
https://github.com/rust-lang/rust/commit/e1daa36ba7df88788c2684bbe5ff6eb37f1cda69
|
||||
---
|
||||
src/bootstrap/llvm-rebuild-trigger | 4 +++
|
||||
src/bootstrap/native.rs | 46 +++++++++++++-----------------
|
||||
2 files changed, 24 insertions(+), 26 deletions(-)
|
||||
create mode 100644 src/bootstrap/llvm-rebuild-trigger
|
||||
|
||||
diff --git a/src/bootstrap/llvm-rebuild-trigger b/src/bootstrap/llvm-rebuild-trigger
|
||||
new file mode 100644
|
||||
index 0000000000..0f18c6a4ac
|
||||
--- /dev/null
|
||||
+++ b/src/rustllvm/llvm-rebuild-trigger
|
||||
@@ -0,0 +1,4 @@
|
||||
+# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
|
||||
+# The actual contents of this file do not matter, but to trigger a change on the
|
||||
+# build bots then the contents should be changed so git updates the mtime.
|
||||
+2019-03-18
|
||||
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
|
||||
index fde40b0d1b..3babbc9e10 100644
|
||||
--- a/src/bootstrap/native.rs
|
||||
+++ b/src/bootstrap/native.rs
|
||||
@@ -67,40 +67,30 @@ impl Step for Llvm {
|
||||
}
|
||||
}
|
||||
|
||||
- let (llvm_info, root, out_dir, llvm_config_ret_dir) = if emscripten {
|
||||
- let info = &builder.emscripten_llvm_info;
|
||||
+ let rebuild_trigger = builder.src.join("src/rustllvm/llvm-rebuild-trigger");
|
||||
+ let rebuild_trigger_contents = t!(fs::read_to_string(&rebuild_trigger));
|
||||
+
|
||||
+ let (out_dir, llvm_config_ret_dir) = if emscripten {
|
||||
let dir = builder.emscripten_llvm_out(target);
|
||||
let config_dir = dir.join("bin");
|
||||
- (info, "src/llvm-emscripten", dir, config_dir)
|
||||
+ (dir, config_dir)
|
||||
} else {
|
||||
- let info = &builder.in_tree_llvm_info;
|
||||
let mut dir = builder.llvm_out(builder.config.build);
|
||||
if !builder.config.build.contains("msvc") || builder.config.ninja {
|
||||
dir.push("build");
|
||||
}
|
||||
- (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
|
||||
+ (builder.llvm_out(target), dir.join("bin"))
|
||||
};
|
||||
-
|
||||
- if !llvm_info.is_git() {
|
||||
- println!(
|
||||
- "git could not determine the LLVM submodule commit hash. \
|
||||
- Assuming that an LLVM build is necessary.",
|
||||
- );
|
||||
- }
|
||||
-
|
||||
+ let done_stamp = out_dir.join("llvm-finished-building");
|
||||
let build_llvm_config = llvm_config_ret_dir
|
||||
.join(exe("llvm-config", &*builder.config.build));
|
||||
- let done_stamp = out_dir.join("llvm-finished-building");
|
||||
-
|
||||
- if let Some(llvm_commit) = llvm_info.sha() {
|
||||
- if done_stamp.exists() {
|
||||
- let done_contents = t!(fs::read(&done_stamp));
|
||||
+ if done_stamp.exists() {
|
||||
+ let done_contents = t!(fs::read_to_string(&done_stamp));
|
||||
|
||||
- // If LLVM was already built previously and the submodule's commit didn't change
|
||||
- // from the previous build, then no action is required.
|
||||
- if done_contents == llvm_commit.as_bytes() {
|
||||
- return build_llvm_config
|
||||
- }
|
||||
+ // If LLVM was already built previously and contents of the rebuild-trigger file
|
||||
+ // didn't change from the previous build, then no action is required.
|
||||
+ if done_contents == rebuild_trigger_contents {
|
||||
+ return build_llvm_config
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +101,7 @@ impl Step for Llvm {
|
||||
t!(fs::create_dir_all(&out_dir));
|
||||
|
||||
// http://llvm.org/docs/CMake.html
|
||||
+ let root = if self.emscripten { "src/llvm-emscripten" } else { "src/llvm-project/llvm" };
|
||||
let mut cfg = cmake::Config::new(builder.src.join(root));
|
||||
|
||||
let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
|
||||
@@ -251,6 +242,11 @@ impl Step for Llvm {
|
||||
channel::CFG_RELEASE_NUM,
|
||||
builder.config.channel,
|
||||
);
|
||||
+ let llvm_info = if self.emscripten {
|
||||
+ &builder.emscripten_llvm_info
|
||||
+ } else {
|
||||
+ &builder.in_tree_llvm_info
|
||||
+ };
|
||||
if let Some(sha) = llvm_info.sha_short() {
|
||||
default_suffix.push_str("-");
|
||||
default_suffix.push_str(sha);
|
||||
@@ -283,9 +279,7 @@ impl Step for Llvm {
|
||||
|
||||
cfg.build();
|
||||
|
||||
- if let Some(llvm_commit) = llvm_info.sha() {
|
||||
- t!(fs::write(&done_stamp, llvm_commit));
|
||||
- }
|
||||
+ t!(fs::write(&done_stamp, &rebuild_trigger_contents));
|
||||
|
||||
build_llvm_config
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,68 +0,0 @@
|
||||
diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
|
||||
index 5c961bcbc..a0ea2d357 100644
|
||||
--- a/vendor/openssl-sys/.cargo-checksum.json
|
||||
+++ b/vendor/openssl-sys/.cargo-checksum.json
|
||||
@@ -1 +1 @@
|
||||
-{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"681a1f8a8f389c82bbd3d2498a3692c201c63db658e7c3d162f09d5d81892fd4","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"}
|
||||
\ No newline at end of file
|
||||
+{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"f2cd4ca8fde8298211581f9e1ca61668706d7681a38b95a63591450e1d8366a3","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"}
|
||||
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
|
||||
index 02b93b90a..f0cf4b4ff 100644
|
||||
--- a/vendor/openssl-sys/build/main.rs
|
||||
+++ b/vendor/openssl-sys/build/main.rs
|
||||
@@ -183,27 +183,31 @@ See rust-openssl README for more information:
|
||||
if let Some(libressl_version) = libressl_version {
|
||||
println!("cargo:libressl_version_number={:x}", libressl_version);
|
||||
|
||||
+ let major = (libressl_version >> 28) as u8;
|
||||
let minor = (libressl_version >> 20) as u8;
|
||||
let fix = (libressl_version >> 12) as u8;
|
||||
- let (minor, fix) = match (minor, fix) {
|
||||
- (5, 0) => ('5', '0'),
|
||||
- (5, 1) => ('5', '1'),
|
||||
- (5, 2) => ('5', '2'),
|
||||
- (5, _) => ('5', 'x'),
|
||||
- (6, 0) => ('6', '0'),
|
||||
- (6, 1) => ('6', '1'),
|
||||
- (6, 2) => ('6', '2'),
|
||||
- (6, _) => ('6', 'x'),
|
||||
- (7, _) => ('7', 'x'),
|
||||
- (8, 0) => ('8', '0'),
|
||||
- (8, 1) => ('8', '1'),
|
||||
- (8, _) => ('8', 'x'),
|
||||
- (9, 0) => ('9', '0'),
|
||||
+ let (major, minor, fix) = match (major, minor, fix) {
|
||||
+ (2, 5, 0) => ('2', '5', '0'),
|
||||
+ (2, 5, 1) => ('2', '5', '1'),
|
||||
+ (2, 5, 2) => ('2', '5', '2'),
|
||||
+ (2, 5, _) => ('2', '5', 'x'),
|
||||
+ (2, 6, 0) => ('2', '6', '0'),
|
||||
+ (2, 6, 1) => ('2', '6', '1'),
|
||||
+ (2, 6, 2) => ('2', '6', '2'),
|
||||
+ (2, 6, _) => ('2', '6', 'x'),
|
||||
+ (2, 7, _) => ('2', '7', 'x'),
|
||||
+ (2, 8, 0) => ('2', '8', '0'),
|
||||
+ (2, 8, 1) => ('2', '8', '1'),
|
||||
+ (2, 8, _) => ('2', '8', 'x'),
|
||||
+ (2, 9, 0) => ('2', '9', '0'),
|
||||
+ (2, 9, _) => ('2', '9', 'x'),
|
||||
+ (3, 0, 0) => ('3', '0', '0'),
|
||||
+ (3, 0, _) => ('3', '0', 'x'),
|
||||
_ => version_error(),
|
||||
};
|
||||
|
||||
println!("cargo:libressl=true");
|
||||
- println!("cargo:libressl_version=2{}{}", minor, fix);
|
||||
+ println!("cargo:libressl_version={}{}{}", major, minor, fix);
|
||||
println!("cargo:version=101");
|
||||
Version::Libressl
|
||||
} else {
|
||||
@@ -239,7 +243,7 @@ fn version_error() -> ! {
|
||||
"
|
||||
|
||||
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
|
||||
-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
|
||||
+through 3.0.x, but a different version of OpenSSL was found. The build is now aborting
|
||||
due to this version mismatch.
|
||||
|
||||
"
|
@ -1,90 +0,0 @@
|
||||
From 8553cc0681db7fb6b58b25bb3fbd520604a0cc3a Mon Sep 17 00:00:00 2001
|
||||
From: O01eg <o01eg@yandex.ru>
|
||||
Date: Wed, 7 Aug 2019 23:37:55 +0300
|
||||
Subject: [PATCH] Fix double resolving custom libdir
|
||||
|
||||
---
|
||||
src/bootstrap/builder.rs | 20 +++++++++++++-------
|
||||
src/bootstrap/dist.rs | 13 +++++++++----
|
||||
2 files changed, 22 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index 5a75497173eb..06ccdd8e7f0f 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -627,13 +627,7 @@ impl<'a> Builder<'a> {
|
||||
}
|
||||
|
||||
fn run(self, builder: &Builder<'_>) -> Interned<PathBuf> {
|
||||
- let compiler = self.compiler;
|
||||
- let config = &builder.build.config;
|
||||
- let lib = if compiler.stage >= 1 && config.libdir_relative().is_some() {
|
||||
- builder.build.config.libdir_relative().unwrap()
|
||||
- } else {
|
||||
- Path::new("lib")
|
||||
- };
|
||||
+ let lib = builder.sysroot_libdir_relative(self.compiler);
|
||||
let sysroot = builder
|
||||
.sysroot(self.compiler)
|
||||
.join(lib)
|
||||
@@ -687,6 +681,18 @@ impl<'a> Builder<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
+ /// Returns the compiler's relative libdir where the standard library and other artifacts are
|
||||
+ /// found for a compiler's sysroot.
|
||||
+ ///
|
||||
+ /// For example this returns `lib` on Unix and Windows.
|
||||
+ pub fn sysroot_libdir_relative(&self, compiler: Compiler) -> &Path {
|
||||
+ match self.config.libdir_relative() {
|
||||
+ Some(relative_libdir) if compiler.stage >= 1
|
||||
+ => relative_libdir,
|
||||
+ _ => Path::new("lib")
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/// Adds the compiler's directory of dynamic libraries to `cmd`'s dynamic
|
||||
/// library lookup path.
|
||||
pub fn add_rustc_lib_path(&self, compiler: Compiler, cmd: &mut Command) {
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index bd012a887c26..213ceb194a81 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -469,7 +469,6 @@ impl Step for Rustc {
|
||||
fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
let host = compiler.host;
|
||||
let src = builder.sysroot(compiler);
|
||||
- let libdir = builder.rustc_libdir(compiler);
|
||||
|
||||
// Copy rustc/rustdoc binaries
|
||||
t!(fs::create_dir_all(image.join("bin")));
|
||||
@@ -481,11 +480,14 @@ impl Step for Rustc {
|
||||
|
||||
// Copy runtime DLLs needed by the compiler
|
||||
if libdir_relative.to_str() != Some("bin") {
|
||||
+ let libdir = builder.rustc_libdir(compiler);
|
||||
for entry in builder.read_dir(&libdir) {
|
||||
let name = entry.file_name();
|
||||
if let Some(s) = name.to_str() {
|
||||
if is_dylib(s) {
|
||||
- builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
|
||||
+ // Don't use custom libdir here because ^lib/ will be resolved again
|
||||
+ // with installer
|
||||
+ builder.install(&entry.path(), &image.join("lib"), 0o644);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -493,8 +495,11 @@ impl Step for Rustc {
|
||||
|
||||
// Copy over the codegen backends
|
||||
let backends_src = builder.sysroot_codegen_backends(compiler);
|
||||
- let backends_rel = backends_src.strip_prefix(&src).unwrap();
|
||||
- let backends_dst = image.join(&backends_rel);
|
||||
+ let backends_rel = backends_src.strip_prefix(&src).unwrap()
|
||||
+ .strip_prefix(builder.sysroot_libdir_relative(compiler)).unwrap();
|
||||
+ // Don't use custom libdir here because ^lib/ will be resolved again with installer
|
||||
+ let backends_dst = image.join("lib").join(&backends_rel);
|
||||
+
|
||||
t!(fs::create_dir_all(&backends_dst));
|
||||
builder.cp_r(&backends_src, &backends_dst);
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 53fe76479aab03b1fbe5b7184f45484886f769b1 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 4 Sep 2019 16:02:31 -0700
|
||||
Subject: [PATCH] Assume non-git LLVM is fresh if the stamp file exists
|
||||
|
||||
Rustbuild usually writes the LLVM submodule commit in a stamp file, so
|
||||
we can avoid rebuilding it unnecessarily. However, for builds from a
|
||||
source tarball (non-git), we were assuming a rebuild is always needed.
|
||||
This can cause a lot of extra work if any environment like `CFLAGS`
|
||||
changed between steps like build and install, which are often separate
|
||||
in distro builds.
|
||||
|
||||
Now we also write an empty stamp file if the git commit is unknown, and
|
||||
its presence is trusted to indicate that no rebuild is needed. An info
|
||||
message reports that this is happening, along with the stamp file path
|
||||
that can be deleted to force a rebuild anyway.
|
||||
---
|
||||
src/bootstrap/native.rs | 27 ++++++++++++++-------------
|
||||
1 file changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
|
||||
index f02def3e1b05..7bf9ea2688f4 100644
|
||||
--- a/src/bootstrap/native.rs
|
||||
+++ b/src/bootstrap/native.rs
|
||||
@@ -81,26 +81,29 @@ impl Step for Llvm {
|
||||
(info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
|
||||
};
|
||||
|
||||
- if !llvm_info.is_git() {
|
||||
- println!(
|
||||
- "git could not determine the LLVM submodule commit hash. \
|
||||
- Assuming that an LLVM build is necessary.",
|
||||
- );
|
||||
- }
|
||||
-
|
||||
let build_llvm_config = llvm_config_ret_dir
|
||||
.join(exe("llvm-config", &*builder.config.build));
|
||||
let done_stamp = out_dir.join("llvm-finished-building");
|
||||
|
||||
- if let Some(llvm_commit) = llvm_info.sha() {
|
||||
- if done_stamp.exists() {
|
||||
+ if done_stamp.exists() {
|
||||
+ if let Some(llvm_commit) = llvm_info.sha() {
|
||||
let done_contents = t!(fs::read(&done_stamp));
|
||||
|
||||
// If LLVM was already built previously and the submodule's commit didn't change
|
||||
// from the previous build, then no action is required.
|
||||
if done_contents == llvm_commit.as_bytes() {
|
||||
- return build_llvm_config
|
||||
+ return build_llvm_config;
|
||||
}
|
||||
+ } else {
|
||||
+ builder.info(
|
||||
+ "Could not determine the LLVM submodule commit hash. \
|
||||
+ Assuming that an LLVM rebuild is not necessary.",
|
||||
+ );
|
||||
+ builder.info(&format!(
|
||||
+ "To force LLVM to rebuild, remove the file `{}`",
|
||||
+ done_stamp.display()
|
||||
+ ));
|
||||
+ return build_llvm_config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,9 +306,7 @@ impl Step for Llvm {
|
||||
|
||||
cfg.build();
|
||||
|
||||
- if let Some(llvm_commit) = llvm_info.sha() {
|
||||
- t!(fs::write(&done_stamp, llvm_commit));
|
||||
- }
|
||||
+ t!(fs::write(&done_stamp, llvm_info.sha().unwrap_or("")));
|
||||
|
||||
build_llvm_config
|
||||
}
|
@ -1,342 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="amd64 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 WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl 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. < 9.
|
||||
# 3. Specify LLVM_MAX_SLOT, e.g. 8.
|
||||
LLVM_DEPEND="
|
||||
|| (
|
||||
sys-devel/llvm:8[llvm_targets_WebAssembly?]
|
||||
wasm? ( =sys-devel/lld-8* )
|
||||
)
|
||||
<sys-devel/llvm-9:=
|
||||
"
|
||||
LLVM_MAX_SLOT=8
|
||||
|
||||
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]
|
||||
elibc_musl? ( sys-libs/libunwind )
|
||||
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[*]} )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
|
||||
"${FILESDIR}"/1.34.2-fix-custom-libdir.patch
|
||||
"${FILESDIR}"/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
|
||||
"${FILESDIR}"/1.36.0-libressl.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
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
|
||||
|
||||
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 = ""
|
||||
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}]
|
||||
verbose = 2
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "$(get_libdir)/${P}"
|
||||
docdir = "share/doc/${P}"
|
||||
mandir = "share/${P}/man"
|
||||
[rust]
|
||||
optimize = $(toml_usex !debug)
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
default-linker = "$(tc-getCC)"
|
||||
channel = "stable"
|
||||
rpath = false
|
||||
lld = $(usex system-llvm false $(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
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
EOF
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env)\
|
||||
"${EPYTHON}" ./x.py build -vv --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 -vv --config="${S}"/config.toml \
|
||||
--exclude src/tools/miri || die
|
||||
|
||||
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# 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 "${ED}/usr/${abi_libdir}/${P}"
|
||||
cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
||||
"${ED}/usr/${abi_libdir}/${P}" || die
|
||||
done
|
||||
|
||||
dodoc COPYRIGHT
|
||||
|
||||
# FIXME:
|
||||
# Really not sure if that env is needed, specailly LDPATH
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
MANPATH="${EPREFIX}/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
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; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,342 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).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 RISCV Sparc SystemZ WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl 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 more than one slot
|
||||
# simultaneously.
|
||||
|
||||
# How to use it:
|
||||
# 1. List all the working slots (with min versions) in ||, newest first.
|
||||
# 2. Update the := to specify *max* version, e.g. < 9.
|
||||
# 3. Specify LLVM_MAX_SLOT, e.g. 8.
|
||||
LLVM_DEPEND="
|
||||
|| (
|
||||
sys-devel/llvm:9[llvm_targets_WebAssembly?]
|
||||
wasm? ( =sys-devel/lld-9* )
|
||||
)
|
||||
<sys-devel/llvm-10:=
|
||||
"
|
||||
LLVM_MAX_SLOT=9
|
||||
|
||||
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]
|
||||
elibc_musl? ( sys-libs/libunwind )
|
||||
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[*]} )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
QA_FLAGS_IGNORED="usr/bin/* usr/lib*/${P}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.38.0-fix-custom-libdir.patch
|
||||
"${FILESDIR}"/1.38.0-fix-multiple-llvm-rebuilds.patch
|
||||
"${FILESDIR}"/1.36.0-libressl.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pre_build_checks() {
|
||||
CHECKREQS_DISK_BUILD="9G"
|
||||
eshopts_push -s extglob
|
||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
||||
CHECKREQS_DISK_BUILD="14G"
|
||||
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
|
||||
|
||||
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 = ""
|
||||
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}]
|
||||
verbose = 2
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "$(get_libdir)/${P}"
|
||||
docdir = "share/doc/${P}"
|
||||
mandir = "share/${P}/man"
|
||||
[rust]
|
||||
optimize = $(toml_usex !debug)
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
default-linker = "$(tc-getCC)"
|
||||
channel = "stable"
|
||||
rpath = false
|
||||
lld = $(usex system-llvm false $(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
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
EOF
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env)\
|
||||
"${EPYTHON}" ./x.py build -vv --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 -vv --config="${S}"/config.toml \
|
||||
--exclude src/tools/miri || die
|
||||
|
||||
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# 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 "${ED}/usr/${abi_libdir}/${P}"
|
||||
cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
||||
"${ED}/usr/${abi_libdir}/${P}" || die
|
||||
done
|
||||
|
||||
dodoc COPYRIGHT
|
||||
|
||||
# FIXME:
|
||||
# Really not sure if that env is needed, specailly LDPATH
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
MANPATH="${EPREFIX}/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
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; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,347 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~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 RISCV Sparc SystemZ WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl 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 more than one slot
|
||||
# simultaneously.
|
||||
|
||||
# How to use it:
|
||||
# 1. List all the working slots (with min versions) in ||, newest first.
|
||||
# 2. Update the := to specify *max* version, e.g. < 9.
|
||||
# 3. Specify LLVM_MAX_SLOT, e.g. 8.
|
||||
LLVM_DEPEND="
|
||||
|| (
|
||||
sys-devel/llvm:9[llvm_targets_WebAssembly?]
|
||||
wasm? ( =sys-devel/lld-9* )
|
||||
)
|
||||
<sys-devel/llvm-10:=
|
||||
"
|
||||
LLVM_MAX_SLOT=9
|
||||
|
||||
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]
|
||||
elibc_musl? ( sys-libs/libunwind )
|
||||
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[*]} )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
QA_FLAGS_IGNORED="usr/bin/* usr/lib*/${P}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.36.0-libressl.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pre_build_checks() {
|
||||
CHECKREQS_DISK_BUILD="9G"
|
||||
eshopts_push -s extglob
|
||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
||||
CHECKREQS_DISK_BUILD="14G"
|
||||
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
|
||||
|
||||
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 = ""
|
||||
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}]
|
||||
verbose = 2
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "$(get_libdir)/${P}"
|
||||
docdir = "share/doc/${P}"
|
||||
mandir = "share/${P}/man"
|
||||
[rust]
|
||||
optimize = $(toml_usex !debug)
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
default-linker = "$(tc-getCC)"
|
||||
channel = "stable"
|
||||
rpath = false
|
||||
lld = $(usex system-llvm false $(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
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
EOF
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env)\
|
||||
"${EPYTHON}" ./x.py build -vv --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 -vv --config="${S}"/config.toml \
|
||||
--exclude src/tools/miri || die
|
||||
|
||||
# bug #689562, #689160
|
||||
rm "${D}/etc/bash_completion.d/cargo" || die
|
||||
pushd "${D}" > /dev/null || die
|
||||
rmdir -p etc/bash_completion.d || die
|
||||
popd > /dev/null || die
|
||||
dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
|
||||
|
||||
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# 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 "${ED}/usr/${abi_libdir}/${P}"
|
||||
cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
|
||||
"${ED}/usr/${abi_libdir}/${P}" || die
|
||||
done
|
||||
|
||||
dodoc COPYRIGHT
|
||||
|
||||
# FIXME:
|
||||
# Really not sure if that env is needed, specailly LDPATH
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
MANPATH="${EPREFIX}/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
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; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1,358 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).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
|
||||
!system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
|
||||
"
|
||||
|
||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
||||
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
|
||||
# we need to *really* make sure we're not pulling more than one slot
|
||||
# simultaneously.
|
||||
|
||||
# How to use it:
|
||||
# 1. List all the working slots (with min versions) in ||, newest first.
|
||||
# 2. Update the := to specify *max* version, e.g. < 10.
|
||||
# 3. Specify LLVM_MAX_SLOT, e.g. 9.
|
||||
LLVM_DEPEND="
|
||||
|| (
|
||||
sys-devel/llvm:9[llvm_targets_WebAssembly?]
|
||||
wasm? ( =sys-devel/lld-9* )
|
||||
)
|
||||
<sys-devel/llvm-10:=
|
||||
"
|
||||
LLVM_MAX_SLOT=9
|
||||
|
||||
# FIXME:
|
||||
# this should be '>=virtual/rust-1.$(($(ver_cut 2) - 1))', but we can't do it yet
|
||||
# as the first gentoo-built rust that can bootstap new compiler is 1.40.0-r1
|
||||
BOOTSTRAP_DEPEND="|| ( =dev-lang/rust-${PVR} =dev-lang/rust-bin-${PV}* )"
|
||||
|
||||
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]
|
||||
elibc_musl? ( sys-libs/libunwind )
|
||||
system-llvm? (
|
||||
${LLVM_DEPEND}
|
||||
)
|
||||
"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
${PYTHON_DEPS}
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7
|
||||
>=sys-devel/clang-3.5
|
||||
)
|
||||
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
|
||||
!system-llvm? (
|
||||
dev-util/cmake
|
||||
dev-util/ninja
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=app-eselect/eselect-rust-20190311
|
||||
"
|
||||
|
||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
||||
parallel-compiler? ( nightly )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/bin/*-${PV}
|
||||
usr/lib*/lib*.so
|
||||
usr/lib/rustlib/*/codegen-backends/librustc_codegen_llvm-llvm.so
|
||||
usr/lib/rustlib/*/lib/lib*.so
|
||||
"
|
||||
|
||||
QA_SONAME="usr/lib.*/librustc_macros.*.so"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.36.0-libressl.patch
|
||||
"${FILESDIR}"/1.40.0-add-soname.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pre_build_checks() {
|
||||
CHECKREQS_DISK_BUILD="9G"
|
||||
eshopts_push -s extglob
|
||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
||||
CHECKREQS_DISK_BUILD="14G"
|
||||
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() {
|
||||
if ! use system-bootstrap; then
|
||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
||||
|
||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
|
||||
--destdir="${rust_stage0_root}" --prefix=/ || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local rust_target="" rust_targets="" arch_cflags
|
||||
|
||||
# Collect rust target names to compile standard libs for all ABIs.
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
|
||||
done
|
||||
if use wasm; then
|
||||
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
|
||||
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
|
||||
if use system-bootstrap; then
|
||||
rust_stage0_root="$(rustc --print sysroot)"
|
||||
else
|
||||
rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
fi
|
||||
|
||||
rust_target="$(rust_abi)"
|
||||
|
||||
cat <<- EOF > "${S}"/config.toml
|
||||
[llvm]
|
||||
optimize = $(toml_usex !debug)
|
||||
release-debuginfo = $(toml_usex debug)
|
||||
assertions = $(toml_usex debug)
|
||||
targets = "${LLVM_TARGETS// /;}"
|
||||
experimental-targets = ""
|
||||
link-shared = $(toml_usex system-llvm)
|
||||
[build]
|
||||
build = "${rust_target}"
|
||||
host = ["${rust_target}"]
|
||||
target = [${rust_targets}]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
docs = $(toml_usex doc)
|
||||
compiler-docs = $(toml_usex doc)
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = ${extended}
|
||||
tools = [${tools}]
|
||||
verbose = 2
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "lib"
|
||||
docdir = "share/doc/${PF}"
|
||||
mandir = "share/man"
|
||||
[rust]
|
||||
optimize = $(toml_usex !debug)
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
default-linker = "$(tc-getCC)"
|
||||
parallel-compiler = $(toml_usex parallel-compiler)
|
||||
channel = "$(usex nightly nightly stable)"
|
||||
rpath = false
|
||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||
[dist]
|
||||
src-tarball = false
|
||||
EOF
|
||||
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
||||
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
|
||||
|
||||
cat <<- EOF >> "${S}"/config.env
|
||||
CFLAGS_${rust_target}=${arch_cflags}
|
||||
EOF
|
||||
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.${rust_target}]
|
||||
cc = "$(tc-getBUILD_CC)"
|
||||
cxx = "$(tc-getBUILD_CXX)"
|
||||
linker = "$(tc-getCC)"
|
||||
ar = "$(tc-getAR)"
|
||||
EOF
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
EOF
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env)\
|
||||
"${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
|
||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
||||
}
|
||||
|
||||
src_install() {
|
||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \
|
||||
--exclude src/tools/miri || die
|
||||
|
||||
# bug #689562, #689160
|
||||
rm "${D}/etc/bash_completion.d/cargo" || die
|
||||
rmdir "${D}"/etc{/bash_completion.d,} || die
|
||||
dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
|
||||
|
||||
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
|
||||
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# Move public shared libs to abi specific libdir
|
||||
# Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
|
||||
if [[ $(get_libdir) != lib ]]; then
|
||||
dodir /usr/$(get_libdir)
|
||||
mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
|
||||
fi
|
||||
|
||||
dodoc COPYRIGHT
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
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; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
ewarn "${PN} on *-musl targets is configured with crt-static"
|
||||
ewarn ""
|
||||
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
|
||||
ewarn "to use it with portage, otherwise you may see failures like"
|
||||
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
|
||||
ewarn "x86_64-unknown-linux-musl does not support these crate types"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST scala-2.12.4.tgz 19741785 BLAKE2B e782a4ac000ffcebc2faaac077cbb3cc13f8cc56deb9b3a78f1bddd3d0e6fd282d70f10cfef0780e4ab6a13e8d51b0401f84829b7974bd8823aecab54476ab02 SHA512 e6a9e11974d3bacc5f5dcdfdb379bdd1b430b1682141bed688f02f8b49395aff7c55cdb8da3319dff55da7bd7cfe7545e9b26db9558316ac8b3e29f6bb2c6d74
|
||||
DIST scala-2.13.1.tgz 19685743 BLAKE2B aaff6db71023f539d08da521ab1ff505a626605d9c298472d0c2e98a9a13d6b8440e89cf5ff4a53b7b9bcc48cbc1e3b55cc253563f54f18c369e13fc8c00a6c2 SHA512 028aa237c471cada1501cd5764b3c384c3f50e9fc327cddd3fa7c79e9cc909d86bf84d5fc28103054600f879a60c546fc45a837cdca54964eb57ec77f9c1613e
|
||||
|
@ -0,0 +1,76 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
JAVA_PKG_IUSE="doc"
|
||||
|
||||
inherit java-pkg-2
|
||||
|
||||
MY_PN="${PN%-*}"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="The Scala Programming Language"
|
||||
HOMEPAGE="http://scala.epfl.ch/"
|
||||
SRC_URI="http://downloads.lightbend.com/${MY_PN}/${PV}/${MY_P}.tgz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="
|
||||
>=virtual/jre-1.6
|
||||
!dev-lang/scala"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
ebegin 'Cleaning .bat files'
|
||||
rm -f bin/*.bat || die
|
||||
eend $?
|
||||
|
||||
ebegin 'Patching SCALA_HOME variable in bin/ directory'
|
||||
local f
|
||||
for f in bin/*; do
|
||||
sed -i -e 's#\(SCALA_HOME\)=.*#\1=/usr/share/scala-bin#' $f || die
|
||||
done
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
ebegin 'Installing bin scripts'
|
||||
dobin bin/*
|
||||
eend $?
|
||||
|
||||
ebegin 'Installing jar files'
|
||||
cd lib/ || die
|
||||
|
||||
# Unversion those libs.
|
||||
java-pkg_newjar jline-*.jar jline.jar
|
||||
java-pkg_newjar scalap-*.jar scalap.jar
|
||||
|
||||
# Install these the usual way.
|
||||
java-pkg_dojar scala-compiler.jar
|
||||
java-pkg_dojar scala-library.jar
|
||||
java-pkg_dojar scala-reflect.jar
|
||||
|
||||
eend $?
|
||||
|
||||
cd ../ || die
|
||||
|
||||
ebegin 'Installing man pages'
|
||||
doman man/man1/*.1
|
||||
eend $?
|
||||
|
||||
if use doc; then
|
||||
ebegin 'Installing documentation'
|
||||
java-pkg_dohtml -r doc/tools
|
||||
eend $?
|
||||
fi
|
||||
}
|
@ -0,0 +1,216 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{6..8} )
|
||||
|
||||
WANT_AUTOCONF="2.1"
|
||||
|
||||
inherit autotools check-reqs python-any-r1
|
||||
|
||||
MY_PN="mozjs"
|
||||
MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
|
||||
|
||||
MY_MAJOR=$(ver_cut 1)
|
||||
|
||||
MOZ_ESR="1"
|
||||
|
||||
# Convert the ebuild version to the upstream mozilla version
|
||||
MOZ_PV="${MY_PV/_alpha/a}" # Handle alpha for SRC_URI
|
||||
MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
|
||||
MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
|
||||
|
||||
if [[ ${MOZ_ESR} == 1 ]] ; then
|
||||
# ESR releases have slightly different version numbers
|
||||
MOZ_PV="${MOZ_PV}esr"
|
||||
fi
|
||||
|
||||
# Patch version
|
||||
FIREFOX_PATCHSET="firefox-68.0-patches-12"
|
||||
SPIDERMONKEY_PATCHSET="${PN}-68.6.0-patches-01"
|
||||
|
||||
MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/releases"
|
||||
MOZ_SRC_URI="${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
|
||||
|
||||
if [[ "${PV}" == *_rc* ]]; then
|
||||
MOZ_HTTP_URI="https://archive.mozilla.org/pub/firefox/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
|
||||
MOZ_SRC_URI="${MOZ_HTTP_URI}/source/firefox-${MOZ_PV}.source.tar.xz"
|
||||
fi
|
||||
|
||||
PATCH_URIS=(
|
||||
https://dev.gentoo.org/~{anarchy,whissi,polynomial-c,axs}/mozilla/patchsets/${FIREFOX_PATCHSET}.tar.xz
|
||||
https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}.tar.xz
|
||||
)
|
||||
|
||||
SRC_URI="${MOZ_SRC_URI}
|
||||
${PATCH_URIS[@]}"
|
||||
|
||||
DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
|
||||
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
|
||||
|
||||
KEYWORDS=""
|
||||
|
||||
SLOT="68"
|
||||
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
|
||||
IUSE="debug +jit +system-icu test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="dev-lang/python:2.7
|
||||
test? ( ${PYTHON_DEPS} )"
|
||||
|
||||
DEPEND=">=dev-libs/nspr-4.21
|
||||
sys-libs/readline:0=
|
||||
>=sys-libs/zlib-1.2.3
|
||||
system-icu? ( >=dev-libs/icu-63.1:= )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/firefox-${MY_PV}/js/src"
|
||||
|
||||
pkg_pretend() {
|
||||
if use test ; then
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="5G"
|
||||
fi
|
||||
|
||||
check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use test ; then
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="5G"
|
||||
fi
|
||||
|
||||
check-reqs_pkg_setup
|
||||
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cd ../.. || die
|
||||
rm "${WORKDIR}"/firefox/2013_avoid_noinline_on_GCC_with_skcms.patch
|
||||
rm "${WORKDIR}"/firefox/2015_fix_cssparser.patch
|
||||
eapply "${WORKDIR}"/firefox
|
||||
eapply "${WORKDIR}"/spidermonkey-patches
|
||||
|
||||
default
|
||||
|
||||
MOZJS_BUILDDIR="${WORKDIR}/build"
|
||||
mkdir "${MOZJS_BUILDDIR}" || die
|
||||
|
||||
cd "${S}" || die
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX LD AR RANLIB
|
||||
|
||||
# backup current active Python version
|
||||
local PYTHON_OLD=${PYTHON}
|
||||
|
||||
# build system will require Python2.7
|
||||
export PYTHON=python2.7
|
||||
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
|
||||
ECONF_SOURCE="${S}" \
|
||||
econf \
|
||||
--disable-jemalloc \
|
||||
--enable-readline \
|
||||
--with-system-nspr \
|
||||
--with-system-zlib \
|
||||
--disable-optimize \
|
||||
--with-intl-api \
|
||||
$(use_with system-icu) \
|
||||
$(use_enable debug) \
|
||||
$(use_enable jit ion) \
|
||||
$(use_enable test tests) \
|
||||
CONFIG_SHELL="${EPREFIX}/bin/bash" \
|
||||
XARGS="${EPREFIX}/usr/bin/xargs"
|
||||
|
||||
# restore PYTHON
|
||||
export PYTHON=${PYTHON_OLD}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
|
||||
einfo "Smoke-test successful, continuing with full test suite"
|
||||
else
|
||||
die "Smoke-test failed: did interpreter initialization fail?"
|
||||
fi
|
||||
|
||||
local -a KNOWN_TESTFAILURES
|
||||
KNOWN_TESTFAILURES+=( test262/intl402/RelativeTimeFormat/prototype/format/en-us-numeric-auto.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/tz-environment-variable.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Intl/RelativeTimeFormat/format.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/time-zones-imported.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/toString-localized.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/time-zone-path.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/time-zones-historic.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/toString-localized-posix.js )
|
||||
KNOWN_TESTFAILURES+=( non262/Date/reset-time-zone-cache-same-offset.js )
|
||||
|
||||
echo "" > "${T}"/known_failures.list || die
|
||||
|
||||
local KNOWN_TESTFAILURE
|
||||
for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
|
||||
echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
|
||||
done
|
||||
|
||||
PYTHONPATH="${S}/tests/lib" \
|
||||
${PYTHON} \
|
||||
"${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
|
||||
--exclude-file="${T}"/known_failures.list \
|
||||
"${MOZJS_BUILDDIR}"/js/src/js \
|
||||
|| die
|
||||
|
||||
if use jit ; then
|
||||
KNOWN_TESTFAILURES=()
|
||||
|
||||
echo "" > "${T}"/known_failures.list || die
|
||||
|
||||
for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
|
||||
echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
|
||||
done
|
||||
|
||||
PYTHONPATH="${S}/tests/lib" \
|
||||
${PYTHON} \
|
||||
"${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
|
||||
--exclude-file="${T}"/known_failures.list \
|
||||
"${MOZJS_BUILDDIR}"/js/src/js basic \
|
||||
|| die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${MOZJS_BUILDDIR}" || die
|
||||
default
|
||||
|
||||
# fix soname links
|
||||
pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
|
||||
mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
|
||||
ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
|
||||
ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
|
||||
popd &>/dev/null || die
|
||||
|
||||
# remove unneeded files
|
||||
rm \
|
||||
"${ED}"/usr/bin/js${MY_MAJOR}-config \
|
||||
"${ED}"/usr/$(get_libdir)/libjs_static.ajs \
|
||||
|| die
|
||||
|
||||
# fix permissions
|
||||
chmod -x \
|
||||
"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
|
||||
"${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
|
||||
|| die
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST elfutils-0.177.tar.bz2 8852413 BLAKE2B 03f432342651f7646d73b7847325bd14b722ce34d85df01b1ad072b916af9b9da2d0d119cd24e952073bd584ec76b027ba9b6c7d45fb057372b3e700b1f5741a SHA512 2779987463a22ed220759e25a09c9a1eb84c0f36db37675136e59aa55c7f8f90b7a7d34ffc4e6a4291d7fa73692a1bd1a303a74270b11d1623b4f9868d19498f
|
||||
DIST elfutils-0.178.tar.bz2 9007557 BLAKE2B 241b611dbfac37f35a670fbe80096c21b870e4b26fcddc8af26fba0373c9cd72eae42aabae2803b7b16c3bf649aeda036b1ea1b40952b43c4021ed23fcb51e80 SHA512 356656ad0db8f6877b461de1a11280de16a9cc5d8dde4381a938a212e828e32755135e5e3171d311c4c9297b728fbd98123048e2e8fbf7fe7de68976a2daabe5
|
||||
DIST elfutils-0.179.tar.bz2 9057637 BLAKE2B b34f5af6d2a6613622f4d5da78b9ae10e60800fc91cb4607115fcaaf90c1c544460fb02e164f87e52951a446d6479909bbf3aa02b7db78b26af7863290de8848 SHA512 ff2d96ad1db08e3a2ddaa60bd5a05e9b61ffa71d646f889cebb6bef51322e874930809c6dd0a257ced8c6e8de4b59ecf13ca6741dc68f9400293208278a0c052
|
||||
|
@ -0,0 +1,77 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic multilib-minimal
|
||||
|
||||
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
|
||||
HOMEPAGE="http://elfutils.org/"
|
||||
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind"
|
||||
|
||||
RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
|
||||
!dev-libs/libelf"
|
||||
DEPEND="${RDEPEND}
|
||||
valgrind? ( dev-util/valgrind )
|
||||
"
|
||||
BDEPEND="nls? ( sys-devel/gettext )
|
||||
>=sys-devel/flex-2.5.4a
|
||||
sys-devel/m4"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
|
||||
"${FILESDIR}"/${PN}-0.177-disable-large.patch
|
||||
"${FILESDIR}"/${PN}-0.179-PaX-support.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use static-libs; then
|
||||
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
|
||||
fi
|
||||
# https://sourceware.org/PR23914
|
||||
sed -i 's:-Werror::' */Makefile.in || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use test && append-flags -g #407135
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" econf \
|
||||
$(use_enable nls) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_enable valgrind) \
|
||||
--disable-debuginfod \
|
||||
--program-prefix="eu-" \
|
||||
--with-zlib \
|
||||
$(use_with bzip2 bzlib) \
|
||||
$(use_with lzma)
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
|
||||
LC_ALL="C" \
|
||||
emake check VERBOSE=1
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
dodoc NOTES
|
||||
# These build quick, and are needed for most tests, so don't
|
||||
# disable their building when the USE flag is disabled.
|
||||
if ! use utils; then
|
||||
rm -rf "${ED}"/usr/bin || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
Add support for PaX ELF markings
|
||||
|
||||
Patch by Kevin F. Quinn <kevquinn@gentoo.org>
|
||||
|
||||
http://bugs.gentoo.org/115100
|
||||
|
||||
--- a/libelf/elf.h
|
||||
+++ b/libelf/elf.h
|
||||
@@ -721,6 +721,7 @@ typedef struct
|
||||
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
|
||||
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
|
||||
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
|
||||
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
|
||||
#define PT_LOSUNW 0x6ffffffa
|
||||
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
|
||||
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
|
||||
--- a/src/elflint.c
|
||||
+++ b/src/elflint.c
|
||||
@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n"));
|
||||
|
||||
if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
|
||||
&& phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
|
||||
+ && phdr->p_type != PT_PAX_FLAGS
|
||||
&& phdr->p_type != PT_GNU_PROPERTY
|
||||
/* Check for a known machine-specific type. */
|
||||
&& ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
|
@ -1,4 +1 @@
|
||||
DIST nspr-4.20.tar.gz 1140892 BLAKE2B 2cb96b7a40c307f904dac038f016b5c0e527aaf673463cbcb59d8bb6c9d0239219402587d624f48804e33f43abd4427c87f267bf1a88a0dacffcc408ac15dc49 SHA512 22fdf7627f450b0594ebccaee170098e1a8cd0f429fd44816f1322756002ced3d69cf686c3f69f7cb30b8132d3605a9fce5457ab99d0002e6af11a3408a5c949
|
||||
DIST nspr-4.22.tar.gz 1078701 BLAKE2B 8b37031ffebf79320c91ce674d7c3a0cfbef25bfb006cb9aaff44f090110b35ea2768f83dae4a793723f8e2f3aecabc1a4b8042cd1b0ab0aade30781e43f9d62 SHA512 d34271f0692905162f71b02cf6f62a8ebf779159335e4ed286ee8d51faaad633a61c9392bada86d976bca2b5aa47c8760085de30dbd13c9cfa423582c31db37b
|
||||
DIST nspr-4.24.tar.gz 1078825 BLAKE2B 3a773768c31334fa4f3f406d838d430dccfbcf5f7bd34dca422b199265f17fc08ef3d5d1e6df5468efeeeace8b5f8a38ece518e6bdbcdf811c2642d43be80c6c SHA512 b020031ed7a8997099c11e0772779c7b10d15b4f6b14e2b1832732943e8b8224afa952ce04a1914c1553af9d3973a6d9cacf08058ee6fff35102e3b2ec0943c1
|
||||
DIST nspr-4.25.tar.gz 1079633 BLAKE2B 377e5ec0e60cca13f1ee988adb10870bbb6cb9e4eb61e4434152418d4f8d446741a192d7019298ec2669b8e190cacb6a1ca9c4b2838e9b14dd3590ed40facdd2 SHA512 b9aa576e0da37e8729088fe559d94030cf18f277c1f7a30104d3088a804913343ed884645c0adb62144da475e20934b359f897bf3ae9a6ebb5f9daf283d5a562
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- a/pr/src/misc/prtime.c
|
||||
+++ b/pr/src/misc/prtime.c
|
||||
@@ -1536,7 +1536,7 @@
|
||||
case TT_EET: zone_offset = 2 * 60; break;
|
||||
case TT_JST: zone_offset = 9 * 60; break;
|
||||
default:
|
||||
- PR_ASSERT (0);
|
||||
+ return PR_FAILURE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1578,11 +1578,12 @@
|
||||
struct tm localTime;
|
||||
time_t secs;
|
||||
|
||||
- PR_ASSERT(result->tm_month > -1 &&
|
||||
+ if (!(result->tm_month > -1 &&
|
||||
result->tm_mday > 0 &&
|
||||
result->tm_hour > -1 &&
|
||||
result->tm_min > -1 &&
|
||||
- result->tm_sec > -1);
|
||||
+ result->tm_sec > -1))
|
||||
+ return PR_FAILURE;
|
||||
|
||||
/*
|
||||
* To obtain time_t from a tm structure representing the local
|
@ -1,118 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools toolchain-funcs multilib-minimal
|
||||
|
||||
MIN_PV="$(ver_cut 2)"
|
||||
|
||||
DESCRIPTION="Netscape Portable Runtime"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nspr-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.7.0-prtime.patch
|
||||
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
|
||||
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
|
||||
# We do not need to pass -L$libdir via nspr-config --libs
|
||||
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cd "${S}"/nspr || die
|
||||
|
||||
default
|
||||
|
||||
# rename configure.in to configure.ac for new autotools compatibility
|
||||
if [[ -e "${S}"/nspr/configure.in ]] ; then
|
||||
einfo "Renaming configure.in to configure.ac"
|
||||
mv "${S}"/nspr/configure.{in,ac} || die
|
||||
fi
|
||||
|
||||
# We must run eautoconf to regenerate configure
|
||||
eautoconf
|
||||
|
||||
# make sure it won't find Perl out of Prefix
|
||||
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
|
||||
"${S}"/nspr/config/rules.mk || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# We use the standard BUILD_xxx but nspr uses HOST_xxx
|
||||
tc-export_build_env BUILD_CC
|
||||
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
|
||||
tc-export AR CC CXX RANLIB
|
||||
[[ ${CBUILD} != ${CHOST} ]] \
|
||||
&& export CROSS_COMPILE=1 \
|
||||
|| unset CROSS_COMPILE
|
||||
|
||||
local myconf=(
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
$(use_enable debug)
|
||||
$(use_enable !debug optimize)
|
||||
)
|
||||
|
||||
# The configure has some fancy --enable-{{n,x}32,64bit} switches
|
||||
# that trigger some code conditional to platform & arch. This really
|
||||
# matters for the few common arches (x86, ppc) but we pass a little
|
||||
# more of them to be future-proof.
|
||||
|
||||
# use ABI first, this will work for most cases
|
||||
case "${ABI}" in
|
||||
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
|
||||
n32) myconf+=( --enable-n32 );;
|
||||
x32) myconf+=( --enable-x32 );;
|
||||
s390x|*64) myconf+=( --enable-64bit );;
|
||||
default) # no abi actually set, fall back to old check
|
||||
einfo "Running a short build test to determine 64bit'ness"
|
||||
echo > "${T}"/test.c || die
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
|
||||
case $(file "${T}"/test.o) in
|
||||
*32-bit*x86-64*) myconf+=( --enable-x32 );;
|
||||
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# Ancient autoconf needs help finding the right tools.
|
||||
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
|
||||
ac_cv_path_AR="${AR}" \
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Their build system is royally confusing, as usual
|
||||
MINOR_VERSION=${MIN_PV} # Used for .so version
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
einfo "removing static libraries as upstream has requested!"
|
||||
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
|
||||
|
||||
# install nspr-config
|
||||
dobin config/nspr-config
|
||||
|
||||
# Remove stupid files in /usr/bin
|
||||
rm "${ED}"/usr/bin/prerr.properties || die
|
||||
|
||||
# This is used only to generate prerr.c and prerr.h at build time.
|
||||
# No other projects use it, and we don't want to depend on perl.
|
||||
# Talked to upstream and they agreed w/punting.
|
||||
rm "${ED}"/usr/bin/compile-et.pl || die
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools toolchain-funcs multilib-minimal
|
||||
|
||||
MIN_PV="$(ver_cut 2)"
|
||||
|
||||
DESCRIPTION="Netscape Portable Runtime"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug elibc_musl"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nspr-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.7.0-prtime.patch
|
||||
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
|
||||
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
|
||||
# We do not need to pass -L$libdir via nspr-config --libs
|
||||
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cd "${S}"/nspr || die
|
||||
|
||||
default
|
||||
|
||||
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
|
||||
|
||||
# rename configure.in to configure.ac for new autotools compatibility
|
||||
if [[ -e "${S}"/nspr/configure.in ]] ; then
|
||||
einfo "Renaming configure.in to configure.ac"
|
||||
mv "${S}"/nspr/configure.{in,ac} || die
|
||||
fi
|
||||
|
||||
# We must run eautoconf to regenerate configure
|
||||
eautoconf
|
||||
|
||||
# make sure it won't find Perl out of Prefix
|
||||
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
|
||||
"${S}"/nspr/config/rules.mk || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# We use the standard BUILD_xxx but nspr uses HOST_xxx
|
||||
tc-export_build_env BUILD_CC
|
||||
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
|
||||
tc-export AR CC CXX RANLIB
|
||||
[[ ${CBUILD} != ${CHOST} ]] \
|
||||
&& export CROSS_COMPILE=1 \
|
||||
|| unset CROSS_COMPILE
|
||||
|
||||
local myconf=(
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
$(use_enable debug)
|
||||
$(use_enable !debug optimize)
|
||||
)
|
||||
|
||||
# The configure has some fancy --enable-{{n,x}32,64bit} switches
|
||||
# that trigger some code conditional to platform & arch. This really
|
||||
# matters for the few common arches (x86, ppc) but we pass a little
|
||||
# more of them to be future-proof.
|
||||
|
||||
# use ABI first, this will work for most cases
|
||||
case "${ABI}" in
|
||||
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
|
||||
n32) myconf+=( --enable-n32 );;
|
||||
x32) myconf+=( --enable-x32 );;
|
||||
s390x|*64) myconf+=( --enable-64bit );;
|
||||
default) # no abi actually set, fall back to old check
|
||||
einfo "Running a short build test to determine 64bit'ness"
|
||||
echo > "${T}"/test.c || die
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
|
||||
case $(file "${T}"/test.o) in
|
||||
*32-bit*x86-64*) myconf+=( --enable-x32 );;
|
||||
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# Ancient autoconf needs help finding the right tools.
|
||||
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
|
||||
ac_cv_path_AR="${AR}" \
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Their build system is royally confusing, as usual
|
||||
MINOR_VERSION=${MIN_PV} # Used for .so version
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
einfo "removing static libraries as upstream has requested!"
|
||||
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
|
||||
|
||||
# install nspr-config
|
||||
dobin config/nspr-config
|
||||
|
||||
# Remove stupid files in /usr/bin
|
||||
rm "${ED}"/usr/bin/prerr.properties || die
|
||||
|
||||
# This is used only to generate prerr.c and prerr.h at build time.
|
||||
# No other projects use it, and we don't want to depend on perl.
|
||||
# Talked to upstream and they agreed w/punting.
|
||||
rm "${ED}"/usr/bin/compile-et.pl || die
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools toolchain-funcs multilib-minimal
|
||||
|
||||
MIN_PV="$(ver_cut 2)"
|
||||
|
||||
DESCRIPTION="Netscape Portable Runtime"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug elibc_musl"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nspr-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.23-prtime.patch
|
||||
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
|
||||
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
|
||||
# We do not need to pass -L$libdir via nspr-config --libs
|
||||
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cd "${S}"/nspr || die
|
||||
|
||||
default
|
||||
|
||||
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
|
||||
|
||||
# rename configure.in to configure.ac for new autotools compatibility
|
||||
if [[ -e "${S}"/nspr/configure.in ]] ; then
|
||||
einfo "Renaming configure.in to configure.ac"
|
||||
mv "${S}"/nspr/configure.{in,ac} || die
|
||||
else
|
||||
elog "configure.in rename logic can be removed from ebuild."
|
||||
fi
|
||||
|
||||
# We must run eautoconf to regenerate configure
|
||||
eautoconf
|
||||
|
||||
# make sure it won't find Perl out of Prefix
|
||||
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
|
||||
"${S}"/nspr/config/rules.mk || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# We use the standard BUILD_xxx but nspr uses HOST_xxx
|
||||
tc-export_build_env BUILD_CC
|
||||
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
|
||||
tc-export AR CC CXX RANLIB
|
||||
[[ ${CBUILD} != ${CHOST} ]] \
|
||||
&& export CROSS_COMPILE=1 \
|
||||
|| unset CROSS_COMPILE
|
||||
|
||||
local myconf=(
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
$(use_enable debug)
|
||||
$(use_enable !debug optimize)
|
||||
)
|
||||
|
||||
# The configure has some fancy --enable-{{n,x}32,64bit} switches
|
||||
# that trigger some code conditional to platform & arch. This really
|
||||
# matters for the few common arches (x86, ppc) but we pass a little
|
||||
# more of them to be future-proof.
|
||||
|
||||
# use ABI first, this will work for most cases
|
||||
case "${ABI}" in
|
||||
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
|
||||
n32) myconf+=( --enable-n32 );;
|
||||
x32) myconf+=( --enable-x32 );;
|
||||
s390x|*64) myconf+=( --enable-64bit );;
|
||||
default) # no abi actually set, fall back to old check
|
||||
einfo "Running a short build test to determine 64bit'ness"
|
||||
echo > "${T}"/test.c || die
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
|
||||
case $(file "${T}"/test.o) in
|
||||
*32-bit*x86-64*) myconf+=( --enable-x32 );;
|
||||
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# Ancient autoconf needs help finding the right tools.
|
||||
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
|
||||
ac_cv_path_AR="${AR}" \
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Their build system is royally confusing, as usual
|
||||
MINOR_VERSION=${MIN_PV} # Used for .so version
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
einfo "removing static libraries as upstream has requested!"
|
||||
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
|
||||
|
||||
# install nspr-config
|
||||
dobin config/nspr-config
|
||||
|
||||
# Remove stupid files in /usr/bin
|
||||
rm "${ED}"/usr/bin/prerr.properties || die
|
||||
|
||||
# This is used only to generate prerr.c and prerr.h at build time.
|
||||
# No other projects use it, and we don't want to depend on perl.
|
||||
# Talked to upstream and they agreed w/punting.
|
||||
rm "${ED}"/usr/bin/compile-et.pl || die
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
--- a/lib/ckfw/manifest.mn
|
||||
+++ b/lib/ckfw/manifest.mn
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
-DIRS = builtins
|
||||
+DIRS = builtins pem
|
||||
|
||||
PRIVATE_EXPORTS = \
|
||||
ck.h \
|
@ -1,375 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
|
||||
|
||||
NSPR_VER="4.22"
|
||||
RTM_NAME="NSS_${PV//./_}_RTM"
|
||||
# Rev of https://git.fedorahosted.org/cgit/nss-pem.git
|
||||
PEM_GIT_REV="429b0222759d8ad8e6dcd29e62875ae3efd69116"
|
||||
PEM_P="${PN}-pem-20160329"
|
||||
|
||||
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
|
||||
cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )
|
||||
nss-pem? ( https://dev.gentoo.org/~polynomial-c/${PEM_P}.tar.xz )"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="cacert +nss-pem utils"
|
||||
BDEPEND="
|
||||
>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
|
||||
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/${P}/${PN}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nss-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
# Custom changes for gentoo
|
||||
"${FILESDIR}/${PN}-3.47-gentoo-fixups.patch"
|
||||
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
|
||||
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if use nss-pem ; then
|
||||
mv "${PN}"/lib/ckfw/pem/ "${S}"/lib/ckfw/ || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use nss-pem ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}/${PN}-3.47-enable-pem.patch"
|
||||
)
|
||||
fi
|
||||
if use cacert ; then #521462
|
||||
PATCHES+=(
|
||||
"${DISTDIR}/${PN}-cacert-class1-class3.patch"
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
pushd coreconf >/dev/null || die
|
||||
# hack nspr paths
|
||||
echo 'INCLUDES += -I$(DIST)/include/dbm' \
|
||||
>> headers.mk || die "failed to append include"
|
||||
|
||||
# modify install path
|
||||
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
|
||||
-i source.mk || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
|
||||
popd >/dev/null || die
|
||||
|
||||
# Fix pkgconfig file for Prefix
|
||||
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
|
||||
config/Makefile || die
|
||||
|
||||
# use host shlibsign if need be #436216
|
||||
if tc-is-cross-compiler ; then
|
||||
sed -i \
|
||||
-e 's:"${2}"/shlibsign:shlibsign:' \
|
||||
cmd/shlibsign/sign.sh || die
|
||||
fi
|
||||
|
||||
# dirty hack
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
|
||||
lib/ssl/config.mk || die
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
|
||||
cmd/platlibs.mk || die
|
||||
|
||||
multilib_copy_sources
|
||||
|
||||
strip-flags
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# Ensure we stay multilib aware
|
||||
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
|
||||
}
|
||||
|
||||
nssarch() {
|
||||
# Most of the arches are the same as $ARCH
|
||||
local t=${1:-${CHOST}}
|
||||
case ${t} in
|
||||
aarch64*)echo "aarch64";;
|
||||
hppa*) echo "parisc";;
|
||||
i?86*) echo "i686";;
|
||||
x86_64*) echo "x86_64";;
|
||||
*) tc-arch ${t};;
|
||||
esac
|
||||
}
|
||||
|
||||
nssbits() {
|
||||
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
|
||||
if [[ ${1} == BUILD_ ]]; then
|
||||
cc=$(tc-getBUILD_CC)
|
||||
else
|
||||
cc=$(tc-getCC)
|
||||
fi
|
||||
echo > "${T}"/test.c || die
|
||||
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
|
||||
case $(file "${T}/${1}test.o") in
|
||||
*32-bit*x86-64*) echo USE_X32=1;;
|
||||
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# use ABI to determine bit'ness, or fallback if unset
|
||||
local buildbits mybits
|
||||
case "${ABI}" in
|
||||
n32) mybits="USE_N32=1";;
|
||||
x32) mybits="USE_X32=1";;
|
||||
s390x|*64) mybits="USE_64=1";;
|
||||
${DEFAULT_ABI})
|
||||
einfo "Running compilation test to determine bit'ness"
|
||||
mybits=$(nssbits)
|
||||
;;
|
||||
esac
|
||||
# bitness of host may differ from target
|
||||
if tc-is-cross-compiler; then
|
||||
buildbits=$(nssbits BUILD_)
|
||||
fi
|
||||
|
||||
local makeargs=(
|
||||
CC="$(tc-getCC)"
|
||||
CCC="$(tc-getCXX)"
|
||||
AR="$(tc-getAR) rc \$@"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
OPTIMIZER=
|
||||
${mybits}
|
||||
)
|
||||
|
||||
# Take care of nspr settings #436216
|
||||
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
|
||||
unset NSPR_INCLUDE_DIR
|
||||
|
||||
# Do not let `uname` be used.
|
||||
if use kernel_linux ; then
|
||||
makeargs+=(
|
||||
OS_TARGET=Linux
|
||||
OS_RELEASE=2.6
|
||||
OS_TEST="$(nssarch)"
|
||||
)
|
||||
fi
|
||||
|
||||
export NSS_ALLOW_SSLKEYLOGFILE=1
|
||||
export NSS_ENABLE_WERROR=0 #567158
|
||||
export BUILD_OPT=1
|
||||
export NSS_USE_SYSTEM_SQLITE=1
|
||||
export NSDISTMODE=copy
|
||||
export NSS_ENABLE_ECC=1
|
||||
export FREEBL_NO_DEPEND=1
|
||||
export FREEBL_LOWHASH=1
|
||||
export NSS_SEED_ONLY_DEV_URANDOM=1
|
||||
export ASFLAGS=""
|
||||
|
||||
local d
|
||||
|
||||
# Build the host tools first.
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
XCFLAGS="${BUILD_CFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 -C coreconf \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
${buildbits:-${mybits}}
|
||||
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
|
||||
|
||||
# Then build the target tools.
|
||||
for d in . lib/dbm ; do
|
||||
CPPFLAGS="${myCPPFLAGS}" \
|
||||
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 "${makeargs[@]}" -C ${d}
|
||||
done
|
||||
}
|
||||
|
||||
# Altering these 3 libraries breaks the CHK verification.
|
||||
# All of the following cause it to break:
|
||||
# - stripping
|
||||
# - prelink
|
||||
# - ELF signing
|
||||
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
|
||||
# Either we have to NOT strip them, or we have to forcibly resign after
|
||||
# stripping.
|
||||
#local_libdir="$(get_libdir)"
|
||||
#export STRIP_MASK="
|
||||
# */${local_libdir}/libfreebl3.so*
|
||||
# */${local_libdir}/libnssdbm3.so*
|
||||
# */${local_libdir}/libsoftokn3.so*"
|
||||
|
||||
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
|
||||
|
||||
generate_chk() {
|
||||
local shlibsign="$1"
|
||||
local libdir="$2"
|
||||
einfo "Resigning core NSS libraries for FIPS validation"
|
||||
shift 2
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libname=lib${i}.so
|
||||
local chkname=lib${i}.chk
|
||||
"${shlibsign}" \
|
||||
-i "${libdir}"/${libname} \
|
||||
-o "${libdir}"/${chkname}.tmp \
|
||||
&& mv -f \
|
||||
"${libdir}"/${chkname}.tmp \
|
||||
"${libdir}"/${chkname} \
|
||||
|| die "Failed to sign ${libname}"
|
||||
done
|
||||
}
|
||||
|
||||
cleanup_chk() {
|
||||
local libdir="$1"
|
||||
shift 1
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libfname="${libdir}/lib${i}.so"
|
||||
# If the major version has changed, then we have old chk files.
|
||||
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
|
||||
&& rm -f "${libfname}.chk"
|
||||
done
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
pushd dist >/dev/null || die
|
||||
|
||||
dodir /usr/$(get_libdir)
|
||||
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
|
||||
local i
|
||||
for i in crmf freebl nssb nssckfw ; do
|
||||
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
|
||||
done
|
||||
|
||||
# Install nss-config and pkgconfig file
|
||||
dodir /usr/bin
|
||||
cp -L */bin/nss-config "${ED}"/usr/bin || die
|
||||
dodir /usr/$(get_libdir)/pkgconfig
|
||||
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
|
||||
|
||||
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
|
||||
# bug 517266
|
||||
sed -e 's#Libs:#Libs: -lfreebl#' \
|
||||
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
|
||||
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|
||||
|| die "could not create nss-softokn.pc"
|
||||
|
||||
# all the include files
|
||||
insinto /usr/include/nss
|
||||
doins public/nss/*.{h,api}
|
||||
insinto /usr/include/nss/private
|
||||
doins private/nss/{blapi,alghmac}.h
|
||||
|
||||
popd >/dev/null || die
|
||||
|
||||
local f nssutils
|
||||
# Always enabled because we need it for chk generation.
|
||||
nssutils=( shlibsign )
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
if use utils; then
|
||||
# The tests we do not need to install.
|
||||
#nssutils_test="bltest crmftest dbtest dertimetest
|
||||
#fipstest remtest sdrtest"
|
||||
# checkcert utils has been removed in nss-3.22:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
|
||||
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
|
||||
# certcgi has been removed in nss-3.36:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
|
||||
nssutils+=(
|
||||
addbuiltin
|
||||
atob
|
||||
baddbdir
|
||||
btoa
|
||||
certutil
|
||||
cmsutil
|
||||
conflict
|
||||
crlutil
|
||||
derdump
|
||||
digest
|
||||
makepqg
|
||||
mangle
|
||||
modutil
|
||||
multinit
|
||||
nonspr10
|
||||
ocspclnt
|
||||
oidcalc
|
||||
p7content
|
||||
p7env
|
||||
p7sign
|
||||
p7verify
|
||||
pk11mode
|
||||
pk12util
|
||||
pp
|
||||
rsaperf
|
||||
selfserv
|
||||
signtool
|
||||
signver
|
||||
ssltap
|
||||
strsclnt
|
||||
symkeyutil
|
||||
tstclnt
|
||||
vfychain
|
||||
vfyserv
|
||||
)
|
||||
# install man-pages for utils (bug #516810)
|
||||
doman doc/nroff/*.1
|
||||
fi
|
||||
pushd dist/*/bin >/dev/null || die
|
||||
for f in ${nssutils[@]}; do
|
||||
dobin ${f}
|
||||
done
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
# Prelink breaks the CHK files. We don't have any reliable way to run
|
||||
# shlibsign after prelink.
|
||||
dodir /etc/prelink.conf.d
|
||||
printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
|
||||
> "${ED}"/etc/prelink.conf.d/nss.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
multilib_pkg_postinst() {
|
||||
# We must re-sign the libraries AFTER they are stripped.
|
||||
local shlibsign="${EROOT}/usr/bin/shlibsign"
|
||||
# See if we can execute it (cross-compiling & such). #436216
|
||||
"${shlibsign}" -h >&/dev/null
|
||||
if [[ $? -gt 1 ]] ; then
|
||||
shlibsign="shlibsign"
|
||||
fi
|
||||
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
multilib_pkg_postrm() {
|
||||
cleanup_chk "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postrm
|
||||
}
|
@ -1,375 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
|
||||
|
||||
NSPR_VER="4.24"
|
||||
RTM_NAME="NSS_${PV//./_}_RTM"
|
||||
# Rev of https://git.fedorahosted.org/cgit/nss-pem.git
|
||||
PEM_GIT_REV="429b0222759d8ad8e6dcd29e62875ae3efd69116"
|
||||
PEM_P="${PN}-pem-20160329"
|
||||
|
||||
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
|
||||
cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )
|
||||
nss-pem? ( https://dev.gentoo.org/~polynomial-c/${PEM_P}.tar.xz )"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="cacert +nss-pem utils"
|
||||
BDEPEND="
|
||||
>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
|
||||
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/${P}/${PN}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nss-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
# Custom changes for gentoo
|
||||
"${FILESDIR}/${PN}-3.47-gentoo-fixups.patch"
|
||||
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
|
||||
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if use nss-pem ; then
|
||||
mv "${PN}"/lib/ckfw/pem/ "${S}"/lib/ckfw/ || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use nss-pem ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}/${PN}-3.47-enable-pem.patch"
|
||||
)
|
||||
fi
|
||||
if use cacert ; then #521462
|
||||
PATCHES+=(
|
||||
"${DISTDIR}/${PN}-cacert-class1-class3.patch"
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
pushd coreconf >/dev/null || die
|
||||
# hack nspr paths
|
||||
echo 'INCLUDES += -I$(DIST)/include/dbm' \
|
||||
>> headers.mk || die "failed to append include"
|
||||
|
||||
# modify install path
|
||||
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
|
||||
-i source.mk || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
|
||||
popd >/dev/null || die
|
||||
|
||||
# Fix pkgconfig file for Prefix
|
||||
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
|
||||
config/Makefile || die
|
||||
|
||||
# use host shlibsign if need be #436216
|
||||
if tc-is-cross-compiler ; then
|
||||
sed -i \
|
||||
-e 's:"${2}"/shlibsign:shlibsign:' \
|
||||
cmd/shlibsign/sign.sh || die
|
||||
fi
|
||||
|
||||
# dirty hack
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
|
||||
lib/ssl/config.mk || die
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
|
||||
cmd/platlibs.mk || die
|
||||
|
||||
multilib_copy_sources
|
||||
|
||||
strip-flags
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# Ensure we stay multilib aware
|
||||
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
|
||||
}
|
||||
|
||||
nssarch() {
|
||||
# Most of the arches are the same as $ARCH
|
||||
local t=${1:-${CHOST}}
|
||||
case ${t} in
|
||||
aarch64*)echo "aarch64";;
|
||||
hppa*) echo "parisc";;
|
||||
i?86*) echo "i686";;
|
||||
x86_64*) echo "x86_64";;
|
||||
*) tc-arch ${t};;
|
||||
esac
|
||||
}
|
||||
|
||||
nssbits() {
|
||||
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
|
||||
if [[ ${1} == BUILD_ ]]; then
|
||||
cc=$(tc-getBUILD_CC)
|
||||
else
|
||||
cc=$(tc-getCC)
|
||||
fi
|
||||
echo > "${T}"/test.c || die
|
||||
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
|
||||
case $(file "${T}/${1}test.o") in
|
||||
*32-bit*x86-64*) echo USE_X32=1;;
|
||||
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# use ABI to determine bit'ness, or fallback if unset
|
||||
local buildbits mybits
|
||||
case "${ABI}" in
|
||||
n32) mybits="USE_N32=1";;
|
||||
x32) mybits="USE_X32=1";;
|
||||
s390x|*64) mybits="USE_64=1";;
|
||||
${DEFAULT_ABI})
|
||||
einfo "Running compilation test to determine bit'ness"
|
||||
mybits=$(nssbits)
|
||||
;;
|
||||
esac
|
||||
# bitness of host may differ from target
|
||||
if tc-is-cross-compiler; then
|
||||
buildbits=$(nssbits BUILD_)
|
||||
fi
|
||||
|
||||
local makeargs=(
|
||||
CC="$(tc-getCC)"
|
||||
CCC="$(tc-getCXX)"
|
||||
AR="$(tc-getAR) rc \$@"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
OPTIMIZER=
|
||||
${mybits}
|
||||
)
|
||||
|
||||
# Take care of nspr settings #436216
|
||||
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
|
||||
unset NSPR_INCLUDE_DIR
|
||||
|
||||
# Do not let `uname` be used.
|
||||
if use kernel_linux ; then
|
||||
makeargs+=(
|
||||
OS_TARGET=Linux
|
||||
OS_RELEASE=2.6
|
||||
OS_TEST="$(nssarch)"
|
||||
)
|
||||
fi
|
||||
|
||||
export NSS_ALLOW_SSLKEYLOGFILE=1
|
||||
export NSS_ENABLE_WERROR=0 #567158
|
||||
export BUILD_OPT=1
|
||||
export NSS_USE_SYSTEM_SQLITE=1
|
||||
export NSDISTMODE=copy
|
||||
export NSS_ENABLE_ECC=1
|
||||
export FREEBL_NO_DEPEND=1
|
||||
export FREEBL_LOWHASH=1
|
||||
export NSS_SEED_ONLY_DEV_URANDOM=1
|
||||
export ASFLAGS=""
|
||||
|
||||
local d
|
||||
|
||||
# Build the host tools first.
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
XCFLAGS="${BUILD_CFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 -C coreconf \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
${buildbits:-${mybits}}
|
||||
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
|
||||
|
||||
# Then build the target tools.
|
||||
for d in . lib/dbm ; do
|
||||
CPPFLAGS="${myCPPFLAGS}" \
|
||||
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 "${makeargs[@]}" -C ${d}
|
||||
done
|
||||
}
|
||||
|
||||
# Altering these 3 libraries breaks the CHK verification.
|
||||
# All of the following cause it to break:
|
||||
# - stripping
|
||||
# - prelink
|
||||
# - ELF signing
|
||||
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
|
||||
# Either we have to NOT strip them, or we have to forcibly resign after
|
||||
# stripping.
|
||||
#local_libdir="$(get_libdir)"
|
||||
#export STRIP_MASK="
|
||||
# */${local_libdir}/libfreebl3.so*
|
||||
# */${local_libdir}/libnssdbm3.so*
|
||||
# */${local_libdir}/libsoftokn3.so*"
|
||||
|
||||
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
|
||||
|
||||
generate_chk() {
|
||||
local shlibsign="$1"
|
||||
local libdir="$2"
|
||||
einfo "Resigning core NSS libraries for FIPS validation"
|
||||
shift 2
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libname=lib${i}.so
|
||||
local chkname=lib${i}.chk
|
||||
"${shlibsign}" \
|
||||
-i "${libdir}"/${libname} \
|
||||
-o "${libdir}"/${chkname}.tmp \
|
||||
&& mv -f \
|
||||
"${libdir}"/${chkname}.tmp \
|
||||
"${libdir}"/${chkname} \
|
||||
|| die "Failed to sign ${libname}"
|
||||
done
|
||||
}
|
||||
|
||||
cleanup_chk() {
|
||||
local libdir="$1"
|
||||
shift 1
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libfname="${libdir}/lib${i}.so"
|
||||
# If the major version has changed, then we have old chk files.
|
||||
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
|
||||
&& rm -f "${libfname}.chk"
|
||||
done
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
pushd dist >/dev/null || die
|
||||
|
||||
dodir /usr/$(get_libdir)
|
||||
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
|
||||
local i
|
||||
for i in crmf freebl nssb nssckfw ; do
|
||||
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
|
||||
done
|
||||
|
||||
# Install nss-config and pkgconfig file
|
||||
dodir /usr/bin
|
||||
cp -L */bin/nss-config "${ED}"/usr/bin || die
|
||||
dodir /usr/$(get_libdir)/pkgconfig
|
||||
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
|
||||
|
||||
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
|
||||
# bug 517266
|
||||
sed -e 's#Libs:#Libs: -lfreebl#' \
|
||||
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
|
||||
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|
||||
|| die "could not create nss-softokn.pc"
|
||||
|
||||
# all the include files
|
||||
insinto /usr/include/nss
|
||||
doins public/nss/*.{h,api}
|
||||
insinto /usr/include/nss/private
|
||||
doins private/nss/{blapi,alghmac}.h
|
||||
|
||||
popd >/dev/null || die
|
||||
|
||||
local f nssutils
|
||||
# Always enabled because we need it for chk generation.
|
||||
nssutils=( shlibsign )
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
if use utils; then
|
||||
# The tests we do not need to install.
|
||||
#nssutils_test="bltest crmftest dbtest dertimetest
|
||||
#fipstest remtest sdrtest"
|
||||
# checkcert utils has been removed in nss-3.22:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
|
||||
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
|
||||
# certcgi has been removed in nss-3.36:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
|
||||
nssutils+=(
|
||||
addbuiltin
|
||||
atob
|
||||
baddbdir
|
||||
btoa
|
||||
certutil
|
||||
cmsutil
|
||||
conflict
|
||||
crlutil
|
||||
derdump
|
||||
digest
|
||||
makepqg
|
||||
mangle
|
||||
modutil
|
||||
multinit
|
||||
nonspr10
|
||||
ocspclnt
|
||||
oidcalc
|
||||
p7content
|
||||
p7env
|
||||
p7sign
|
||||
p7verify
|
||||
pk11mode
|
||||
pk12util
|
||||
pp
|
||||
rsaperf
|
||||
selfserv
|
||||
signtool
|
||||
signver
|
||||
ssltap
|
||||
strsclnt
|
||||
symkeyutil
|
||||
tstclnt
|
||||
vfychain
|
||||
vfyserv
|
||||
)
|
||||
# install man-pages for utils (bug #516810)
|
||||
doman doc/nroff/*.1
|
||||
fi
|
||||
pushd dist/*/bin >/dev/null || die
|
||||
for f in ${nssutils[@]}; do
|
||||
dobin ${f}
|
||||
done
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
# Prelink breaks the CHK files. We don't have any reliable way to run
|
||||
# shlibsign after prelink.
|
||||
dodir /etc/prelink.conf.d
|
||||
printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
|
||||
> "${ED}"/etc/prelink.conf.d/nss.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
multilib_pkg_postinst() {
|
||||
# We must re-sign the libraries AFTER they are stripped.
|
||||
local shlibsign="${EROOT}/usr/bin/shlibsign"
|
||||
# See if we can execute it (cross-compiling & such). #436216
|
||||
"${shlibsign}" -h >&/dev/null
|
||||
if [[ $? -gt 1 ]] ; then
|
||||
shlibsign="shlibsign"
|
||||
fi
|
||||
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
multilib_pkg_postrm() {
|
||||
cleanup_chk "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postrm
|
||||
}
|
@ -1,375 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
|
||||
|
||||
NSPR_VER="4.24"
|
||||
RTM_NAME="NSS_${PV//./_}_RTM"
|
||||
# Rev of https://git.fedorahosted.org/cgit/nss-pem.git
|
||||
PEM_GIT_REV="429b0222759d8ad8e6dcd29e62875ae3efd69116"
|
||||
PEM_P="${PN}-pem-20160329"
|
||||
|
||||
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
|
||||
cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )
|
||||
nss-pem? ( https://dev.gentoo.org/~polynomial-c/${PEM_P}.tar.xz )"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="cacert +nss-pem utils"
|
||||
BDEPEND="
|
||||
>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
|
||||
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/${P}/${PN}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nss-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
# Custom changes for gentoo
|
||||
"${FILESDIR}/${PN}-3.47-gentoo-fixups.patch"
|
||||
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
|
||||
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if use nss-pem ; then
|
||||
mv "${PN}"/lib/ckfw/pem/ "${S}"/lib/ckfw/ || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use nss-pem ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}/${PN}-3.47-enable-pem.patch"
|
||||
)
|
||||
fi
|
||||
if use cacert ; then #521462
|
||||
PATCHES+=(
|
||||
"${DISTDIR}/${PN}-cacert-class1-class3.patch"
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
pushd coreconf >/dev/null || die
|
||||
# hack nspr paths
|
||||
echo 'INCLUDES += -I$(DIST)/include/dbm' \
|
||||
>> headers.mk || die "failed to append include"
|
||||
|
||||
# modify install path
|
||||
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
|
||||
-i source.mk || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
|
||||
popd >/dev/null || die
|
||||
|
||||
# Fix pkgconfig file for Prefix
|
||||
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
|
||||
config/Makefile || die
|
||||
|
||||
# use host shlibsign if need be #436216
|
||||
if tc-is-cross-compiler ; then
|
||||
sed -i \
|
||||
-e 's:"${2}"/shlibsign:shlibsign:' \
|
||||
cmd/shlibsign/sign.sh || die
|
||||
fi
|
||||
|
||||
# dirty hack
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
|
||||
lib/ssl/config.mk || die
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
|
||||
cmd/platlibs.mk || die
|
||||
|
||||
multilib_copy_sources
|
||||
|
||||
strip-flags
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# Ensure we stay multilib aware
|
||||
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
|
||||
}
|
||||
|
||||
nssarch() {
|
||||
# Most of the arches are the same as $ARCH
|
||||
local t=${1:-${CHOST}}
|
||||
case ${t} in
|
||||
aarch64*)echo "aarch64";;
|
||||
hppa*) echo "parisc";;
|
||||
i?86*) echo "i686";;
|
||||
x86_64*) echo "x86_64";;
|
||||
*) tc-arch ${t};;
|
||||
esac
|
||||
}
|
||||
|
||||
nssbits() {
|
||||
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
|
||||
if [[ ${1} == BUILD_ ]]; then
|
||||
cc=$(tc-getBUILD_CC)
|
||||
else
|
||||
cc=$(tc-getCC)
|
||||
fi
|
||||
echo > "${T}"/test.c || die
|
||||
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
|
||||
case $(file "${T}/${1}test.o") in
|
||||
*32-bit*x86-64*) echo USE_X32=1;;
|
||||
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# use ABI to determine bit'ness, or fallback if unset
|
||||
local buildbits mybits
|
||||
case "${ABI}" in
|
||||
n32) mybits="USE_N32=1";;
|
||||
x32) mybits="USE_X32=1";;
|
||||
s390x|*64) mybits="USE_64=1";;
|
||||
${DEFAULT_ABI})
|
||||
einfo "Running compilation test to determine bit'ness"
|
||||
mybits=$(nssbits)
|
||||
;;
|
||||
esac
|
||||
# bitness of host may differ from target
|
||||
if tc-is-cross-compiler; then
|
||||
buildbits=$(nssbits BUILD_)
|
||||
fi
|
||||
|
||||
local makeargs=(
|
||||
CC="$(tc-getCC)"
|
||||
CCC="$(tc-getCXX)"
|
||||
AR="$(tc-getAR) rc \$@"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
OPTIMIZER=
|
||||
${mybits}
|
||||
)
|
||||
|
||||
# Take care of nspr settings #436216
|
||||
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
|
||||
unset NSPR_INCLUDE_DIR
|
||||
|
||||
# Do not let `uname` be used.
|
||||
if use kernel_linux ; then
|
||||
makeargs+=(
|
||||
OS_TARGET=Linux
|
||||
OS_RELEASE=2.6
|
||||
OS_TEST="$(nssarch)"
|
||||
)
|
||||
fi
|
||||
|
||||
export NSS_ALLOW_SSLKEYLOGFILE=1
|
||||
export NSS_ENABLE_WERROR=0 #567158
|
||||
export BUILD_OPT=1
|
||||
export NSS_USE_SYSTEM_SQLITE=1
|
||||
export NSDISTMODE=copy
|
||||
export NSS_ENABLE_ECC=1
|
||||
export FREEBL_NO_DEPEND=1
|
||||
export FREEBL_LOWHASH=1
|
||||
export NSS_SEED_ONLY_DEV_URANDOM=1
|
||||
export ASFLAGS=""
|
||||
|
||||
local d
|
||||
|
||||
# Build the host tools first.
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
XCFLAGS="${BUILD_CFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 -C coreconf \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
${buildbits:-${mybits}}
|
||||
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
|
||||
|
||||
# Then build the target tools.
|
||||
for d in . lib/dbm ; do
|
||||
CPPFLAGS="${myCPPFLAGS}" \
|
||||
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 "${makeargs[@]}" -C ${d}
|
||||
done
|
||||
}
|
||||
|
||||
# Altering these 3 libraries breaks the CHK verification.
|
||||
# All of the following cause it to break:
|
||||
# - stripping
|
||||
# - prelink
|
||||
# - ELF signing
|
||||
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
|
||||
# Either we have to NOT strip them, or we have to forcibly resign after
|
||||
# stripping.
|
||||
#local_libdir="$(get_libdir)"
|
||||
#export STRIP_MASK="
|
||||
# */${local_libdir}/libfreebl3.so*
|
||||
# */${local_libdir}/libnssdbm3.so*
|
||||
# */${local_libdir}/libsoftokn3.so*"
|
||||
|
||||
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
|
||||
|
||||
generate_chk() {
|
||||
local shlibsign="$1"
|
||||
local libdir="$2"
|
||||
einfo "Resigning core NSS libraries for FIPS validation"
|
||||
shift 2
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libname=lib${i}.so
|
||||
local chkname=lib${i}.chk
|
||||
"${shlibsign}" \
|
||||
-i "${libdir}"/${libname} \
|
||||
-o "${libdir}"/${chkname}.tmp \
|
||||
&& mv -f \
|
||||
"${libdir}"/${chkname}.tmp \
|
||||
"${libdir}"/${chkname} \
|
||||
|| die "Failed to sign ${libname}"
|
||||
done
|
||||
}
|
||||
|
||||
cleanup_chk() {
|
||||
local libdir="$1"
|
||||
shift 1
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libfname="${libdir}/lib${i}.so"
|
||||
# If the major version has changed, then we have old chk files.
|
||||
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
|
||||
&& rm -f "${libfname}.chk"
|
||||
done
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
pushd dist >/dev/null || die
|
||||
|
||||
dodir /usr/$(get_libdir)
|
||||
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
|
||||
local i
|
||||
for i in crmf freebl nssb nssckfw ; do
|
||||
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
|
||||
done
|
||||
|
||||
# Install nss-config and pkgconfig file
|
||||
dodir /usr/bin
|
||||
cp -L */bin/nss-config "${ED}"/usr/bin || die
|
||||
dodir /usr/$(get_libdir)/pkgconfig
|
||||
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
|
||||
|
||||
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
|
||||
# bug 517266
|
||||
sed -e 's#Libs:#Libs: -lfreebl#' \
|
||||
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
|
||||
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|
||||
|| die "could not create nss-softokn.pc"
|
||||
|
||||
# all the include files
|
||||
insinto /usr/include/nss
|
||||
doins public/nss/*.{h,api}
|
||||
insinto /usr/include/nss/private
|
||||
doins private/nss/{blapi,alghmac}.h
|
||||
|
||||
popd >/dev/null || die
|
||||
|
||||
local f nssutils
|
||||
# Always enabled because we need it for chk generation.
|
||||
nssutils=( shlibsign )
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
if use utils; then
|
||||
# The tests we do not need to install.
|
||||
#nssutils_test="bltest crmftest dbtest dertimetest
|
||||
#fipstest remtest sdrtest"
|
||||
# checkcert utils has been removed in nss-3.22:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
|
||||
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
|
||||
# certcgi has been removed in nss-3.36:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
|
||||
nssutils+=(
|
||||
addbuiltin
|
||||
atob
|
||||
baddbdir
|
||||
btoa
|
||||
certutil
|
||||
cmsutil
|
||||
conflict
|
||||
crlutil
|
||||
derdump
|
||||
digest
|
||||
makepqg
|
||||
mangle
|
||||
modutil
|
||||
multinit
|
||||
nonspr10
|
||||
ocspclnt
|
||||
oidcalc
|
||||
p7content
|
||||
p7env
|
||||
p7sign
|
||||
p7verify
|
||||
pk11mode
|
||||
pk12util
|
||||
pp
|
||||
rsaperf
|
||||
selfserv
|
||||
signtool
|
||||
signver
|
||||
ssltap
|
||||
strsclnt
|
||||
symkeyutil
|
||||
tstclnt
|
||||
vfychain
|
||||
vfyserv
|
||||
)
|
||||
# install man-pages for utils (bug #516810)
|
||||
doman doc/nroff/*.1
|
||||
fi
|
||||
pushd dist/*/bin >/dev/null || die
|
||||
for f in ${nssutils[@]}; do
|
||||
dobin ${f}
|
||||
done
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
# Prelink breaks the CHK files. We don't have any reliable way to run
|
||||
# shlibsign after prelink.
|
||||
dodir /etc/prelink.conf.d
|
||||
printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
|
||||
> "${ED}"/etc/prelink.conf.d/nss.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
multilib_pkg_postinst() {
|
||||
# We must re-sign the libraries AFTER they are stripped.
|
||||
local shlibsign="${EROOT}/usr/bin/shlibsign"
|
||||
# See if we can execute it (cross-compiling & such). #436216
|
||||
"${shlibsign}" -h >&/dev/null
|
||||
if [[ $? -gt 1 ]] ; then
|
||||
shlibsign="shlibsign"
|
||||
fi
|
||||
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
multilib_pkg_postrm() {
|
||||
cleanup_chk "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postrm
|
||||
}
|
@ -1,359 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
|
||||
|
||||
NSPR_VER="4.25"
|
||||
RTM_NAME="NSS_${PV//./_}_RTM"
|
||||
|
||||
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
|
||||
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
|
||||
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
|
||||
cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="cacert utils"
|
||||
BDEPEND="
|
||||
>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
|
||||
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/${P}/${PN}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/nss-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
# Custom changes for gentoo
|
||||
"${FILESDIR}/${PN}-3.47-gentoo-fixups.patch"
|
||||
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
|
||||
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use cacert ; then #521462
|
||||
PATCHES+=(
|
||||
"${DISTDIR}/${PN}-cacert-class1-class3.patch"
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
pushd coreconf >/dev/null || die
|
||||
# hack nspr paths
|
||||
echo 'INCLUDES += -I$(DIST)/include/dbm' \
|
||||
>> headers.mk || die "failed to append include"
|
||||
|
||||
# modify install path
|
||||
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
|
||||
-i source.mk || die
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
|
||||
popd >/dev/null || die
|
||||
|
||||
# Fix pkgconfig file for Prefix
|
||||
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
|
||||
config/Makefile || die
|
||||
|
||||
# use host shlibsign if need be #436216
|
||||
if tc-is-cross-compiler ; then
|
||||
sed -i \
|
||||
-e 's:"${2}"/shlibsign:shlibsign:' \
|
||||
cmd/shlibsign/sign.sh || die
|
||||
fi
|
||||
|
||||
# dirty hack
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
|
||||
lib/ssl/config.mk || die
|
||||
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
|
||||
cmd/platlibs.mk || die
|
||||
|
||||
multilib_copy_sources
|
||||
|
||||
strip-flags
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# Ensure we stay multilib aware
|
||||
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
|
||||
}
|
||||
|
||||
nssarch() {
|
||||
# Most of the arches are the same as $ARCH
|
||||
local t=${1:-${CHOST}}
|
||||
case ${t} in
|
||||
aarch64*)echo "aarch64";;
|
||||
hppa*) echo "parisc";;
|
||||
i?86*) echo "i686";;
|
||||
x86_64*) echo "x86_64";;
|
||||
*) tc-arch ${t};;
|
||||
esac
|
||||
}
|
||||
|
||||
nssbits() {
|
||||
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
|
||||
if [[ ${1} == BUILD_ ]]; then
|
||||
cc=$(tc-getBUILD_CC)
|
||||
else
|
||||
cc=$(tc-getCC)
|
||||
fi
|
||||
echo > "${T}"/test.c || die
|
||||
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
|
||||
case $(file "${T}/${1}test.o") in
|
||||
*32-bit*x86-64*) echo USE_X32=1;;
|
||||
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
|
||||
*32-bit*|*ppc*|*i386*) ;;
|
||||
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
|
||||
esac
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# use ABI to determine bit'ness, or fallback if unset
|
||||
local buildbits mybits
|
||||
case "${ABI}" in
|
||||
n32) mybits="USE_N32=1";;
|
||||
x32) mybits="USE_X32=1";;
|
||||
s390x|*64) mybits="USE_64=1";;
|
||||
${DEFAULT_ABI})
|
||||
einfo "Running compilation test to determine bit'ness"
|
||||
mybits=$(nssbits)
|
||||
;;
|
||||
esac
|
||||
# bitness of host may differ from target
|
||||
if tc-is-cross-compiler; then
|
||||
buildbits=$(nssbits BUILD_)
|
||||
fi
|
||||
|
||||
local makeargs=(
|
||||
CC="$(tc-getCC)"
|
||||
CCC="$(tc-getCXX)"
|
||||
AR="$(tc-getAR) rc \$@"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
OPTIMIZER=
|
||||
${mybits}
|
||||
)
|
||||
|
||||
# Take care of nspr settings #436216
|
||||
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
|
||||
unset NSPR_INCLUDE_DIR
|
||||
|
||||
# Do not let `uname` be used.
|
||||
if use kernel_linux ; then
|
||||
makeargs+=(
|
||||
OS_TARGET=Linux
|
||||
OS_RELEASE=2.6
|
||||
OS_TEST="$(nssarch)"
|
||||
)
|
||||
fi
|
||||
|
||||
export NSS_ALLOW_SSLKEYLOGFILE=1
|
||||
export NSS_ENABLE_WERROR=0 #567158
|
||||
export BUILD_OPT=1
|
||||
export NSS_USE_SYSTEM_SQLITE=1
|
||||
export NSDISTMODE=copy
|
||||
export NSS_ENABLE_ECC=1
|
||||
export FREEBL_NO_DEPEND=1
|
||||
export FREEBL_LOWHASH=1
|
||||
export NSS_SEED_ONLY_DEV_URANDOM=1
|
||||
export ASFLAGS=""
|
||||
|
||||
local d
|
||||
|
||||
# Build the host tools first.
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
XCFLAGS="${BUILD_CFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 -C coreconf \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
${buildbits:-${mybits}}
|
||||
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
|
||||
|
||||
# Then build the target tools.
|
||||
for d in . lib/dbm ; do
|
||||
CPPFLAGS="${myCPPFLAGS}" \
|
||||
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||||
NSPR_LIB_DIR="${T}/fakedir" \
|
||||
emake -j1 "${makeargs[@]}" -C ${d}
|
||||
done
|
||||
}
|
||||
|
||||
# Altering these 3 libraries breaks the CHK verification.
|
||||
# All of the following cause it to break:
|
||||
# - stripping
|
||||
# - prelink
|
||||
# - ELF signing
|
||||
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
|
||||
# Either we have to NOT strip them, or we have to forcibly resign after
|
||||
# stripping.
|
||||
#local_libdir="$(get_libdir)"
|
||||
#export STRIP_MASK="
|
||||
# */${local_libdir}/libfreebl3.so*
|
||||
# */${local_libdir}/libnssdbm3.so*
|
||||
# */${local_libdir}/libsoftokn3.so*"
|
||||
|
||||
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
|
||||
|
||||
generate_chk() {
|
||||
local shlibsign="$1"
|
||||
local libdir="$2"
|
||||
einfo "Resigning core NSS libraries for FIPS validation"
|
||||
shift 2
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libname=lib${i}.so
|
||||
local chkname=lib${i}.chk
|
||||
"${shlibsign}" \
|
||||
-i "${libdir}"/${libname} \
|
||||
-o "${libdir}"/${chkname}.tmp \
|
||||
&& mv -f \
|
||||
"${libdir}"/${chkname}.tmp \
|
||||
"${libdir}"/${chkname} \
|
||||
|| die "Failed to sign ${libname}"
|
||||
done
|
||||
}
|
||||
|
||||
cleanup_chk() {
|
||||
local libdir="$1"
|
||||
shift 1
|
||||
local i
|
||||
for i in ${NSS_CHK_SIGN_LIBS} ; do
|
||||
local libfname="${libdir}/lib${i}.so"
|
||||
# If the major version has changed, then we have old chk files.
|
||||
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
|
||||
&& rm -f "${libfname}.chk"
|
||||
done
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
pushd dist >/dev/null || die
|
||||
|
||||
dodir /usr/$(get_libdir)
|
||||
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
|
||||
local i
|
||||
for i in crmf freebl nssb nssckfw ; do
|
||||
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
|
||||
done
|
||||
|
||||
# Install nss-config and pkgconfig file
|
||||
dodir /usr/bin
|
||||
cp -L */bin/nss-config "${ED}"/usr/bin || die
|
||||
dodir /usr/$(get_libdir)/pkgconfig
|
||||
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
|
||||
|
||||
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
|
||||
# bug 517266
|
||||
sed -e 's#Libs:#Libs: -lfreebl#' \
|
||||
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
|
||||
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|
||||
|| die "could not create nss-softokn.pc"
|
||||
|
||||
# all the include files
|
||||
insinto /usr/include/nss
|
||||
doins public/nss/*.{h,api}
|
||||
insinto /usr/include/nss/private
|
||||
doins private/nss/{blapi,alghmac,cmac}.h
|
||||
|
||||
popd >/dev/null || die
|
||||
|
||||
local f nssutils
|
||||
# Always enabled because we need it for chk generation.
|
||||
nssutils=( shlibsign )
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
if use utils; then
|
||||
# The tests we do not need to install.
|
||||
#nssutils_test="bltest crmftest dbtest dertimetest
|
||||
#fipstest remtest sdrtest"
|
||||
# checkcert utils has been removed in nss-3.22:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
|
||||
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
|
||||
# certcgi has been removed in nss-3.36:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
|
||||
nssutils+=(
|
||||
addbuiltin
|
||||
atob
|
||||
baddbdir
|
||||
btoa
|
||||
certutil
|
||||
cmsutil
|
||||
conflict
|
||||
crlutil
|
||||
derdump
|
||||
digest
|
||||
makepqg
|
||||
mangle
|
||||
modutil
|
||||
multinit
|
||||
nonspr10
|
||||
ocspclnt
|
||||
oidcalc
|
||||
p7content
|
||||
p7env
|
||||
p7sign
|
||||
p7verify
|
||||
pk11mode
|
||||
pk12util
|
||||
pp
|
||||
rsaperf
|
||||
selfserv
|
||||
signtool
|
||||
signver
|
||||
ssltap
|
||||
strsclnt
|
||||
symkeyutil
|
||||
tstclnt
|
||||
vfychain
|
||||
vfyserv
|
||||
)
|
||||
# install man-pages for utils (bug #516810)
|
||||
doman doc/nroff/*.1
|
||||
fi
|
||||
pushd dist/*/bin >/dev/null || die
|
||||
for f in ${nssutils[@]}; do
|
||||
dobin ${f}
|
||||
done
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
# Prelink breaks the CHK files. We don't have any reliable way to run
|
||||
# shlibsign after prelink.
|
||||
dodir /etc/prelink.conf.d
|
||||
printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
|
||||
> "${ED}"/etc/prelink.conf.d/nss.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
multilib_pkg_postinst() {
|
||||
# We must re-sign the libraries AFTER they are stripped.
|
||||
local shlibsign="${EROOT}/usr/bin/shlibsign"
|
||||
# See if we can execute it (cross-compiling & such). #436216
|
||||
"${shlibsign}" -h >&/dev/null
|
||||
if [[ $? -gt 1 ]] ; then
|
||||
shlibsign="shlibsign"
|
||||
fi
|
||||
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
multilib_pkg_postrm() {
|
||||
cleanup_chk "${EROOT}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
multilib_foreach_abi multilib_pkg_postrm
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST roct-thunk-interface-3.0.0.tar.gz 2685769 BLAKE2B d8ecf26113357a2a400bc1f2d4b40e38f2bd1bd5ac2c77c189490df9bcc7864f8357c262ad62d6cbf0f62f41edd9e09f5b75ce1e66f3a589d143a3883942a12d SHA512 18756a626d57255cfdd03b38dbc56769e4e28dbe1b00cc1e3d99a39dcd943bafebedc1774c76a191cdaf83b2bce4ac464dc97cbd088894447afddcca50447e9f
|
||||
DIST roct-thunk-interface-3.1.0.tar.gz 2688973 BLAKE2B b372e12ba5795a0f1e85f7c904059fbe71e147051f287939aacb165c6ca3068e59694c891e3ebdec945e494df4134ca6e4595e7b00893479387d2326b9af5b13 SHA512 dd63d097a42c8751846a1c5649a9c35c0d5e5dc68b1e8080cb6e333f787851ebc649c36d952aefbefbf9558c914d55c612800e85620b24676d7d2d7454bb3490
|
||||
DIST roct-thunk-interface-3.3.0.tar.gz 2689906 BLAKE2B 0eee8be65b0be8136dc0091cbc5534b89d630b9ffc1af1d6bdbf98671e141f524b3789153da673ed27dc3810d73e6ea8afb2fed776aa8df83e3c613b3776f81c SHA512 6ee02e5a9ef04ff9f873f762a78dcab93e45a98793545a882839fc2c890ea13030038130b1de266422eea58681e9fffa119e54b8d2f980c3a09c92b692d5cf3e
|
||||
|
@ -0,0 +1,42 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake linux-info
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/ROCT-Thunk-Interface-roc-${PV}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Thunk Interface"
|
||||
HOMEPAGE="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
|
||||
CONFIG_CHECK="~HSA_AMD ~HMM_MIRROR ~ZONE_DEVICE ~DRM_AMDGPU ~DRM_AMDGPU_USERPTR"
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
|
||||
RDEPEND="sys-process/numactl
|
||||
sys-apps/pciutils"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
src_compile() {
|
||||
cmake_src_compile build-dev
|
||||
}
|
||||
src_install() {
|
||||
cmake_src_install install-dev
|
||||
}
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue