commit:     09e3824ad463f85610b8f59423880bae8ab34377
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Thu Apr  3 08:57:21 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Apr  3 08:57:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=09e3824a

sci-electronics/cocotb: new package, add 1.9.2

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

 sci-electronics/cocotb/Manifest                    |  1 +
 sci-electronics/cocotb/cocotb-1.9.2.ebuild         | 53 ++++++++++++++++++++++
 .../cocotb/files/cocotb-1.9.2-fix-license-qa.patch | 29 ++++++++++++
 sci-electronics/cocotb/metadata.xml                | 29 ++++++++++++
 4 files changed, 112 insertions(+)

diff --git a/sci-electronics/cocotb/Manifest b/sci-electronics/cocotb/Manifest
new file mode 100644
index 000000000..80b0a8bc5
--- /dev/null
+++ b/sci-electronics/cocotb/Manifest
@@ -0,0 +1 @@
+DIST cocotb-1.9.2.tar.gz 300696 BLAKE2B 
6905ad2ff978083c1d6ae39df8c31e322ac68c1c8eb289a5bf50d027f99ae7dc4b40748b328fdabc543cbf7f8ca16d214809adba23054021d973016a13bc7d56
 SHA512 
1a151a63ed9ec3868b6d9165ee6e6144b52fbbc9b83e78027cc9a1d907142148e2643fd8880f8fd6b1155ce76cba65ecf1f851c6a72e45ece7c3c9921ab5fe83

diff --git a/sci-electronics/cocotb/cocotb-1.9.2.ebuild 
b/sci-electronics/cocotb/cocotb-1.9.2.ebuild
new file mode 100644
index 000000000..b9849c736
--- /dev/null
+++ b/sci-electronics/cocotb/cocotb-1.9.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_EXT=1
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python-based chip (RTL) verification"
+HOMEPAGE="https://www.cocotb.org";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+
+# Tests requires many eda tools, and can't work inside network sandbox
+RESTRICT=test
+
+RDEPEND="
+       dev-python/find-libpython[${PYTHON_USEDEP}]
+"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/cocotb-1.9.2-fix-license-qa.patch"
+)
+
+src_compile() {
+       # parallel build is broken
+       MAKEOPTS="-j1" distutils-r1_src_compile
+}
+
+python_test() {
+       epytest
+}
+
+pkg_postinst() {
+       elog "cocotb requires a HDL simulator to function correctly."
+       elog "You may want to install one of the following packages:"
+       elog "  sci-electronics/icarus-verilog - Verilog simulator"
+       elog "  sci-electronics/ghdl - VHDL simulator"
+       elog "  sci-electronics/verilator - Fast Verilog simulator"
+       elog ""
+       elog "Commercial EDA tools are also supported, including:"
+       elog "  - Synopsys VCS"
+       elog "  - Cadence Xcelium/Incisive"
+       elog "  - Siemens EDA Modelsim/Questa"
+       elog "  - Aldec Riviera-PRO"
+       elog "Note: These commercial tools need to be obtained from their 
respective vendors"
+}

diff --git a/sci-electronics/cocotb/files/cocotb-1.9.2-fix-license-qa.patch 
b/sci-electronics/cocotb/files/cocotb-1.9.2-fix-license-qa.patch
new file mode 100644
index 000000000..badc3f1be
--- /dev/null
+++ b/sci-electronics/cocotb/files/cocotb-1.9.2-fix-license-qa.patch
@@ -0,0 +1,29 @@
+From 23d621a170eb82de4fe4dd38b257286b36e5cfab Mon Sep 17 00:00:00 2001
+From: Huang Rui <[email protected]>
+Date: Thu, 3 Apr 2025 15:10:25 +0800
+Subject: [PATCH] fix(setup): Remove deprecated license classifier from
+ setup.py
+
+- Remove BSD license classifier as it's deprecated
+- Keep other metadata like description and URL unchanged
+
+Signed-off-by: Huang Rui <[email protected]>
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 38fba97b70bd..e2e415cc800b 100755
+--- a/setup.py
++++ b/setup.py
+@@ -127,7 +127,6 @@ setup(
+         "Programming Language :: Python :: 3.11",
+         "Programming Language :: Python :: 3.12",
+         "Programming Language :: Python :: 3.13",
+-        "License :: OSI Approved :: BSD License",
+         "Topic :: Scientific/Engineering :: Electronic Design Automation 
(EDA)",
+         "Framework :: cocotb",
+     ],
+-- 
+2.49.0
+

diff --git a/sci-electronics/cocotb/metadata.xml 
b/sci-electronics/cocotb/metadata.xml
new file mode 100644
index 000000000..a84604f7f
--- /dev/null
+++ b/sci-electronics/cocotb/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Huang Rui</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="pypi">cocotb</remote-id>
+               <remote-id type="github">cocotb/cocotb</remote-id>
+               <maintainer>
+                       <name>Cocotb Contributors</name>
+                       <email>[email protected]</email>
+               </maintainer>
+               <bugs-to>https://github.com/cocotb/cocotb/issues</bugs-to>
+       </upstream>
+       <longdescription lang="en">
+               cocotb is an open source coroutine-based cosimulation testbench
+               environment for verifying VHDL and SystemVerilog RTL using 
Python.
+               It allows you to write testbenches in Python and interface with
+               simulators like Icarus Verilog, GHDL, VCS, ModelSim, Questa and
+               others to verify hardware designs.
+       </longdescription>
+       <longdescription lang="zh">
+               cocotb 是一个基于协程的开源协同仿真测试平台环境,用于使用Python验证
+               VHDL和SystemVerilog RTL。它允许您使用Python编写测试平台,并与
+               Icarus Verilog、GHDL、VCS、ModelSim、Questa等仿真器接口以验证硬件设计。
+       </longdescription>
+</pkgmetadata>

Reply via email to