git: fd8e54173e14 - main - cad/freehdl: resurrect

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Tue, 21 Nov 2023 20:12:42 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd8e54173e14fde9513249909dfe2996be413581

commit fd8e54173e14fde9513249909dfe2996be413581
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-11-21 20:01:18 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-11-21 20:09:59 +0000

    cad/freehdl: resurrect
---
 MOVED                                              |   1 -
 cad/Makefile                                       |   1 +
 cad/freehdl/Makefile                               |  26 +++++
 cad/freehdl/distinfo                               |   3 +
 cad/freehdl/files/patch-freehdl_kernel-db.hh       |  15 +++
 cad/freehdl/files/patch-freehdl_kernel-sig-info.hh |  13 +++
 cad/freehdl/files/patch-freehdl_kernel-util.hh     |  15 +++
 cad/freehdl/files/patch-freehdl_std-vhdl-types.hh  |  11 +++
 cad/freehdl/files/patch-kernel_driver__info.cc     |  37 +++++++
 cad/freehdl/files/patch-kernel_fhdl__stream.cc     |  10 ++
 cad/freehdl/files/patch-vaul_dunit.cc              |  10 ++
 cad/freehdl/files/patch-vaul_pool.cc               |  10 ++
 cad/freehdl/pkg-descr                              |   3 +
 cad/freehdl/pkg-plist                              | 109 +++++++++++++++++++++
 14 files changed, 263 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index a08a1865fda1..0b9f58270d96 100644
--- a/MOVED
+++ b/MOVED
@@ -8088,5 +8088,4 @@ devel/mingw32-bin-msvcrt||2023-11-21|Has expired: Last upstream release was in 2
 devel/mingw32-zlib||2023-11-21|Has expired: Last upstream release was in 2014 and project mingw32 is defunct
 devel/mingw32-gcc||2023-11-21|Has expired: Upstream release was in 2015 and mingw32 project is defunct
 www/guile-www||2023-11-21|Has expired: Last upstream release was in 2002 and no longer relevant nowadays
-cad/freehdl||2023-11-21|Has expired: Upstream vaporized and SF site do not have dists anymore
 x11-toolkits/wlroots-devel|x11-toolkits/wlroots|2023-11-21|Out of date: use x11-toolkits/wlroots for now
diff --git a/cad/Makefile b/cad/Makefile
index 756d5302933c..84e61e892167 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -33,6 +33,7 @@
     SUBDIR += feappv
     SUBDIR += fidocadj
     SUBDIR += freecad
+    SUBDIR += freehdl
     SUBDIR += fritzing
     SUBDIR += gds3d
     SUBDIR += gdscpp
