commit:     3dfab58c6ade1e1120919060a0bec3435a303a67
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Fri Jan 16 05:11:53 2026 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Fri Jan 16 05:11:53 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3dfab58c

sci-electronics/yosys: inherit llvm-r2, remove tcl use flag

- inherit llvm-r2.eclass
- remove tcl use flag
- happy new year 2026

Signed-off-by: Huang Rui <vowstar <AT> gmail.com>

 .../{yosys-0.61.ebuild => yosys-0.61-r1.ebuild}    | 32 +++++++++++++++-------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/sci-electronics/yosys/yosys-0.61.ebuild 
b/sci-electronics/yosys/yosys-0.61-r1.ebuild
similarity index 60%
rename from sci-electronics/yosys/yosys-0.61.ebuild
rename to sci-electronics/yosys/yosys-0.61-r1.ebuild
index 86e4c6483a..7e248a33a4 100644
--- a/sci-electronics/yosys/yosys-0.61.ebuild
+++ b/sci-electronics/yosys/yosys-0.61-r1.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 PYTHON_COMPAT=( python3_{11..14} )
+LLVM_COMPAT=( {18..21} )
 
-inherit python-any-r1
+inherit python-any-r1 llvm-r2
 
 DESCRIPTION="framework for Verilog RTL synthesis"
 HOMEPAGE="https://yosyshq.net/yosys/";
@@ -17,17 +18,17 @@ S="${WORKDIR}"
 LICENSE="ISC"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="tcl"
-
 RDEPEND="
        dev-libs/boost:=
        dev-libs/libffi:=
-       llvm-core/clang:=
+       dev-lang/tcl:=
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}=
+       ')
        media-gfx/xdot
        sys-libs/ncurses:=
        sys-libs/readline:=
        virtual/zlib
-       tcl? ( dev-lang/tcl:= )
 "
 
 DEPEND="${RDEPEND}"
@@ -37,6 +38,21 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+src_prepare() {
+       default
+
+       # Fix execute permissions and add shebang for Python scripts
+       local script
+       while IFS= read -r -d '' script; do
+               chmod +x "${script}" || die
+               # Add shebang if missing
+               if ! head -n 1 "${script}" | grep -q '^#!'; then
+                       sed -i '1i#!/usr/bin/env python3' "${script}" || die
+               fi
+       done < <(find . -name "*.py" -print0)
+
+}
+
 src_configure() {
        cat <<-__EOF__ >> Makefile.conf || die
                PREFIX := ${EPREFIX}/usr
@@ -46,9 +62,5 @@ src_configure() {
                PYTHON_EXECUTABLE := ${PYTHON}
        __EOF__
 
-       if ! use tcl; then
-               echo "ENABLE_TCL := 0" >> Makefile.conf || die
-       fi
-
        default
 }

Reply via email to