diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-13 17:56:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-13 17:56:30 +0100 |
commit | 948d557b4a61dc14722668b6b11a4cf3cee07b01 (patch) | |
tree | b28b6cb077ae6b2457e30d49028fc978d8e2b59b /dev-lang/zig | |
parent | e3cf2c86fca1750343c1885311f857f185ee4f2d (diff) |
gentoo resync : 13.09.2019
Diffstat (limited to 'dev-lang/zig')
-rw-r--r-- | dev-lang/zig/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/zig/zig-9999.ebuild | 61 |
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index 8f552173cf5a..35624bdc82d9 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -2,4 +2,5 @@ AUX zig-0.4.0-r1-build-artifacts.patch 2149 BLAKE2B 7d2ac6a9d3cca4a13a4ad932f71d AUX zig-0.4.0-r1-suppress-warnings.patch 1106 BLAKE2B 3e4cac7325789a3ef954f35814a63e554710afd00d5d913c1ae597913df05409e475cea652b4219f7cf1a8c0233391cf4bd82fec19f98552f66df5dddbb5d4ae SHA512 a401c6c88ab3b1f8e5344502a53b9c2157ff310625735b54d9e91bbc4c726fc5e97ea3a1678cbe1fe6bf7ce3087f6ef68778900c40fb633daee96f2bdef3dc2f DIST zig-0.4.0.tar.gz 8924757 BLAKE2B 5ca3377f205694ff02360900b49eee7347cdf1cdaef90f1be071eff2610425ed453dfb35928fbe65b25f151b7153ab838c887d362ed3cd746f07833ae42510fd SHA512 423915730bc4ae9a67db3731a96471467826d16e59b87b3541f3e8ed2436f941939f22ccbebdb9a958a195b05360eb65f5be1658b32a01cc8db55c6e581eb039 EBUILD zig-0.4.0-r1.ebuild 1250 BLAKE2B 43219ec7395eb7bb27a1d039c97773e76bb0d3b19656b692b804ad5bd991200b89bfd0af7c4b9bdc56f93886533243f3d0cbc411b2d5ce34f63906712a498665 SHA512 d61ca59a5205c8bdcf113ee0f317763808073b9e1480c551b1a71b34fa4e0bc3dc191e8961fdeb0b1ebe283b6f504c9403ca2c138f8afabbbf9200a7729e56f1 +EBUILD zig-9999.ebuild 1536 BLAKE2B a30bd58d1d13c793b3d236ca8cb984c60c8b5f85942368b5d4bf996827bab60fa797bfb5a17c8f73e3b6a93b32ecb1591395ae2358c621a4aeadabbc536718ca SHA512 110251909cc152897b89ae14aba2c6bc7417db9453ca2ae609fb4838bdbe1d00eacbe45ab162af340d7e2f6553e3b6e4a622806c89d5d6f73d0adc6b111df7c7 MISC metadata.xml 549 BLAKE2B 1f79da87db9888bc7a1c12163f7ee36dcb37645f5bdeb61034144f76b03b7e464c05f62a8753b0b85fd0ed4fd33ea1066da552d29d28bdd2502918697b3d94a0 SHA512 5867cda8d47f181e93b4aa4763efa5e12d7a6bbf1001e496cd82cc892a43b144a2d8a0a4d26466ac171622acf3590866d9d75a16c8337ae06734d5d4f8b2e908 diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild new file mode 100644 index 000000000000..055f1f17b8a7 --- /dev/null +++ b/dev-lang/zig/zig-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils llvm + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/" +LICENSE="MIT" +SLOT="0" +IUSE="+experimental" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ziglang/zig.git" + inherit git-r3 +else + SRC_URI="https://github.com/ziglang/zig/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +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_}" ) +# According to zig's author, zig builds that do not support all targets are not +# supported by the upstream project. +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]} + +RDEPEND=" + sys-devel/llvm:8 + !experimental? ( sys-devel/llvm:8[${LLVM_TARGET_USEDEPS// /,}] ) + sys-devel/clang:8 +" + +DEPEND="${RDEPEND}" + +LLVM_MAX_SLOT=8 + +llvm_check_deps() { + has_version "sys-devel/clang:${LLVM_SLOT}" +} + +src_prepare() { + if use experimental; then + sed -i '/^NEED_TARGET(/d' cmake/Findllvm.cmake || die "unable to modify cmake/Findllvm.cmake" + fi + + sed -i 's/--prefix "${CMAKE_INSTALL_PREFIX}"/--prefix ".\/${CMAKE_INSTALL_PREFIX}"/' CMakeLists.txt || \ + die "unable to fix install path" + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCLANG_INCLUDE_DIRS="$(llvm-config --includedir)" + -DCLANG_LIBDIRS="$(llvm-config --libdir)" + ) + + cmake-utils_src_configure +} |