mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
Just the ones appearing in pkgdev push -A. Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
56 lines
1.3 KiB
Bash
56 lines
1.3 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
LLVM_COMPAT=( {17..22} )
|
|
inherit flag-o-matic llvm-r2
|
|
|
|
DESCRIPTION="The Data-Oriented Language for Sane Software Development"
|
|
HOMEPAGE="https://odin-lang.org/"
|
|
|
|
if [[ $PV == 9999 ]]; then
|
|
EGIT_REPO_URI="https://github.com/odin-lang/Odin.git"
|
|
inherit git-r3
|
|
else
|
|
MY_PV="${PV/./-}"
|
|
SRC_URI="https://github.com/odin-lang/Odin/archive/refs/tags/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
|
|
S="${WORKDIR}/Odin-dev-${MY_PV}"
|
|
KEYWORDS="~amd64"
|
|
fi
|
|
|
|
LICENSE="ZLIB"
|
|
SLOT="0"
|
|
|
|
RDEPEND="
|
|
$(llvm_gen_dep '
|
|
llvm-core/clang:${LLVM_SLOT}=
|
|
llvm-core/llvm:${LLVM_SLOT}=
|
|
')
|
|
"
|
|
|
|
BDEPEND="${RDEPEND}"
|
|
|
|
src_configure() {
|
|
# Odin explicitly searches for and builds with clang++; unsupported GCC flags need to be stripped.
|
|
CC=clang CXX=clang++ strip-unsupported-flags
|
|
default
|
|
}
|
|
|
|
src_compile() {
|
|
./build_odin.sh release || die "failed to build odin"
|
|
}
|
|
|
|
src_install() {
|
|
local install_dir="/usr/$(get_libdir)/${PN}"
|
|
insinto "${install_dir}"
|
|
doins -r base core vendor
|
|
|
|
# Odin needs to link against runtime libs. Odin can pick up on those libs
|
|
# via `ODIN_ROOT`, but installing it into the same base dir keeps everything
|
|
# working right out of the box.
|
|
exeinto "${install_dir}"
|
|
doexe odin
|
|
dosym -r "${install_dir}/odin" "/usr/bin/odin"
|
|
}
|