File mingw64-iverilog.spec of Package mingw64-iverilog
#
# spec file for package mingw64-iverilog
#
# Copyright (c) 2020-2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?_mingw64_make_build:%global _mingw64_make_build %make_build}
%define _name iverilog
Name: mingw64-%{_name}
Version: 0~20260106.4d79c2c10
Release: 0
%define major_ver 12
Summary: Simulation and synthesis tool for IEEE-1364
License: GPL-2.0-or-later
Group: Productivity/Scientific/Electronics
URL: https://steveicarus.github.io/iverilog/
Source: verilog-%{version}.tar.gz
Patch1: verilog-12.0-install-fixes.patch
Patch2: 0001-vvp-generate-libvvp-import-library-for-MinGW-builds.patch
Patch3: 0002-vvp-install-libvvp-pkg-config-file.patch
Patch4: 0003-vvp-create-libvvp-as-versioned-library.patch
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: flex
BuildRequires: gperf
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-libbz2-devel
BuildRequires: mingw64-readline-devel
BuildRequires: mingw64-zlib-devel
# for running checks
BuildRequires: mingw64-cross-wine
BuildRequires: mingw64-libgcc_s_seh1
BuildRequires: mingw64-libstdc++6
%_mingw64_package_header_debug
BuildArch: noarch
%description
Icarus Verilog is a Verilog compiler that generates a variety of
engineering formats, including simulation. It strives to be true
to the IEEE-1364 standard.
%package devel
Summary: Icarus Verilog development files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package contains necessary header files for Icarus Verilog
%_mingw64_debug_package
%prep
%autosetup -p1 -n verilog-%{version}
chmod a+x autoconf.sh
%build
./autoconf.sh
%_mingw64_configure \
--enable-libvvp
%_mingw64_make_build
%install
%_mingw64_make_install
%check
# partial install
mkdir -p lib/ivl
ln -fs ../../ivlpp/ivlpp.exe lib/ivl
ln -fs ../../ivl.exe lib/ivl
ln -fs ../../tgt-vvp/vvp.conf lib/ivl
find -name '*.vpi' -exec ln -fs ../.{} lib/ivl \;
find -name '*.tgt' -exec ln -fs ../.{} lib/ivl \;
echo 'WINEPATH=%{_mingw64_bindir} /usr/bin/wine $(dirname $0)/vvp.exe $*; exit $?' > vvp/vvp; chmod a+x vvp/vvp
echo 'WINEPATH=%{_mingw64_bindir} /usr/bin/wine $(dirname $0)/iverilog.exe $*; exit $?' > driver/iverilog; chmod a+x driver/iverilog
make check
%files
%license COPYING
%doc README.md
%doc examples
%{_mingw64_bindir}/*.exe
%{_mingw64_bindir}/*.dll
%{_mingw64_libdir}/ivl
%exclude %{_mingw64_libdir}/ivl/*.debug
%{_mingw64_mandir}/man1/*
%files devel
%{_mingw64_includedir}/*
%{_mingw64_libdir}/lib*.a
%{_mingw64_libdir}/pkgconfig
%changelog