summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2021-02-22 22:54:50 +0000
committerJoonas Niilola <juippis@gentoo.org>2021-03-04 19:42:33 +0200
commit41ff4d6bedc52f042d13e3e4ab34ee519f2a1baf (patch)
tree53073e0ac7ea57be690fe523fd9fc9964796e022 /dev-lang
parentsys-devel/lld: enable shared libraries on lld (diff)
downloadgentoo-41ff4d6bedc52f042d13e3e4ab34ee519f2a1baf.tar.gz
gentoo-41ff4d6bedc52f042d13e3e4ab34ee519f2a1baf.tar.bz2
gentoo-41ff4d6bedc52f042d13e3e4ab34ee519f2a1baf.zip
dev-lang/zig: version bump to 0.7.1
Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Aisha Tammy <gentoo@aisha.cc> Closes: https://github.com/gentoo/gentoo/pull/19606 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/zig/Manifest1
-rw-r--r--dev-lang/zig/metadata.xml9
-rw-r--r--dev-lang/zig/zig-0.7.1.ebuild52
-rw-r--r--dev-lang/zig/zig-9999.ebuild41
4 files changed, 77 insertions, 26 deletions
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest
index 681529cf54ae..fb74e7a263db 100644
--- a/dev-lang/zig/Manifest
+++ b/dev-lang/zig/Manifest
@@ -1 +1,2 @@
DIST zig-0.5.0.tar.gz 15743912 BLAKE2B 1a28dffebc24200cf51e1d94ff7203c8de5641e1a299eff58e808a5a8f3257fc8ff771699a0f90733702b90e5536990adc5bf41b973b4ea642081ef788f7a83d SHA512 9fc2ef827421e54e8db98ce3474ba3bbe9119b0b9aa30b4edd78d73277d2384067b5c78f4ebbca350a97ac230131e7f71e6d54c1e75fc74e1833ce6c51c402df
+DIST zig-0.7.1.tar.gz 16082917 BLAKE2B 401bb079f2d0e2ad26837940e3b79c14237a492bd0b4df616f91b8b454ebd4ac3de36b2c988369c9eaaf7c2df4f95d4b1bb97760629f813ac8c7220e9542e12b SHA512 ad0b36f7b40481aca03940adfd42d34a724922993fc29a23a80412dc087ca6ce4876a400dc9bb7da455564521a88ea205c218988759ff6c56251a08232bfa41a
diff --git a/dev-lang/zig/metadata.xml b/dev-lang/zig/metadata.xml
index 486ff3e79f03..bd080b506d5a 100644
--- a/dev-lang/zig/metadata.xml
+++ b/dev-lang/zig/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>gentoo@aisha.cc</email>
+ <name>Aisha Tammy</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="experimental">Enable builds that do not support all of LLVM's target architectures</flag>
</use>
diff --git a/dev-lang/zig/zig-0.7.1.ebuild b/dev-lang/zig/zig-0.7.1.ebuild
new file mode 100644
index 000000000000..063604d4ceb1
--- /dev/null
+++ b/dev-lang/zig/zig-0.7.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2019-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake 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
+
+# According to zig's author, zig builds that do not support all targets are not
+# supported by the upstream project.
+ALL_LLVM_TARGETS=(
+ AArch64 AMDGPU ARM AVR 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[@]}"
+
+LLVM_MAX_SLOT=11
+
+RDEPEND="
+ sys-devel/clang:${LLVM_MAX_SLOT}
+ >=sys-devel/lld-11.0.0
+ <sys-devel/lld-12.0.0
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ !experimental? ( sys-devel/llvm:${LLVM_MAX_SLOT}[${LLVM_TARGET_USEDEPS// /,}] )
+"
+DEPEND="${RDEPEND}"
+
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DZIG_USE_CCACHE=OFF
+ -DZIG_PREFER_CLANG_CPP_DYLIB=ON
+ )
+ cmake_src_configure
+}
diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
index 223f162cfd9c..063604d4ceb1 100644
--- a/dev-lang/zig/zig-9999.ebuild
+++ b/dev-lang/zig/zig-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -19,43 +19,34 @@ else
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[@]}
+ALL_LLVM_TARGETS=(
+ AArch64 AMDGPU ARM AVR 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[@]}"
+
+LLVM_MAX_SLOT=11
RDEPEND="
- sys-devel/llvm:9
- !experimental? ( sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}] )
- sys-devel/clang:9
+ sys-devel/clang:${LLVM_MAX_SLOT}
+ >=sys-devel/lld-11.0.0
+ <sys-devel/lld-12.0.0
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ !experimental? ( sys-devel/llvm:${LLVM_MAX_SLOT}[${LLVM_TARGET_USEDEPS// /,}] )
"
-
DEPEND="${RDEPEND}"
-LLVM_MAX_SLOT=9
-
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_src_prepare
-}
-
src_configure() {
local mycmakeargs=(
- -DCLANG_INCLUDE_DIRS="$(llvm-config --includedir)"
- -DCLANG_LIBDIRS="$(llvm-config --libdir)"
+ -DZIG_USE_CCACHE=OFF
+ -DZIG_PREFER_CLANG_CPP_DYLIB=ON
)
-
cmake_src_configure
}