From: Sebastien Marie Subject: Re: lang/iverlog 11.0 to 12.0 (unfinished) To: Thomas Dettbarn , ports@openbsd.org Date: Sat, 29 Nov 2025 09:24:19 +0100 Thomas Dettbarn writes: > Hello! > > My apologies, for sending an email with an unfinished patch to this > mailing list... Apparently, the /usr/ports/lang/iverilog port was still > at version 11.0, even though 12.0 is the most recent one (and > probably soon to be replaced by 13.0). > > In addtion to this, the hosting moved to github, and the old ftp > Download link for the 11.0.tar.gz seemed to be no longer active. > > So, I started updating the port, and I got quite far. There are still > two major issues with it: > > 1. The patch files were no longer needed, so I removed them >     locally. However, this is not reflected in the patch > 2. The "make install" does not work, because of wrong entries >     in the PLIST file. > > And one minor issue: > > 3. In the Makefile, I used two varaibles for the version number: >     V_DOT=12.0 and V_LINE=12_0 > > Issue 1 is rooted in my limited knowledge of GIT, Issues 2+3 > in my limited knowledge of the OpenBSD port system. > > If somebody could have a look and fine tune this patch, it > would be wonderful. > I started from your diff and polished it. - use V=12_0 and substitute the '_' to '.' for PKGNAME - prefer DIST_TUPLE over GH_* variables - add missing BUILD_DEPENDS (gperf) - regen PLIST using 'make update-plist' - more cleanup in the port (unneeded CONFIGURE_ENV or CXXFLAGS_base-clang) It build and run fine on amd64. Any comments or OK to commit it ? Regards. -- Sebastien Marie diff --git a/lang/iverilog/Makefile b/lang/iverilog/Makefile index 5e356caad8..27ea673ec0 100644 --- a/lang/iverilog/Makefile +++ b/lang/iverilog/Makefile @@ -1,37 +1,38 @@ COMMENT= Verilog simulation and synthesis tool -V= 11.0 -DISTNAME= verilog-$V -REVISION= 1 -PKGNAME= iverilog-$V +V= 12_0 +DISTNAME= iverilog-${V} +PKGNAME= iverilog-${V:S/_/./} CATEGORIES= lang devel HOMEPAGE = https://steveicarus.github.io/iverilog/ +DIST_TUPLE += github steveicarus iverilog v${V} . + # GPLv2+ PERMIT_PACKAGE= Yes -SITES= ftp://ftp.icarus.com/pub/eda/verilog/v11/ WANTLIB += ${COMPILER_LIBCXX} bz2 c curses m readline z COMPILER = base-clang ports-gcc base-gcc -CXXFLAGS_base-clang = -std=c++14 - +SEPARATE_BUILD= Yes USE_GMAKE= Yes -BUILD_DEPENDS= devel/bison +BUILD_DEPENDS= devel/bison \ + devel/gperf LIB_DEPENDS = archivers/bzip2 YACC= bison -CONFIGURE_STYLE= gnu +AUTOCONF_VERSION= 2.72 +AUTOMAKE_VERSION= 1.18 + +CONFIGURE_STYLE= autoreconf +AUTORECONF= sh ./autoconf.sh + CONFIGURE_ARGS+= --disable-suffix -CONFIGURE_ENV+= CFLAGS="-fPIC ${CFLAGS}" \ - CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}" -VVP_DOCS= README.txt opcodes.txt DOC_DIR= ${PREFIX}/share/doc/iverilog post-install: diff --git a/lang/iverilog/distinfo b/lang/iverilog/distinfo index fc16e0e27b..81fd9b4332 100644 --- a/lang/iverilog/distinfo +++ b/lang/iverilog/distinfo @@ -1,2 +1,2 @@ -SHA256 (verilog-11.0.tar.gz) = 1UeFYWtj/mc5lI6ZZ0mWJPKd7VSttX4eAOuJdWemVdU= -SIZE (verilog-11.0.tar.gz) = 1784307 +SHA256 (steveicarus-iverilog-v12_0.tar.gz) = poyx73wBfvCQ6+2yvD4575Dsxwo0AK+0qpQwO8O+qn0= +SIZE (steveicarus-iverilog-v12_0.tar.gz) = 2995096 diff --git a/lang/iverilog/patches/patch-driver_main_c b/lang/iverilog/patches/patch-driver_main_c deleted file mode 100644 index d34361bf59..0000000000 --- a/lang/iverilog/patches/patch-driver_main_c +++ /dev/null @@ -1,23 +0,0 @@ -Don't exit when ivl_root not found - the user may have supplied it. - -When running 'make check' without having an installed copy, find_ivl_root() -will fail on Unix systems that don't provide /proc/self/exe (e.g. MacOS). - -https://github.com/steveicarus/iverilog/commit/56d2d798ecd97c09539e7748997013eddd37ab42 - -Index: driver/main.c ---- driver/main.c.orig -+++ driver/main.c -@@ -1061,7 +1061,11 @@ static void find_ivl_root(void) - find_ivl_root_failed("command path exceeds size of string buffer."); - } - if (len <= 0) { -- find_ivl_root_failed("couldn't get command path from OS."); -+ // We've failed, but we may yet find a -B option on the command line. -+ // Use the built-in path so the user sees a sensible error message. -+ assert(strlen(IVL_ROOT) < sizeof ivl_root); -+ strcpy(ivl_root, IVL_ROOT); -+ return; - } - s = strrchr(ivl_root, sep); - if (s == 0) { diff --git a/lang/iverilog/pkg/PLIST b/lang/iverilog/pkg/PLIST index ac79dc6600..a91eb5e4c8 100644 --- a/lang/iverilog/pkg/PLIST +++ b/lang/iverilog/pkg/PLIST @@ -55,7 +55,6 @@ share/doc/iverilog/ @comment share/doc/iverilog/BUGS.txt share/doc/iverilog/QUICK_START.txt -share/doc/iverilog/README.txt share/doc/iverilog/attributes.txt @comment share/doc/iverilog/cygwin.txt share/doc/iverilog/developer-quick-start.txt