dev-lang/odin: clean up ebuilds

Signed-off-by: Itai Ferber <itai@itaiferber.net>
This commit is contained in:
Itai Ferber
2026-03-06 13:18:36 -05:00
parent 0e139fc43c
commit a4b4987f14
2 changed files with 28 additions and 32 deletions

View File

@@ -7,7 +7,6 @@ LLVM_COMPAT=( {17..21} )
inherit llvm-r2 inherit llvm-r2
DESCRIPTION="The Data-Oriented Language for Sane Software Development." DESCRIPTION="The Data-Oriented Language for Sane Software Development."
HOMEPAGE="https://odin-lang.org/" HOMEPAGE="https://odin-lang.org/"
if [[ $PV == 9999 ]]; then if [[ $PV == 9999 ]]; then
@@ -16,16 +15,11 @@ if [[ $PV == 9999 ]]; then
else else
MY_PV="${PV/./-}" MY_PV="${PV/./-}"
SRC_URI="https://github.com/odin-lang/Odin/archive/refs/tags/dev-${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz" SRC_URI="https://github.com/odin-lang/Odin/archive/refs/tags/dev-${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
# Source directory; the dir where the sources can be found (automatically
# unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P}
# If you don't need to change it, leave the S= line out of the ebuild
# to keep it tidy.
S="${WORKDIR}/Odin-dev-${MY_PV}" S="${WORKDIR}/Odin-dev-${MY_PV}"
KEYWORDS="~amd64" KEYWORDS="~amd64"
fi fi
LICENSE="ZLIB" LICENSE="ZLIB"
SLOT="0" SLOT="0"
RDEPEND=" RDEPEND="
@@ -35,7 +29,7 @@ RDEPEND="
') ')
" "
DEPEND="${RDEPEND}" BDEPEND="${RDEPEND}"
# build_odin.sh sets its own flags. Some gcc flags cause build failures # build_odin.sh sets its own flags. Some gcc flags cause build failures
CPPFLAGS="" CPPFLAGS=""
@@ -45,10 +39,14 @@ src_compile() {
} }
src_install() { src_install() {
insinto usr/lib/odin local install_dir="/usr/$(get_libdir)/${PN}"
exeinto usr/lib/odin insinto "${install_dir}"
doexe odin
doins -r base core vendor doins -r base core vendor
dosym -r /usr/lib/odin/odin /usr/bin/odin
# 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"
} }

View File

@@ -3,11 +3,10 @@
EAPI=8 EAPI=8
LLVM_COMPAT=(14 17 18 19 20) LLVM_COMPAT=( {17..21} )
inherit llvm-r1 inherit llvm-r2
DESCRIPTION="The Data-Oriented Language for Sane Software Development." DESCRIPTION="The Data-Oriented Language for Sane Software Development."
HOMEPAGE="https://odin-lang.org/" HOMEPAGE="https://odin-lang.org/"
if [[ $PV == 9999 ]]; then if [[ $PV == 9999 ]]; then
@@ -15,27 +14,22 @@ if [[ $PV == 9999 ]]; then
inherit git-r3 inherit git-r3
else else
MY_PV="${PV/./-}" MY_PV="${PV/./-}"
SRC_URI="https://github.com/odin-lang/Odin/archive/refs/tags/dev-${MY_PV}.tar.gz" SRC_URI="https://github.com/odin-lang/Odin/archive/refs/tags/dev-${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
# Source directory; the dir where the sources can be found (automatically
# unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P}
# If you don't need to change it, leave the S= line out of the ebuild
# to keep it tidy.
S="${WORKDIR}/Odin-dev-${MY_PV}" S="${WORKDIR}/Odin-dev-${MY_PV}"
KEYWORDS="~amd64" KEYWORDS="~amd64"
fi fi
LICENSE="BSD" LICENSE="ZLIB"
SLOT="0" SLOT="0"
RDEPEND=" RDEPEND="
$(llvm_gen_dep ' $(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}= llvm-core/clang:${LLVM_SLOT}=
llvm-core/llvm:${LLVM_SLOT}= llvm-core/llvm:${LLVM_SLOT}=
') ')
" "
DEPEND="${RDEPEND}" BDEPEND="${RDEPEND}"
# build_odin.sh sets its own flags. Some gcc flags cause build failures # build_odin.sh sets its own flags. Some gcc flags cause build failures
CPPFLAGS="" CPPFLAGS=""
@@ -45,10 +39,14 @@ src_compile() {
} }
src_install() { src_install() {
insinto usr/lib/odin local install_dir="/usr/$(get_libdir)/${PN}"
exeinto usr/lib/odin insinto "${install_dir}"
doexe odin
doins -r base core vendor doins -r base core vendor
dosym -r /usr/lib/odin/odin /usr/bin/odin
# 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"
} }