diff --git a/cad/freehdl/Makefile b/cad/freehdl/Makefile
new file mode 100644
index 000000000000..6ba41c6d66e6
--- /dev/null
+++ b/cad/freehdl/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	freehdl
+PORTVERSION=	0.0.7
+PORTREVISION=	10
+CATEGORIES=	cad
+MASTER_SITES=	http://freehdl.seul.org/~enaroska/
+
+MAINTAINER=	ports@FreeBSD.org
+COMMENT=	Free VHDL simulator
+WWW=		http://www.freehdl.seul.org/
+
+USES=		gmake pathfix libtool makeinfo perl5 pkgconfig
+USE_LDCONFIG=	yes
+USE_GCC=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	SYSTEM_LIBTOOL=${FALSE}
+INSTALL_TARGET=	install-strip
+
+# Bug 219297: GCC 6 changed its default from -std=gnu++98 to -std=gnu++14, and
+# this port's code is not compatible with C++11. Since the project looks
+# abandoned upstream, it makes more sense to just continue building with an
+# older C++ standard.
+USE_CXXSTD=	gnu++98
+
+INFO=		fire
+
+.include <bsd.port.mk>
diff --git a/cad/freehdl/distinfo b/cad/freehdl/distinfo
new file mode 100644
index 000000000000..ea017ab80e81
--- /dev/null
+++ b/cad/freehdl/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1700588581
+SHA256 (freehdl-0.0.7.tar.gz) = b12f2066d856d03e8abc0d93d6ba566b9c55b18e60d47614106c64030324d2de
+SIZE (freehdl-0.0.7.tar.gz) = 1394351
diff --git a/cad/freehdl/files/patch-freehdl_kernel-db.hh b/cad/freehdl/files/patch-freehdl_kernel-db.hh
new file mode 100644
index 000000000000..effb1d35d4f2
--- /dev/null
+++ b/cad/freehdl/files/patch-freehdl_kernel-db.hh
@@ -0,0 +1,15 @@
+--- freehdl/kernel-db.hh.orig	2013-04-30 20:25:10.000000000 +0000
++++ freehdl/kernel-db.hh
+@@ -254,10 +254,10 @@ public:
+ 
+ // A hash function template used tp generate a hash number from
+ // d
+-class db_basic_key_hash : public hash<unsigned long> {
++class db_basic_key_hash : public __gnu_cxx::hash<unsigned long> {
+ public:
+   size_t operator()(const db_basic_key& x) const {
+-    return (*(hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
++    return (*(__gnu_cxx::hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
+   }
+ };
+ 
diff --git a/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh b/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh
new file mode 100644
index 000000000000..2c178a3c3cf3
--- /dev/null
+++ b/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh
@@ -0,0 +1,13 @@
+--- freehdl/kernel-sig-info.hh.orig	2013-02-25 17:49:33.000000000 +0000
++++ freehdl/kernel-sig-info.hh
+@@ -164,10 +164,6 @@ template<class T>class sig_info : public
+ 	   type_info_interface *type, char attr, sig_info_base *base_sig,
+ 	   acl *aclp, vtime delay, void *sr) :
+     sig_info_base(iname, n, sln, type, attr, base_sig, aclp, delay, sr) {};
+-  /* Constructor to instantiate a guard signal */
+-  sig_info(name_stack &iname, const char *n, const char *sln,
+-	   void *reader, void *sr) : 
+-    sig_info_base(iname, n, sln, reader, sr) {};
+   /* Constructor to instantiate an alias signal */
+   sig_info(name_stack &iname, const char *n, const char *sln,
+ 	   type_info_interface *ty, sig_info_base *aliased_sig,
diff --git a/cad/freehdl/files/patch-freehdl_kernel-util.hh b/cad/freehdl/files/patch-freehdl_kernel-util.hh
new file mode 100644
index 000000000000..e6a583c8994a
--- /dev/null
+++ b/cad/freehdl/files/patch-freehdl_kernel-util.hh
@@ -0,0 +1,15 @@
+--- freehdl/kernel-util.hh.orig	2013-04-30 20:24:07.000000000 +0000
++++ freehdl/kernel-util.hh
+@@ -24,10 +24,10 @@ using namespace __gnu_cxx;
+ // A hash function template used tp generate a hash number from
+ // pointer values.
+ template<class T>
+-class pointer_hash : public hash<unsigned long> {
++class pointer_hash : public __gnu_cxx::hash<unsigned long> {
+ public:
+   size_t operator()(const T& x) const {
+-    return (*(hash<unsigned long> *)this)(((unsigned long)x)>>2);
++    return (*(__gnu_cxx::hash<unsigned long> *)this)(((unsigned long)x)>>2);
+   }
+ };
+ 
diff --git a/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh b/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh
new file mode 100644
index 000000000000..86c821983761
--- /dev/null
+++ b/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh
@@ -0,0 +1,11 @@
+--- freehdl/std-vhdl-types.hh.orig	2013-02-25 17:33:20.000000000 +0000
++++ freehdl/std-vhdl-types.hh
+@@ -1483,7 +1483,7 @@ A concat(array_info *ainfo, const A &a1,
+   new_array.info->add_ref();
+ 
+   /* Allocate memory for the data */
+-  const int mem_size = length * ainfo->element_type->size();
++  const int mem_size = length * ainfo->element_type->size;
+   new_array.data = (char*)internal_dynamic_alloc(mem_size);
+ 
+   /* Note, scalar(...) can be evaluated at compile time. */
diff --git a/cad/freehdl/files/patch-kernel_driver__info.cc b/cad/freehdl/files/patch-kernel_driver__info.cc
new file mode 100644
index 000000000000..8ef5a57e5276
--- /dev/null
+++ b/cad/freehdl/files/patch-kernel_driver__info.cc
@@ -0,0 +1,37 @@
+--- kernel/driver_info.cc.orig	2013-02-25 17:38:05.000000000 +0000
++++ kernel/driver_info.cc
+@@ -268,6 +268,7 @@ do_scalar_inertial_assignment(driver_inf
+  *************************************************************************
+  *************************************************************************/
+ 
++inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &);
+ 
+ // Creates transaction composite signals. Returns number of assigned scalars.
+ inline int
+@@ -311,7 +312,6 @@ do_array_transport_assignment(driver_inf
+ 	assigned_scalars += do_array_transport_assignment(driver, (array_base&)value.data[j], i, tr_time);
+ 	break;
+       case RECORD:
+-	inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &);
+ 	assigned_scalars += do_record_transport_assignment(driver, (record_base&)value.data[j], i, tr_time);
+ 	break;
+       }
+@@ -338,6 +338,9 @@ driver_info::transport_assign(const arra
+ }
+ 
+ 
++inline int do_record_inertial_assignment(driver_info &, const record_base &, int,  
++					  const vtime &, const vtime &); 
++
+ // Creates transaction for composite signals. Returns number of assigned scalars.
+ inline int
+ do_array_inertial_assignment(driver_info &driver,
+@@ -381,8 +384,6 @@ do_array_inertial_assignment(driver_info
+ 	assigned_scalars += do_array_inertial_assignment(driver, (array_base&)value.data[j], i, tr_time, rm_time);
+ 	break;
+       case RECORD:
+-	inline int do_record_inertial_assignment(driver_info &, const record_base &, int,  
+-						  const vtime &, const vtime &); 
+ 	assigned_scalars += do_record_inertial_assignment(driver, (record_base&)value.data[j], i, tr_time, rm_time);
+ 	break;
+       }
diff --git a/cad/freehdl/files/patch-kernel_fhdl__stream.cc b/cad/freehdl/files/patch-kernel_fhdl__stream.cc
new file mode 100644
index 000000000000..ad35d23f3bed
--- /dev/null
+++ b/cad/freehdl/files/patch-kernel_fhdl__stream.cc
@@ -0,0 +1,10 @@
+--- kernel/fhdl_stream.cc.orig	2006-01-12 08:05:01.000000000 +0000
++++ kernel/fhdl_stream.cc
+@@ -2,6 +2,7 @@
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#include <cstring>
+ #include <sstream>
+ #include <assert.h>
+ #include <freehdl/kernel-error.hh>
diff --git a/cad/freehdl/files/patch-vaul_dunit.cc b/cad/freehdl/files/patch-vaul_dunit.cc
new file mode 100644
index 000000000000..0c63a18e6dd4
--- /dev/null
+++ b/cad/freehdl/files/patch-vaul_dunit.cc
@@ -0,0 +1,10 @@
+--- vaul/dunit.cc.orig	2005-12-14 08:23:06.000000000 +0000
++++ vaul/dunit.cc
+@@ -27,6 +27,7 @@
+ 
+ #include <errno.h>
+ #include <string.h>
++#include <stdlib.h>
+ #if HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
diff --git a/cad/freehdl/files/patch-vaul_pool.cc b/cad/freehdl/files/patch-vaul_pool.cc
new file mode 100644
index 000000000000..96ee5a642026
--- /dev/null
+++ b/cad/freehdl/files/patch-vaul_pool.cc
@@ -0,0 +1,10 @@
+--- vaul/pool.cc.orig	2005-12-14 08:23:06.000000000 +0000
++++ vaul/pool.cc
+@@ -24,6 +24,7 @@
+ #include <freehdl/vaul-lexer.h>
+ #include <freehdl/vaul-util.h>
+ 
++#include <stdlib.h>
+ #if HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
diff --git a/cad/freehdl/pkg-descr b/cad/freehdl/pkg-descr
new file mode 100644
index 000000000000..12a4cc5a7155
--- /dev/null
+++ b/cad/freehdl/pkg-descr
@@ -0,0 +1,3 @@
+The goals of the FreeHDL project are to develop a VHDL simulator that has
+a graphical waveform viewer and a source level debugger. It also aims at
+VHDL-93 compliancy. The project is at a very early development stage.
diff --git a/cad/freehdl/pkg-plist b/cad/freehdl/pkg-plist
new file mode 100644
index 000000000000..16cc2dde07b3
--- /dev/null
+++ b/cad/freehdl/pkg-plist
@@ -0,0 +1,109 @@
+bin/freehdl-config
+bin/freehdl-gennodes
+bin/freehdl-v2cc
+bin/gvhdl
+include/freehdl/fire-types.h
+include/freehdl/fire-chunk.t
+include/freehdl/fire-chunk.h
+include/freehdl/tree-supp.h
+include/freehdl/fire.h
+include/freehdl/vaul-creator-base.h
+include/freehdl/vaul-dfile.h
+include/freehdl/vaul-dunit.h
+include/freehdl/vaul-dynarray.h
+include/freehdl/vaul-errors.h
+include/freehdl/vaul-lexer.h
+include/freehdl/vaul-list.h
+include/freehdl/vaul-mempool.h
+include/freehdl/vaul-parser.h
+include/freehdl/vaul-pool.h
+include/freehdl/vaul-printer.h
+include/freehdl/vaul-ref.h
+include/freehdl/vaul-types.h
+include/freehdl/vaul-util.h
+include/freehdl/vaul-chunk.t
+include/freehdl/vaul-chunk.h
+include/freehdl/vaul.h
+include/freehdl/FlexLexer.h
+include/freehdl/cdfggen-chunk.t
+include/freehdl/cdfggen-chunk.h
+include/freehdl/kernel-acl.hh
+include/freehdl/kernel-classes.hh
+include/freehdl/kernel-driver-info.hh
+include/freehdl/kernel-error.hh
+include/freehdl/kernel-flags.hh
+include/freehdl/kernel-global-event-queue.hh
+include/freehdl/kernel-handle-info.hh
+include/freehdl/kernel-handle.hh
+include/freehdl/kernel-kernel-class.hh
+include/freehdl/kernel-list.hh
+include/freehdl/kernel-map-list.hh
+include/freehdl/kernel-name-stack.hh
+include/freehdl/kernel-pcounter.hh
+include/freehdl/kernel-process-base.hh
+include/freehdl/kernel.h
+include/freehdl/kernel-delayed-procedure-base.hh
+include/freehdl/kernel-reader-info.hh
+include/freehdl/kernel-sig-info.hh
+include/freehdl/kernel-sigacl-list.hh
+include/freehdl/kernel-wait-info.hh
+include/freehdl/kernel-winfo-item.hh
+include/freehdl/kernel-attributes.hh
+include/freehdl/kernel-dump.hh
+include/freehdl/kernel-util.hh
+include/freehdl/kernel-fhdl-stream.hh
+include/freehdl/kernel-register.hh
+include/freehdl/kernel-resolver-process.hh
+include/freehdl/kernel-resolver-descriptor.hh
+include/freehdl/kernel-source-descriptor.hh
+include/freehdl/kernel-signal-source-list-array.hh
+include/freehdl/std.h
+include/freehdl/kernel-persistent-dump.hh
+include/freehdl/kernel-persistent-cdfg-dump.hh
+include/freehdl/kernel-Xinfo-kind.hh
+include/freehdl/kernel-Xinfo-data-descriptor.hh
+include/freehdl/kernel-stack-trace.hh
+include/freehdl/kernel-db.hh
+include/freehdl/std-memory.hh
+include/freehdl/std-standard.hh
+include/freehdl/std-vhdl-types.hh
+lib/libfreehdl-fire.so.0.0.0
+lib/libfreehdl-fire.so.0
+lib/libfreehdl-fire.so
+lib/libfreehdl-fire.a
+lib/libfreehdl-vaul.so.0.0.0
+lib/libfreehdl-vaul.so.0
+lib/libfreehdl-vaul.so
+lib/libfreehdl-vaul.a
+lib/libfreehdl-kernel.so.0.0.0
+lib/libfreehdl-kernel.so.0
+lib/libfreehdl-kernel.so
+lib/libfreehdl-kernel.a
+lib/libfreehdl-std.so.0.0.0
+lib/libfreehdl-std.so.0
+lib/libfreehdl-std.so
+lib/libfreehdl-std.a
+lib/freehdl/libieee.so.0.0.0
+lib/freehdl/libieee.so.0
+lib/freehdl/libieee.so
+lib/freehdl/libieee.a
+lib/libfreehdl-cdfggen.so.0.0.0
+lib/libfreehdl-cdfggen.so.0
+lib/libfreehdl-cdfggen.so
+lib/libfreehdl-cdfggen.a
+man/man1/freehdl-config.1.gz
+man/man1/freehdl-gennodes.1.gz
+man/man1/freehdl-v2cc.1.gz
+man/man1/gvhdl.1.gz
+man/man5/v2cc.libs.5.gz
+%%DATADIR%%/lib/std/standard.vhdl
+%%DATADIR%%/lib/std/textio.vhdl
+%%DATADIR%%/lib/ieee/std_logic_1164.vhdl
+%%DATADIR%%/lib/ieee/numeric_std.vhdl
+%%DATADIR%%/lib/ieee/numeric_bit.vhdl
+%%DATADIR%%/lib/ieee/std_logic_signed.vhdl
+%%DATADIR%%/lib/ieee/std_logic_unsigned.vhdl
+%%DATADIR%%/lib/ieee/std_logic_arith.vhdl
+%%DATADIR%%/lib/ieee/math_real.vhdl
+%%DATADIR%%/lib/ieee/vital_timing.vhdl
+libdata/pkgconfig/freehdl.pc