diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-05-25 15:22:17 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-05-25 15:22:17 +0100 |
commit | 22910f5d14da606bd7f06e19a2f61c5d1a8fc94b (patch) | |
tree | 808b5701901fb54b53ec3ecf6f33272e933f3ea6 /dev-lang | |
parent | 91c0ec2d7067f6ab1ef578bd9967b32ca07eb502 (diff) |
gentoo resync : 25.05.2018
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 18844 -> 18866 bytes | |||
-rw-r--r-- | dev-lang/julia/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/julia/julia-0.6.2.ebuild | 6 | ||||
-rw-r--r-- | dev-lang/julia/julia-9999.ebuild | 8 | ||||
-rw-r--r-- | dev-lang/micropython/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch | 22 | ||||
-rw-r--r-- | dev-lang/micropython/micropython-1.9.4.ebuild | 54 | ||||
-rw-r--r-- | dev-lang/orc/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/orc/orc-0.4.28-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/rust/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.26.0-r2.ebuild | 220 |
11 files changed, 313 insertions, 9 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 171ca5906377..746f807cd732 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest index e59009cbc349..51990780f68e 100644 --- a/dev-lang/julia/Manifest +++ b/dev-lang/julia/Manifest @@ -2,6 +2,6 @@ AUX julia-0.6.0-fix_build_system.patch 3221 BLAKE2B a12ff55fd99444dfbdee5e1e0ead AUX julia-9999-fix_build_system.patch 2562 BLAKE2B 6300c91745656c47beff2f201376cb5ade9bc504fd416fe0c50867b4e3dffb5edd9295aebd1b8d43b1c1ecbeaa7382864c61604191f3df2b7162556ffd2499c4 SHA512 cdf084881f70890f523690eaae3e059ed09688156851dbf0c19878e8d6b76aee8a7144a9d604087c61c5db30634db530dfeba943ad170003439c8696715f677d DIST julia-0.6.2-bundled.tar.gz 3508868 BLAKE2B b5b3f52d8036e5603b62606cd096f22f8a975f9cab2f9baad902c0208a81868359005e82a17e513a7705ec717750702cdc12ab476ffac3c1c38158f06d80ae99 SHA512 3a9a6cc43aab2eae6c57812287958e3a1ac1718d6fdf08e5ce7c8e8e8a62231fb4d7b6f064e2d6941ac750d8924f5cb37ae3ac4e2d18f366a82c94bdc9e6abe4 DIST julia-0.6.2.tar.gz 5592907 BLAKE2B d6d25f43cd650f6a079c4ba6fe533e6bdbf6a1123255d7651460e297ed3d35a832688e19efddf41c780fbda2eb861bc8ed5f7c59ea7efb5fdf490eb2e7a47f5d SHA512 679050463ed5825d34c477bd44cd91cfecc7d1735a2f52cc70b509afd9883cb60902861643266ecac5ba6cbb03f8fcdd12fc2e87dc41b9ed0eef813fa40610f1 -EBUILD julia-0.6.2.ebuild 5011 BLAKE2B 188b13404d5640ed201f3bd1b4906dbc223312fa1e027c1d8d8d3c0196311c8eebe0190c5083534a78f257f0fa5f7fa6d68ed7165d4699e441805e7ade37b354 SHA512 7741f561b551654993ec10b3353e39efc20e214f6c7eaca3844c0e74afddde66746fb898022b63cacff39529f0bcddb72ae77455f89c53a5ab28f6c8fc05bb8a -EBUILD julia-9999.ebuild 3971 BLAKE2B f0308fce5dce9ff8a875a68d25a4b6bebd12d74cd834b2fcbd9f4fc525a0b2b23bf4b75789d1b03e7ba62a303ea6c7d8f44dbcfd9f6536305444426c616dddfe SHA512 7c2d033552ad94456fd90fc3eb2e825b4b03da90b24e9034f29b2bbe02fbe1eb5f1ef3ef8145831649211a7b193997f5c4ac5155a81745b55736cdbd3b87cc95 +EBUILD julia-0.6.2.ebuild 5039 BLAKE2B ccc6ede277e571ca67ca945c8b98da5171dfe0c195ca9d834b04b9c636d32f61912740614fa6d439f8a3e7e5675a13b97c7dc9538db3e473d6bba030522c0afa SHA512 cf91d5f8b249cce1e5ff7e7af8e6bb187785a5ea5c53aa35f0dc4dedd10b0cd31ca88a34cdf432a14e5f3a61beac4c86288fe0168434511082575b389c626506 +EBUILD julia-9999.ebuild 3999 BLAKE2B 2a043ca0fa70101b807f625cc3a77bff45bf3e04467047cc48e84099750c6cf4bb2add100d3da4845c945c5f93fafe8efe18200aed180b4bf84e49180c538276 SHA512 0ba4882a6abd0413e250901eac9476c7e97c9079635151df3957079e120f7c19a9cfba4a44a8e16d63e2e0b0b7faad933260e278b3824b3e694503f508b338f6 MISC metadata.xml 1177 BLAKE2B ef735dbeb4067f98e71bbd22c16f43eab7c5507fb99815eba4a61370593bdf2d778ff6c18301b73869117e56014c93b61a42d5467539ee2ceac9307595cb0eb2 SHA512 1ed4c6477da40c7a79ee1f9efe1a33eb0ea61ee150a5a50b0c0e0241b0177541d7953d4043d159036f68d116aa41fa9413caa01b36c688fcdfb874e6627f234d diff --git a/dev-lang/julia/julia-0.6.2.ebuild b/dev-lang/julia/julia-0.6.2.ebuild index 397cd144fe2d..d1600435e50c 100644 --- a/dev-lang/julia/julia-0.6.2.ebuild +++ b/dev-lang/julia/julia-0.6.2.ebuild @@ -153,7 +153,8 @@ src_compile() { emake cleanall emake VERBOSE=1 julia-release \ - prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + prefix="${EPREFIX}/usr" DESTDIR="${D}" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}') emake } @@ -172,7 +173,8 @@ src_install() { git commit -a --allow-empty -m "initial" || die "git failed" emake install \ - prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + prefix="${EPREFIX}/usr" DESTDIR="${D}" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" cat > 99julia <<-EOF LDPATH=${EROOT%/}/usr/$(get_libdir)/julia EOF diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild index 86d5657b25d8..8e0c10fd4268 100644 --- a/dev-lang/julia/julia-9999.ebuild +++ b/dev-lang/julia/julia-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -138,7 +138,8 @@ src_compile() { emake cleanall emake VERBOSE=1 julia-release \ - prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + prefix="${EPREFIX}/usr" DESTDIR="${D}" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}') emake } @@ -149,7 +150,8 @@ src_test() { src_install() { emake install \ - prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + prefix="${EPREFIX}/usr" DESTDIR="${D}" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" cat > 99julia <<-EOF LDPATH=${EROOT%/}/usr/$(get_libdir)/julia EOF diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest index 1deee78b872d..24b92f1aab2a 100644 --- a/dev-lang/micropython/Manifest +++ b/dev-lang/micropython/Manifest @@ -1,4 +1,7 @@ AUX micropython-1.9.3-prevent-stripping.patch 787 BLAKE2B c050420f5dae60edb93c63b504fdbe047a8c9ed56c543ffde817c86a6fd9a53efeb8561c69823186121a5727fbf29b8474eac223398fa7ee43c825e50745c6fd SHA512 5e7fa7481f4bfab15a041bbccf452d5d6fe5a5c1cd8cfae2e5ec3475d84decacc0b9c0631766582173fc4cda82d78e2370e402f95d5989e13bf3adbdaf39add4 +AUX micropython-1.9.4-prevent-stripping.patch 787 BLAKE2B 6e92c4fdfd44b89d1fad69c056dbab1493d9dc45c4223cfd2f011254db72400c6ac9a62afe84f54c301a86abd92deb56866dc25e2f1bf8af74edf308b15eb29f SHA512 8f994394f42d7fed5fa35b62c01c37ebea3b487c029d659134a263ef8d65e1ec17bec755fdf57cde2f234969bc4f7f4ab30858562d7f8cdb2bc6cb819ba2ae0d DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8 +DIST micropython-1.9.4.tar.gz 18957648 BLAKE2B bc4dc4ef6623adbda64c9e03137860a7b9ce7d2d181434cb993438752ec39a4ea7cf7cf7a14736c57bdc2ea9c3f856b0dbe2d92fc0e1cbef99112427583ad665 SHA512 9995c983c93fb1280e60d7c52a10930a6a3de8d589a0f4264a9a4a4fede7c37e27ed4871c4c9092aec3fb33028064beb8c5eb19b7956e8f0c5d3b2a82ffa9932 EBUILD micropython-1.9.3.ebuild 1158 BLAKE2B 1d452bdf85783135f6bb2c4e0d2f6cd297d863d00eef8003dcc9f5710e0b03194828df751a205b1c6069506c509685189a66083b27324c3f1ca9c64a06297596 SHA512 1eef495d618817b0023c13b4bd7606ddec09f4ad32e6beffe3bc418549781b53d92340af90a39e3995f8decc9454b9221b2b048ec713e01fec7c1fc058ca8744 +EBUILD micropython-1.9.4.ebuild 1161 BLAKE2B 9bc660c6e4e93cf30ec20a9ca1758a13024ec2c16cfcf442f406912e59a3bf3009dfda29dbc0947d0dc966538fd802d551728019abd9212fa851153224a56713 SHA512 d22375deb3c95e317b8a8cde81f0366b1d83a90ffddd3f52b253b78313e96cc93b5e8e07c4efb4f997ac3f204cfbbca159d698136c4cbfe0151433246335e9d6 MISC metadata.xml 1347 BLAKE2B c121e2eafde4ab3c49a352ab96ffbcc042ecddb5a765f3192589a41f5b3bc5f92e6a6f1a58df21ef2812424aac94e6cd579cfe1d29b4dd16983048768f1694ed SHA512 e8dd8f7cc3d0c570da6b9982596e39891e78e302581dbc0601d622831f976f16b9e9f78d7e0b55ae58ed3c81c3e7113a4217ca1671cdd8929f0b34b4647efc3a diff --git a/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch new file mode 100644 index 000000000000..a130b72b6131 --- /dev/null +++ b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch @@ -0,0 +1,22 @@ +--- a/py/mkenv.mk 2017-11-25 09:52:30.921836372 +0000 ++++ a/py/mkenv.mk 2017-11-25 09:52:35.257861233 +0000 +@@ -50,7 +50,6 @@ + LD = $(CROSS_COMPILE)ld + OBJCOPY = $(CROSS_COMPILE)objcopy + SIZE = $(CROSS_COMPILE)size +-STRIP = $(CROSS_COMPILE)strip + AR = $(CROSS_COMPILE)ar + ifeq ($(MICROPY_FORCE_32BIT),1) + CC += -m32 +--- a/py/mkrules.mk 2017-11-25 09:53:13.107078063 +0000 ++++ a/py/mkrules.mk 2017-11-25 09:53:31.898185592 +0000 +@@ -129,9 +129,6 @@ + # Do not pass COPT here - it's *C* compiler optimizations. For example, + # we may want to compile using Thumb, but link with non-Thumb libc. + $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS) +-ifndef DEBUG +- $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG) +-endif + $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG) + + clean: clean-prog diff --git a/dev-lang/micropython/micropython-1.9.4.ebuild b/dev-lang/micropython/micropython-1.9.4.ebuild new file mode 100644 index 000000000000..95899e4fd9b4 --- /dev/null +++ b/dev-lang/micropython/micropython-1.9.4.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Python implementation for microcontrollers" +HOMEPAGE="https://github.com/micropython/micropython" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" + +KEYWORDS="~amd64 ~x86" +LICENSE="MIT" +SLOT="0" +IUSE="test" + +DEPEND=" + virtual/libffi + virtual/pkgconfig" + +PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" ) + +src_compile() { + cd ports/unix || die + + # 1) don't die on compiler warnings + # 2) remove /usr/local prefix references in favour of /usr + sed -i \ + -e 's#-Werror##g;' \ + -e 's#\/usr\/local#\/usr#g;' \ + Makefile || die + emake CC="$(tc-getCC)" axtls + emake CC="$(tc-getCC)" +} + +src_test() { + # TODO: find out why these tests fail + rm -v tests/stress/recursive_iternext* || die + + cd ports/unix || die + emake test +} + +src_install() { + pushd ports/unix > /dev/null || die + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install + popd > /dev/null || die + + # remove .git files + find tools -type f -name '.git*' -exec rm {} \; || die + + dodoc -r tools + einstalldocs +} diff --git a/dev-lang/orc/Manifest b/dev-lang/orc/Manifest index f3b6d56f2183..0c2142cc1698 100644 --- a/dev-lang/orc/Manifest +++ b/dev-lang/orc/Manifest @@ -1,5 +1,5 @@ DIST orc-0.4.27.tar.xz 465116 BLAKE2B 1289867c84371797350847e1ae71a002ec250abc56611fe6ec8d263ff64e17ed8d990f45adfbf6d1a0c7e98c2e6ec30c3135e433f00e9fa53cecce359f5b2d72 SHA512 5ca0b4553e370ea7c95acfc8248d9d568dafc9577041d47f52c7d0945456c534e18e0e80d28df9301d6deac1ea4f8ea6a51ca373b32927c8724846d8ec1f73e8 DIST orc-0.4.28.tar.xz 469460 BLAKE2B 86fa2d10a33fbffbb2b96827adbddaa81d0baa8135fe21fba338cbcd25a1c1e853873ec1c4ef5c0a32d66ba95f855f1f16ddbc32f68a89e5a98c75b9b0261aa7 SHA512 2ae3100e7d0c03eba9a8a10a8924da4d729e1967b63e5dfdf88c4aee907d7ece82c782d74f4cb7e28a366dd74ce5e1ddc6e2b971e5a2f879b0501cc313b93410 EBUILD orc-0.4.27.ebuild 1832 BLAKE2B e0e0f1df95102719f9f079efdb27760192acb8b3b27232a27984cef94bf03587d16424234d368583200f9e6e4183f7068cd322b55d3d9d559d57d87c5b00d438 SHA512 3a66189a789f995069dc8869fb33846306f4a0e5ff3419bae1e921c26b1187615e17ca6c6f4647eed8e4fc0ab4f5e03a6df0a3dfe762a9090aa409912cfe4497 -EBUILD orc-0.4.28-r1.ebuild 2194 BLAKE2B f092b45b64594e9d896680c9a78368855ef395f0383d7042488eabd0a0418fd426b7379c2ff462245cf1d805ae44a0250de0144de0c50764c1f73c26fcdb7bd1 SHA512 5a809385529fc2ae03fe8a242f71785fc7eb84e1861af2432697f1707c33bf470a86bd4dd28bd613f0d17e1d19776b4f2c9856adf9d2579c1c1236e85b53c60c +EBUILD orc-0.4.28-r1.ebuild 2193 BLAKE2B bac3f7d982f8b488c4668963bcd98cf5d079792c7814e28681072f909da2ebcf553243b206bacff7d777c859d787f5eeaeb8017fbe206066dc3352845f73c705 SHA512 5c975b44e2e2933eb5945336dffbc8ec06f9f0ef65ef89af61ea188bc7029273f8b5ab70b3c2559ea9712c1b5bfcc4878bda2853a5c9f72cdd5a3e1c5681fd03 MISC metadata.xml 354 BLAKE2B b24bce431d7ad10e9231e89b522e67de16192ee4e48281b8a17f002692632449ab676cb9df6ff5a22563d6f9657ee6be11e452bac41f8a537c598822efab85d1 SHA512 4f17c4c3faa3f2c5feaefe4727b3500360f7cc5486c794e9a34608c3e437b4e2cc266bc9e0e2b3824952a8da62421fda59e9bc5140ee88898f8f7bdde402762f diff --git a/dev-lang/orc/orc-0.4.28-r1.ebuild b/dev-lang/orc/orc-0.4.28-r1.ebuild index 7bc99c46d181..f3c0d8f6779d 100644 --- a/dev-lang/orc/orc-0.4.28-r1.ebuild +++ b/dev-lang/orc/orc-0.4.28-r1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz" LICENSE="BSD BSD-2" SLOT="0" -KEYWORDS="amd64 arm ~arm64 ~hppa ~ppc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="amd64 arm ~arm64 ~hppa ppc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="examples pax_kernel static-libs" RDEPEND="" diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 775d2eb350d9..006b5eec5f7b 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -7,5 +7,6 @@ DIST rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz 111059260 BLAKE2B ae982976a735c DIST rustc-1.25.0-src.tar.gz 98639156 BLAKE2B 1408d5dd0611d4830de3b6b3d00e3fad4198a47599b639d0ac0bd05aaba401f743056a942e9df04a4d192c6b12e8cfe9a9cdf8cd26e48b72104ce9b423df049e SHA512 7d8886f4d5a621eb794e814deb60be681fa38cf086f87ffa14e5a3500c640b237c549a632de1331a0f1b71963de41f6d31a4df3866b7e597424002316fed81ce DIST rustc-1.26.0-src.tar.xz 54613664 BLAKE2B 798985e4060c28828066118f39fc296e52b3796ae02f3917912680154047eb6f91806b3d45f3a0e9afcef55d95cea3079debae12d2ddf2d9c46f992e12519094 SHA512 563b910ecf4b2a0d798a1201177f733333e64efad49e5aceec5adc66a8c6903df391c9afc0fdd8284348c08082e0c4de1e5cb68efe6797594de43ca93e4ad7a2 EBUILD rust-1.25.0.ebuild 4601 BLAKE2B fd0f6cfd9c480b1a6ce19cc02a66233a5acbca045d66955fe4263b66456145f5602de2878b739d99fb42d09c92ec99e7311402cea863e415fe2bdcd6ee0d88e3 SHA512 8928dbf17abbdd5b484dccc6d2fee12e1f653b0e37d2b4a2750cee0c64dea749102baa2ef13c46aa46a40d88fcea364730ad35f1ca72a017f00e60943f9470e4 +EBUILD rust-1.26.0-r2.ebuild 6130 BLAKE2B e2819e23de7ef609f8671faa5fd631e4330d87822d870c172dad8728695610cc2388852c08c4a143e4cf3137040d03183698e09ef00613d601f909aeee8dcce3 SHA512 3b7273d6d3e91812ebf8fb3233ee45dac139cd0d1a22979ffd939092af63bc1b16a7b1d99e3aad0827361830e4faeacb46670306e1b9794e2952bf675c1b7201 EBUILD rust-1.26.0.ebuild 4927 BLAKE2B 7e78c4897053f80fb47c91ab83aaac3fcb772ab75796112aa035781663a962d052ff7486c4baafb2b809e6b22ed10f18ec495aa063a76065d3f45d69b603b80c SHA512 62197eb7b7e0be13f547b49b15491a71689c9076d8805fc53771e9b57e7aac3fbc0197ba6a087958e6be788c57885fa4b5cdc22767f57f318235c91ac40a4c3e MISC metadata.xml 482 BLAKE2B c75f5749d7c3b17c9ea4c811809448dbaea4723e74da9e0a9ba4e492c3275875c95ae4d209a0129c24f3e692c00c77e36f16b23e2b3d6ea22c05f50b0de7d054 SHA512 5e9ea6d3db22676701c132298ea8b03453a53aa3b79f564f2cc021735b60329f1201c871541dde362315e938543e89afc6f0c3629218744ddca75d95deeb4a88 diff --git a/dev-lang/rust/rust-1.26.0-r2.ebuild b/dev-lang/rust/rust-1.26.0-r2.ebuild new file mode 100644 index 000000000000..4a0bbfdb7ec6 --- /dev/null +++ b/dev-lang/rust/rust-1.26.0-r2.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{5,6} pypy ) + +inherit multiprocessing multilib-build python-any-r1 versionator 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" + KEYWORDS="" +else + ABI_VER="$(get_version_component_range 1-2)" + SLOT="stable/${ABI_VER}" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="~amd64 ~arm64 ~x86" +fi + +CHOST_amd64=x86_64-unknown-linux-gnu +CHOST_x86=i686-unknown-linux-gnu +CHOST_arm64=aarch64-unknown-linux-gnu + +RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0" +RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}" +RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}" +RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}" + +CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="http://www.rust-lang.org/" + +SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz + amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz ) + x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz ) + arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz ) +" + +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC Sparc SystemZ X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="debug doc extended +jemalloc ${ALL_LLVM_TARGETS[*]}" + +RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 + jemalloc? ( dev-libs/jemalloc )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + || ( + >=sys-devel/gcc-4.7 + >=sys-devel/clang-3.5 + ) + dev-util/cmake +" +PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )" + +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" + +S="${WORKDIR}/${MY_P}-src" + +toml_usex() { + usex "$1" true false +} + +src_prepare() { + local rust_stage0_root="${WORKDIR}"/rust-stage0 + + local rust_stage0_name="RUST_STAGE0_${ARCH}" + local rust_stage0="${!rust_stage0_name}" + + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die + + default +} + +src_configure() { + local rust_target="" rust_targets="" rust_target_name arch_cflags + + # Collect rust target names to compile standard libs for all ABIs. + for v in $(multilib_get_enabled_abi_pairs); do + rust_target_name="CHOST_${v##*.}" + rust_targets="${rust_targets},\"${!rust_target_name}\"" + done + rust_targets="${rust_targets#,}" + + local rust_stage0_root="${WORKDIR}"/rust-stage0 + + rust_target_name="CHOST_${ARCH}" + rust_target="${!rust_target_name}" + + cat <<- EOF > "${S}"/config.toml + [llvm] + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + [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 + verbose = 2 + extended = $(toml_usex extended) + [install] + prefix = "${EPREFIX}/usr" + libdir = "$(get_libdir)" + docdir = "share/doc/${P}" + mandir = "share/${P}/man" + [rust] + optimize = $(toml_usex !debug) + debuginfo = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + use-jemalloc = $(toml_usex jemalloc) + default-linker = "$(tc-getCC)" + rpath = false + EOF + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(get_abi_CHOST ${v##*.}) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + cat <<- EOF >> "${S}"/config.env + CFLAGS_${rust_target}=${arch_cflags} + EOF + + cat <<- EOF >> "${S}"/config.toml + [target.${rust_target}] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + EOF + done +} + +src_compile() { + env $(cat "${S}"/config.env)\ + ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die +} + +src_install() { + local rust_target abi_libdir + + env DESTDIR="${D}" ./x.py install || die + + mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die + mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die + mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die + mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die + + # Copy shared library versions of standard libraries for all targets + # into the system's abi-dependent lib directories because the rust + # installer only does so for the native ABI. + for v in $(multilib_get_enabled_abi_pairs); do + if [ ${v##*.} = ${DEFAULT_ABI} ]; then + continue + fi + abi_libdir=$(get_abi_LIBDIR ${v##*.}) + rust_target=$(get_abi_CHOST ${v##*.}) + mkdir -p ${D}/usr/${abi_libdir} + cp ${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib/*.so \ + ${D}/usr/${abi_libdir} || die + done + + dodoc COPYRIGHT + + # FIXME: + # Really not sure if that env is needed, specailly LDPATH + cat <<-EOF > "${T}"/50${P} + LDPATH="/usr/$(get_libdir)/${P}" + MANPATH="/usr/share/${P}/man" + EOF + doenvd "${T}"/50${P} + + cat <<-EOF > "${T}/provider-${P}" + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-lldb + EOF + dodir /etc/env.d/rust + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update --if-unset + + elog "Rust installs a helper script for calling GDB and LLDB," + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." + + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi + + if has_version 'app-shells/zsh'; then + elog "install app-shells/rust-zshcomp to get zsh completion for rust." + fi +} + +pkg_postrm() { + eselect rust unset --if-invalid +} |