File yosys.spec of Package yosys
%define _debugsource_template #{nil}
%define _gitversion 0.58
Name: yosys
Summary: Yosys open synthesis suite
Version: %{_gitversion}
Release: <CI_CNT>.<B_CNT>.157aabb58
License: ISC
URL: https://yosyshq.net/yosys/
Group: Applications/Engineering
Source0: %{name}-%{version}.tar.gz
Requires: tcl >= 8.0.0
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: bison >= 3.6
BuildRequires: gawk
BuildRequires: flex
BuildRequires: cmake
BuildRequires: tcl-devel >= 8.0.0
BuildRequires: libffi-devel >= 3.0.0
BuildRequires: readline-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: %{name}-%{version}-%{release}
# openSUSE Leap
%if 0%{?sle_version} == 150600 && 0%{?is_opensuse}
BuildRequires: gcc13
BuildRequires: gcc13-c++
BuildRequires: python311
BuildRequires: python311-devel
%endif
# openSUSE Tumbleweed
%if 0%{?suse_version} > 1600 && 0%{?is_opensuse}
%global python3_sitearch /usr/lib64/python3.11/site-packages
BuildRequires: python311-devel
BuildRequires: python311-watchfiles
BuildRequires: python311-pyproject-metadata
%endif
# ALmaLinux 8
%if 0%{?rhel} == 8
%global python3_sitearch /usr/lib64/python3.11/site-packages
BuildRequires: python3.11-devel
BuildRequires: gcc-toolset-14
%endif
# ALmaLinux 9
%if 0%{?rhel} >= 9 || 0%{?fedora} >= 39
BuildRequires: python3-build
BuildRequires: python-unversioned-command
%endif
%description
This is a framework for RTL synthesis tools. It currently has
extensive Verilog-2005 support and provides a basic set of
synthesis algorithms for various application domains.
Yosys can be adapted to perform any synthesis job by combining
the existing passes (algorithms) using synthesis scripts and
adding additional passes as needed by extending the yosys C++
code base.
Yosys is free software licensed under the ISC license (a GPL
compatible license that is similar in terms to the MIT license
or the 2-clause BSD license).
%prep
%setup
%build
COMPILER=""
%if 0%{?sle_version} == 150600 && 0%{?is_opensuse}
COMPILER="CXX=/usr/bin/g++-13"
PYTHON_EXECUTABLE=/usr/bin/python3.11
%else
PYTHON_EXECUTABLE=/usr/bin/python3
%endif
%if 0%{?rhel} == 8
scl enable gcc-toolset-14 -- make config-gcc $COMPILER
scl enable gcc-toolset-14 -- make $COMPILER GIT_REV=%{_gitversion} \
PREFIX=%{_prefix} \
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} \
%{?_smp_mflags} ABCREV=default
%else
make config-gcc $COMPILER
make $COMPILER GIT_REV=%{_gitversion} \
PREFIX=%{_prefix} \
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} \
%{?_smp_mflags} ABCREV=default
%endif
%install
%if 0%{?rhel} == 8
scl enable gcc-toolset-14 -- %make_install PREFIX=%{_prefix} ABCREV=default
%else
%make_install PREFIX=%{_prefix} ABCREV=default
%endif
%__mkdir_p %{buildroot}%{_bindir}
%__mkdir_p %{buildroot}%{_datadir}
%__mkdir_p %{buildroot}%{_datadir}/yosys/plugins
%files
%defattr(-,root,root,-)
%doc README.md COPYING CHANGELOG
#doc manual/*.pdf
%{_bindir}/*
#{_libdir}/yosys/*
%dir %{_datadir}/yosys/plugins
%dir %{_datadir}/yosys
%dir %{_datadir}/yosys/achronix
%dir %{_datadir}/yosys/anlogic
%dir %{_datadir}/yosys/choices
%dir %{_datadir}/yosys/coolrunner2
%dir %{_datadir}/yosys/ecp5
%dir %{_datadir}/yosys/efinix
%dir %{_datadir}/yosys/fabulous
%dir %{_datadir}/yosys/gatemate
%dir %{_datadir}/yosys/gowin
%dir %{_datadir}/yosys/greenpak4
%dir %{_datadir}/yosys/ice40
%dir %{_datadir}/yosys/include
%dir %{_datadir}/yosys/intel
%dir %{_datadir}/yosys/intel_alm
%dir %{_datadir}/yosys/lattice
%dir %{_datadir}/yosys/microchip
%dir %{_datadir}/yosys/nanoxplore
%dir %{_datadir}/yosys/nexus
%dir %{_datadir}/yosys/python3
%dir %{_datadir}/yosys/quicklogic
%dir %{_datadir}/yosys/sf2
%dir %{_datadir}/yosys/xilinx
%{_datadir}/yosys/*.v
%{_datadir}/yosys/achronix/*
%{_datadir}/yosys/anlogic/*
%{_datadir}/yosys/cells.lib
%{_datadir}/yosys/choices/*
%{_datadir}/yosys/coolrunner2/*
%{_datadir}/yosys/ecp5/*
%{_datadir}/yosys/efinix/*
%{_datadir}/yosys/fabulous/*
%{_datadir}/yosys/gatemate/*
%{_datadir}/yosys/gowin/*
%{_datadir}/yosys/greenpak4/*
%{_datadir}/yosys/ice40/*
%{_datadir}/yosys/include/*
%{_datadir}/yosys/intel/*
%{_datadir}/yosys/intel_alm/*
%{_datadir}/yosys/lattice/*
%{_datadir}/yosys/microchip/*
%{_datadir}/yosys/nanoxplore/*
%{_datadir}/yosys/nexus/*
%{_datadir}/yosys/python3/*
%{_datadir}/yosys/quicklogic/*
%{_datadir}/yosys/sf2/*
%{_datadir}/yosys/xilinx/*
%changelog
* Mon Nov 3 2025 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.58-1
- Update to version 0.58.
* Thu Oct 17 2024 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.46-1
- Update to version 0.46.
- Disable python plugin (seems to have compile error).
* Thu Jul 18 2024 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.43-1
- Update to version 0.43.
* Sat Sep 23 2023 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.33-4
- Update to version 0.33+.
- The manual.pdf is not shipped anymore.
* Wed Dec 28 2022 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.12-3
- Update to version 0.24.
- Integrate with the GHDL/Yosys plugin for VHDL support.
* Mon Feb 17 2020 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.9-1
- Update to version 0.9 and ABC 3709744.
* Wed Mar 21 2018 Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr> - 0.7-1
- Update to version 0.7 and ABC 77d52065fd97.
* Mon Apr 6 2015 Gabriel.Gouvine <gabriel.gouvine_pack@m4x.org> - 0.5
- Packaged the 0.5 version of yosys
- Do not download ABC through the net but use an archive.