Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ghdl: update to 2.0.0.
@ 2022-11-19 13:18 paper42
  2022-11-27 13:10 ` sgn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: paper42 @ 2022-11-19 13:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

There is a new pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages ghdl2
https://github.com/void-linux/void-packages/pull/40614

ghdl: update to 2.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

TODO: test, restore subpackages

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40614.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghdl2-40614.patch --]
[-- Type: text/x-diff, Size: 25853 bytes --]

From 9c065c769db6ca3406e2bb1d574b58031f660f43 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Fri, 18 Nov 2022 15:23:58 +0100
Subject: [PATCH] ghdl: update to 2.0.0.

---
 ...b764f49666616063d4239df83b5aed961fff.patch |  49 ------
 srcpkgs/ghdl/patches/curdir.patch             |  11 --
 srcpkgs/ghdl/patches/gcc11.patch              |  26 +++
 srcpkgs/ghdl/patches/gcc12.patch              |  68 ++++++++
 srcpkgs/ghdl/patches/gcc12b.patch             |  63 +++++++
 srcpkgs/ghdl/patches/install-paths.patch      | 164 ------------------
 srcpkgs/ghdl/patches/llvm12.patch             |  12 --
 srcpkgs/ghdl/patches/musl.patch               |  51 +++++-
 srcpkgs/ghdl/patches/respect-ldflags.patch    |  34 ----
 srcpkgs/ghdl/template                         |  51 ++----
 10 files changed, 221 insertions(+), 308 deletions(-)
 delete mode 100644 srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
 delete mode 100644 srcpkgs/ghdl/patches/curdir.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc11.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc12.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc12b.patch
 delete mode 100644 srcpkgs/ghdl/patches/install-paths.patch
 delete mode 100644 srcpkgs/ghdl/patches/llvm12.patch
 delete mode 100644 srcpkgs/ghdl/patches/respect-ldflags.patch

diff --git a/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch b/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
deleted file mode 100644
index 23c5673e593e..000000000000
--- a/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 396eb764f49666616063d4239df83b5aed961fff Mon Sep 17 00:00:00 2001
-From: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
-Date: Mon, 26 Apr 2021 20:17:40 +0200
-Subject: [PATCH] Migrate deprecated DebugLoc::get to DILocation::get
-
----
- src/ortho/llvm6/llvm-cbindings.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp
-index f82845ffcd..98470d8fab 100644
---- a/src/ortho/llvm6/llvm-cbindings.cpp
-+++ b/src/ortho/llvm6/llvm-cbindings.cpp
-@@ -1254,7 +1254,7 @@ new_var_decl(ODnode *Res, OIdent Ident, OStorage Storage, OTnode Atype)
-          DebugCurrentLine, Atype->Dbg, true);
-       DBuilder->insertDeclare
-         (unwrap(Decl), D, DBuilder->createExpression(),
--         DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope),
-+         DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope),
-          unwrap(LLVMGetInsertBlock(DeclBuilder)));
-     }
- #endif
-@@ -1597,7 +1597,7 @@ start_subprogram_body(ODnodeSubprg *Func)
-     DebugCurrentScope = DebugCurrentSubprg;
- 
-     unwrap(Builder)->SetCurrentDebugLocation
--      (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
-+      (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
-   }
- 
-   if (FlagDebug) {
-@@ -1612,7 +1612,7 @@ start_subprogram_body(ODnodeSubprg *Func)
-          DebugCurrentFile, DebugCurrentLine, Inter->Dtype->Dbg, true);
-       DBuilder->insertDeclare
-         (unwrap(Var), D, DBuilder->createExpression(),
--         DebugLoc::get(DebugCurrentLine, 0, DebugCurrentSubprg),
-+         DILocation::get(DebugCurrentSubprg->getContext(), DebugCurrentLine, 0, DebugCurrentSubprg),
-          unwrap(LLVMGetInsertBlock(DeclBuilder)));
-       LLVMBuildStore(DeclBuilder, Inter->Ref, Var);
-       Inter->Ref = Var;
-@@ -2759,7 +2759,7 @@ new_debug_line_stmt (unsigned Line)
-   if (FlagDebugLines && Line != DebugCurrentLine) {
-     DebugCurrentLine = Line;
-     unwrap(Builder)->SetCurrentDebugLocation
--      (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
-+      (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
-   }
- #endif
- }
diff --git a/srcpkgs/ghdl/patches/curdir.patch b/srcpkgs/ghdl/patches/curdir.patch
deleted file mode 100644
index 12e7648e7d45..000000000000
--- a/srcpkgs/ghdl/patches/curdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@
- 
- INSTALL_PROGRAM=install -m 755
- INSTALL_DATA=install -m 644
--PWD?=$(shell pwd)
-+PWD=$(CURDIR)
- DESTDIR=
- bindir=$(prefix)/bin
- libdir=$(prefix)/lib
diff --git a/srcpkgs/ghdl/patches/gcc11.patch b/srcpkgs/ghdl/patches/gcc11.patch
new file mode 100644
index 000000000000..f13a4c634ef5
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc11.patch
@@ -0,0 +1,26 @@
+From f8b87697e8b893b6293ebbfc34670c32bfb49397 Mon Sep 17 00:00:00 2001
+From: Tristan Gingold <tgingold@free.fr>
+Date: Thu, 12 May 2022 18:16:38 +0200
+Subject: [PATCH] ghdllocal.adb: move pragma suppress.  Fix #2056
+
+---
+ src/ghdldrv/ghdllocal.adb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
+index 4ed71a590a..756589602b 100644
+--- a/src/ghdldrv/ghdllocal.adb
++++ b/src/ghdldrv/ghdllocal.adb
+@@ -1259,11 +1259,11 @@ package body Ghdllocal is
+             Src : String_Access;
+             Dst : String_Access;
+             Success : Boolean;
+-            pragma Unreferenced (Success);
+          begin
+             Src := new String'(Image (Dir) & Basename & Get_Object_Suffix.all);
+             Dst := new String'(Basename & Get_Object_Suffix.all);
+             Copy_File (Src.all, Dst.all, Success, Overwrite, Full);
++            pragma Unreferenced (Success);
+             --  Be silent in case of error.
+             Free (Src);
+             Free (Dst);
diff --git a/srcpkgs/ghdl/patches/gcc12.patch b/srcpkgs/ghdl/patches/gcc12.patch
new file mode 100644
index 000000000000..c22e1f099094
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc12.patch
@@ -0,0 +1,68 @@
+From 8c5689b93e68ac34cdf7dd089a3990ae22f0049c Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Sat, 14 May 2022 11:46:53 +0200
+Subject: [PATCH] fix: avoid "pragma Unreferenced given" warnings with GCC 12
+
+---
+ src/ghdldrv/ghdldrv.adb            | 2 +-
+ src/synth/synth-vhdl_stmts.adb     | 2 +-
+ src/vhdl/translate/trans-chap2.adb | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
+index e7990ed4d4..0313e60579 100644
+--- a/src/ghdldrv/ghdldrv.adb
++++ b/src/ghdldrv/ghdldrv.adb
+@@ -1192,7 +1192,6 @@ package body Ghdldrv is
+    procedure Perform_Action (Cmd : in out Command_Elab; Args : Argument_List)
+    is
+       Success : Boolean;
+-      pragma Unreferenced (Success);
+    begin
+       Set_Elab_Units (Cmd, "-e", Args);
+       Setup_Compiler (Cmd, False);
+@@ -1202,6 +1201,7 @@ package body Ghdldrv is
+          Link (Cmd, Add_Std => True, Disp_Only => False);
+       end if;
+       Delete_File (Filelist_Name.all, Success);
++      pragma Unreferenced (Success);
+    end Perform_Action;
+ 
+    --  Command Run.
+diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
+index 3e09c3318e..6fa2e92272 100644
+--- a/src/synth/synth-vhdl_stmts.adb
++++ b/src/synth/synth-vhdl_stmts.adb
+@@ -1933,11 +1933,11 @@ package body Synth.Vhdl_Stmts is
+                                            Assoc_Chain : Node)
+    is
+       Infos : Target_Info_Array (1 .. 0);
+-      pragma Unreferenced (Infos);
+       Init : Association_Iterator_Init;
+    begin
+       Init := Association_Iterator_Build (Inter_Chain, Assoc_Chain);
+       Synth_Subprogram_Association (Subprg_Inst, Caller_Inst, Init, Infos);
++      pragma Unreferenced (Infos);
+    end Synth_Subprogram_Association;
+ 
+    --  Create wires for out and inout interface variables.
+diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb
+index ff04a13b78..9e7e329157 100644
+--- a/src/vhdl/translate/trans-chap2.adb
++++ b/src/vhdl/translate/trans-chap2.adb
+@@ -1006,7 +1006,6 @@ package body Trans.Chap2 is
+       Info   : constant Ortho_Info_Acc := Get_Info (Spec);
+       Final  : Boolean;
+       Constr : O_Assoc_List;
+-      pragma Unreferenced (Final);
+    begin
+       if not Is_Nested then
+          Start_Subprogram_Body (Info.Package_Elab_Spec_Subprg);
+@@ -1039,6 +1038,7 @@ package body Trans.Chap2 is
+             (Info.Package_Spec_Scope'Access, Info.Package_Spec_Scope));
+       end if;
+       Chap4.Elab_Declaration_Chain (Spec, Final);
++      pragma Unreferenced (Final);
+ 
+       if not Is_Nested then
+          Close_Temp;
diff --git a/srcpkgs/ghdl/patches/gcc12b.patch b/srcpkgs/ghdl/patches/gcc12b.patch
new file mode 100644
index 000000000000..05ae2d78d979
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc12b.patch
@@ -0,0 +1,63 @@
+From 4c3825daf54f81433e5de46cc25fdfac7189ffab Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Sat, 14 May 2022 11:45:56 +0200
+Subject: [PATCH] fix: avoid "unnecessary with of ancestor [-gnatwr]" with GCC
+ 12
+
+---
+ src/ortho/mcode/ortho_code-x86-abi.adb | 1 -
+ src/synth/netlists-disp_dot.ads        | 2 --
+ src/synth/netlists-inference.ads       | 1 -
+ src/vhdl/translate/trans-rtis.adb      | 2 +-
+ 4 files changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/ortho/mcode/ortho_code-x86-abi.adb b/src/ortho/mcode/ortho_code-x86-abi.adb
+index fd543ef2ed..2b0d778fa0 100644
+--- a/src/ortho/mcode/ortho_code-x86-abi.adb
++++ b/src/ortho/mcode/ortho_code-x86-abi.adb
+@@ -24,7 +24,6 @@ with Ortho_Code.Debug;
+ with Ortho_Code.Disps;
+ with Ortho_Code.Flags;
+ with Ortho_Code.Dwarf;
+-with Ortho_Code.X86; use Ortho_Code.X86;
+ with Ortho_Code.X86.Insns;
+ with Ortho_Code.X86.Emits;
+ with Binary_File;
+diff --git a/src/synth/netlists-disp_dot.ads b/src/synth/netlists-disp_dot.ads
+index 416554c766..01f07d41eb 100644
+--- a/src/synth/netlists-disp_dot.ads
++++ b/src/synth/netlists-disp_dot.ads
+@@ -16,8 +16,6 @@
+ --  You should have received a copy of the GNU General Public License
+ --  along with this program.  If not, see <gnu.org/licenses>.
+ 
+-with Netlists;
+-
+ package Netlists.Disp_Dot is
+    procedure Disp_Dot_Top_Module (M : Module);
+ end Netlists.Disp_Dot;
+diff --git a/src/synth/netlists-inference.ads b/src/synth/netlists-inference.ads
+index ae671a0ac4..8a6aef2f30 100644
+--- a/src/synth/netlists-inference.ads
++++ b/src/synth/netlists-inference.ads
+@@ -16,7 +16,6 @@
+ --  You should have received a copy of the GNU General Public License
+ --  along with this program.  If not, see <gnu.org/licenses>.
+ 
+-with Netlists; use Netlists;
+ with Netlists.Builders; use Netlists.Builders;
+ 
+ package Netlists.Inference is
+diff --git a/src/vhdl/translate/trans-rtis.adb b/src/vhdl/translate/trans-rtis.adb
+index 8f658ae39f..eeddad578b 100644
+--- a/src/vhdl/translate/trans-rtis.adb
++++ b/src/vhdl/translate/trans-rtis.adb
+@@ -21,7 +21,7 @@ with Vhdl.Utils; use Vhdl.Utils;
+ with Vhdl.Configuration;
+ with Libraries;
+ with Trans.Chap7;
+-with Trans; use Trans.Helpers;
++use Trans.Helpers;
+ with Trans.Helpers2; use Trans.Helpers2;
+ 
+ package body Trans.Rtis is
diff --git a/srcpkgs/ghdl/patches/install-paths.patch b/srcpkgs/ghdl/patches/install-paths.patch
deleted file mode 100644
index 6575b34ff396..000000000000
--- a/srcpkgs/ghdl/patches/install-paths.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-This is needed so that llvm and mcode backends can coexist.
-Taken and adapted from Debian (simplified).
-
-Description: Patch installation paths for Debian packaging
-Author: Andreas Bombe <aeb@debian.org>
-Last-Update: 2020-03-28
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-diff --git a/Makefile.in b/Makefile.in
-index e4923c2..c94853f 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -24,6 +24,7 @@ prefix=@prefix@
- backend=@backend@
- libdirsuffix=@libdirsuffix@
- libdirreverse=@libdirreverse@
-+incdirsuffix=@incdirsuffix@
- EXEEXT=@EXEEXT@
- SOEXT=@SOEXT@
- PIC_FLAGS=@PIC_FLAGS@
-@@ -46,8 +47,8 @@ INSTALL_DATA=install -m 644
- PWD=$(CURDIR)
- DESTDIR=
- bindir=$(prefix)/bin
--libdir=$(prefix)/lib
--incdir=$(prefix)/include
-+libdir=$(prefix)/$(libdirsuffix)
-+incdir=$(prefix)/$(incdirsuffix)
- MKDIR=mkdir
- LN=ln -s
- CP=cp
-@@ -200,7 +201,7 @@ libs.vhdl.mcode: ghdl_mcode$(EXEEXT)
- 	$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_mcode$(EXEEXT) GHDL_FLAGS="" VHDL_COPY_OBJS=no vhdl.libs.all
- 
- install.mcode.program: install.dirs ghdl_mcode$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl_mcode$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl_mcode$(EXEEXT) $(DESTDIR)$(bindir)/ghdl-mcode$(EXEEXT)
- 
- uninstall.mcode.program:
- 	$(RM) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
-@@ -372,8 +373,8 @@ oread-llvm$(EXEEXT): force
- 	 LLVM_CONFIG="$(LLVM_CONFIG)" CXX="$(CXX)"
- 
- install.llvm.program: install.dirs ghdl1-llvm$(EXEEXT) ghdl_llvm$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl1-llvm$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl-llvm$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(libdir)/ghdl1-llvm$(EXEEXT)
- 
- test.llvm: ghdl_llvm$(EXEEXT)
- 	cd $(srcdir)/testsuite; GHDL=$(CURDIR)/ghdl_llvm$(EXEEXT) ./testsuite.sh
-diff --git a/configure b/configure
-index 917215a..c1c1a6d 100755
---- a/configure
-+++ b/configure
-@@ -32,6 +32,7 @@ MAKE=${MAKE:-make}
- LDFLAGS=
- prefix=/usr/local
- libdirsuffix=lib/ghdl
-+incdirsuffix=include
- libdirreverse=../..
- gcc_src_dir=
- llvm_config=
-@@ -52,7 +53,7 @@ PIC_FLAGS=-fPIC
- show_help=no
- progname=$0
- 
--subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version"
-+subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version"
- 
- # Find srcdir
- srcdir=`dirname $progname`
-@@ -91,6 +92,8 @@ for opt do
-       ;;
-     --prefix=*)             prefix="$optarg";;
-     --srcdir=*)             srcdir="$optarg";;
-+    --libdir=*)             libdirsuffix="$optarg";;
-+    --incdir=*)             incdirsuffix="$optarg";;
-     --with-gcc=*)           gcc_src_dir="$optarg";     backend=gcc;;
-     --with-llvm=*)
-       echo "--with-llvm is deprecated, use --with-llvm-config"
-@@ -126,6 +129,8 @@ Usage: configure [options]
- Options [defaults in brackets]:
-   --prefix=PREFIX             install in PREFIX [$prefix]
-   --srcdir=SRCDIR             source code path [$srcdir]
-+  --libdir=LIBDIR             lib dir path relative to PREFIX [$libdirsuffix]
-+  --incdir=INCDIR             C include dir path relative to PREFIX [$incdirsuffix]
-   --with-gcc=DIR              use gcc backend from DIR
-   --with-llvm-config[=LLVM-CONFIG]  use llvm backend [llvm-config]
-   --with-backtrace-lib=LIB.a  link with libbacktrace LIB.a to display a
-@@ -400,10 +405,11 @@ echo "Generate default_paths.ads"
- sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \
-     -e "s%@COMPILER_DEBUG@%ghdl1-debug$EXEEXT%" \
-     -e "s%@COMPILER_MCODE@%ghdl1-mcode$EXEEXT%" \
--    -e "s%@COMPILER_LLVM@%ghdl1-llvm$EXEEXT%" \
-+    -e "s%@COMPILER_LLVM@%lib/ghdl/llvm/ghdl1-llvm$EXEEXT%" \
-     -e "s%@POST_PROCESSOR@%oread-$backend%" \
-     -e "s%@INSTALL_PREFIX@%$prefix%" \
-     -e "s%@LIB_PREFIX@%$libdirsuffix%" \
-+    -e "s%@INC_PREFIX@%$incdirsuffix%" \
-     -e "s%@SOEXT@%$SOEXT%" \
-     -e "s%@default_pic@%$default_pic%" \
-     < $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads
-diff --git a/scripts/gcc/Make-lang.in b/scripts/gcc/Make-lang.in
-index 108b05b..f9f3b16 100644
---- a/scripts/gcc/Make-lang.in
-+++ b/scripts/gcc/Make-lang.in
-@@ -104,7 +104,9 @@ vhdl/default_paths.ads: Makefile
- 	echo "   Compiler_Llvm  : constant String := \"\";" >> tmp-dpaths.ads
- 	echo "   Post_Processor : constant String := \"\";" >> tmp-dpaths.ads
- 	echo "   Lib_Prefix     : constant String :=">> tmp-dpaths.ads
--	echo "     \"lib/ghdl\";" >> tmp-dpaths.ads
-+	echo "     \"lib/ghdl/gcc\";" >> tmp-dpaths.ads
-+	echo "   Inc_Prefix     : constant String :=" >> tmp-dpaths.ads
-+	echo "     \"lib/ghdl/include\";" >> tmp-dpaths.ads
- 	echo "   Shared_Library_Extension : constant String :=">> tmp-dpaths.ads
- 	echo "     \"$(VHDL_SOEXT)\";" >> tmp-dpaths.ads
- 	echo "   Default_Pie : constant Boolean := False;" >> tmp-dpaths.ads
-@@ -159,8 +161,8 @@ vhdl.install-plugin:
- # Install the driver program as ghdl.
- vhdl.install-common: ghdl$(exeext) ghdl1$(exeext)
- 	-mkdir $(DESTDIR)$(bindir)
--	-$(RM) $(DESTDIR)$(bindir)/ghdl$(exeext)
--	$(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl$(exeext)
-+	-$(RM) $(DESTDIR)$(bindir)/ghdl-gcc$(exeext)
-+	$(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl-gcc$(exeext)
- 	-mkdir $(DESTDIR)$(libdir)
- 	-mkdir $(DESTDIR)$(libdir)/ghdl
- 	$(INSTALL_DATA) ../libbacktrace/.libs/libbacktrace.a $(DESTDIR)$(libdir)/ghdl
-diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in
-index ec6b68d..0b773ce 100644
---- a/src/ghdldrv/default_paths.ads.in
-+++ b/src/ghdldrv/default_paths.ads.in
-@@ -23,6 +23,8 @@ package Default_Paths is
-      "@INSTALL_PREFIX@";
-    Lib_Prefix : constant String :=
-      "@LIB_PREFIX@";
-+   Inc_Prefix : constant String :=
-+     "@INC_PREFIX@";
- 
-    Compiler_Gcc : constant String :=
-      "@COMPILER_GCC@";
-diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb
-index 3ecd831..36fdc6f 100644
---- a/src/ghdldrv/ghdlvpi.adb
-+++ b/src/ghdldrv/ghdlvpi.adb
-@@ -37,7 +37,7 @@ package body Ghdlvpi is
-       --  Compute install path
-       Ghdllocal.Set_Exec_Prefix_From_Program_Name;
- 
--      return Ghdllocal.Exec_Prefix.all & Directory_Separator & "include";
-+      return Ghdllocal.Exec_Prefix.all & Directory_Separator & Inc_Prefix;
-    end Get_Vpi_Include_Dir;
- 
-    --  Return the lib directory.
-@@ -48,7 +48,7 @@ package body Ghdlvpi is
-          Ghdllocal.Set_Exec_Prefix_From_Program_Name;
-       end if;
- 
--      return Ghdllocal.Exec_Prefix.all & Directory_Separator & "lib";
-+      return Ghdllocal.Exec_Prefix.all & Directory_Separator & Lib_Prefix;
-    end Get_Vpi_Lib_Dir;
- 
-    --  Return the lib directory, but unixify the path (for a unix shell in
diff --git a/srcpkgs/ghdl/patches/llvm12.patch b/srcpkgs/ghdl/patches/llvm12.patch
deleted file mode 100644
index 8d2f76bfda06..000000000000
--- a/srcpkgs/ghdl/patches/llvm12.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/configure b/configure
-index c1c1a6d..dad7c38 100755
---- a/configure
-+++ b/configure
-@@ -280,6 +280,7 @@ if test $backend = llvm; then
-        check_version  9.0 $llvm_version ||
-        check_version 10.0 $llvm_version ||
-        check_version 11.0 $llvm_version ||
-+       check_version 12.0 $llvm_version ||
-        false; then
-     echo "Debugging is enabled with llvm $llvm_version"
-   else
diff --git a/srcpkgs/ghdl/patches/musl.patch b/srcpkgs/ghdl/patches/musl.patch
index 298fba36ecd1..0f5dc41819c7 100644
--- a/srcpkgs/ghdl/patches/musl.patch
+++ b/srcpkgs/ghdl/patches/musl.patch
@@ -1,11 +1,58 @@
+From 7ab20a0919c2bd62182cd0f93ce3d275c6eb4492 Mon Sep 17 00:00:00 2001
+From: Guiltybyte <jordan.mcconnon5@mail.dcu.ie>
+Date: Thu, 9 Jun 2022 15:54:07 +0100
+Subject: [PATCH 1/2] Only enable backtrace on linux if glibc is present
+
+---
+ src/grt/config/jumps.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/grt/config/jumps.c b/src/grt/config/jumps.c
+index 9a2ee10467..9a2f25bef7 100644
 --- a/src/grt/config/jumps.c
 +++ b/src/grt/config/jumps.c
-@@ -29,7 +29,7 @@
+@@ -27,7 +27,7 @@
  #include <signal.h>
  #include <fcntl.h>
  
 -#if ( defined (__linux__) || defined (__APPLE__) ) && !defined (__ANDROID__)
-+#if ( defined (__linux__) && defined(__GLIBC__) || defined (__APPLE__) ) && !defined (__ANDROID__)
++#if ( (defined (__linux__) && defined (__GLIBC__) ) || defined (__APPLE__) ) && !defined (__ANDROID__)
  #define HAVE_BACKTRACE 1
  #include <sys/ucontext.h>
  #endif
+@@ -97,8 +97,10 @@ get_bt_from_ucontext (void *uctxt, struct backtrace_addrs *bt)
+ #ifdef HAVE_BACKTRACE
+   bt->size = backtrace (bt->addrs, sizeof (bt->addrs) / sizeof (void *));
+   bt->skip = 0;
++  #pragma message "HAVE_BACKTRACE=1"
+ #else
+   bt->size = 0;
++  #pragma message "HAVE_BACKTRACE=0"
+   return;
+ #endif
+ 
+
+From c58a8c30daa3c5a371ef7cfc52175319986efeaf Mon Sep 17 00:00:00 2001
+From: Guiltybyte <jordan.mcconnon5@mail.dcu.ie>
+Date: Thu, 9 Jun 2022 15:57:58 +0100
+Subject: [PATCH 2/2] deleted pragma messages
+
+---
+ src/grt/config/jumps.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/grt/config/jumps.c b/src/grt/config/jumps.c
+index 9a2f25bef7..0b01409e73 100644
+--- a/src/grt/config/jumps.c
++++ b/src/grt/config/jumps.c
+@@ -97,10 +97,8 @@ get_bt_from_ucontext (void *uctxt, struct backtrace_addrs *bt)
+ #ifdef HAVE_BACKTRACE
+   bt->size = backtrace (bt->addrs, sizeof (bt->addrs) / sizeof (void *));
+   bt->skip = 0;
+-  #pragma message "HAVE_BACKTRACE=1"
+ #else
+   bt->size = 0;
+-  #pragma message "HAVE_BACKTRACE=0"
+   return;
+ #endif
+ 
diff --git a/srcpkgs/ghdl/patches/respect-ldflags.patch b/srcpkgs/ghdl/patches/respect-ldflags.patch
deleted file mode 100644
index 61b27c4558aa..000000000000
--- a/srcpkgs/ghdl/patches/respect-ldflags.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Partially adapted from Debian. Do not ignore LDFLAGS we set.
-We do not want the -g part, as that is handled by xbps-src.
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -99,13 +99,14 @@
- #target=x86_64-apple-darwin
- #target=i386-pc-mingw32
- 
-+SHLIB_FLAGS=$(LDFLAGS)
- ifeq ($(SOEXT),.so)
--SHLIB_FLAGS=-Wl,-soname,$@
-+SHLIB_FLAGS+=-Wl,-soname,$@
- else ifeq ($(SOEXT),.dll)
--SHLIB_FLAGS=
-+SHLIB_FLAGS+=
- else ifeq ($(SOEXT),.dylib)
- # Allow the use of -rpath in executable
--SHLIB_FLAGS=-Wl,-install_name,@rpath/$@
-+SHLIB_FLAGS+=-Wl,-install_name,@rpath/$@
- endif
- 
- # Flags for libraries
---- a/configure
-+++ b/configure
-@@ -16,7 +16,7 @@
- CFLAGS=${CFLAGS:--g}
- GNATMAKE=${GNATMAKE:-gnatmake}
- MAKE=${MAKE:-make}
--LDFLAGS=
-+LDFLAGS=${LDFLAGS}
- prefix=/usr/local
- libdirsuffix=lib/ghdl
- incdirsuffix=include
diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template
index e756d8c3cd87..fe6ced70f9c5 100644
--- a/srcpkgs/ghdl/template
+++ b/srcpkgs/ghdl/template
@@ -6,51 +6,39 @@
 #
 pkgname=ghdl
 reverts="20181129_1"
-version=1.0.0
+version=2.0.0
 revision=1
 build_style=configure
-configure_args="--prefix=/usr --srcdir=.. --incdir=lib/ghdl/include"
+configure_args="--prefix=/usr --srcdir=.."
 makedepends="zlib-devel"
 short_desc="VHDL 2008/93/87 simulator"
 maintainer="m3tav3rse <mtvrs@tuta.io>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ghdl/ghdl"
+changelog="https://raw.githubusercontent.com/ghdl/ghdl/master/NEWS.md"
 distfiles="https://github.com/ghdl/ghdl/archive/v${version}.tar.gz"
-checksum=cb424766fbe831ff41bec84016a6af0406d735c272b0b639d507c3503df30495
+checksum=5f258369e0faf730298916dfdc134c54c25a7a8a7f19722b7ce2717db19af6ec
 nocross=yes
 make_check=extended
 
 build_options="llvm mcode"
-build_options_default="llvm"
+#build_options_default=" "
 
 desc_option_llvm="Build the portable LLVM backend"
 desc_option_mcode="Build the x86-only mcode backend"
 
-if [ "$build_option_mcode" ]; then
-	depends=" ghdl-mcode>=${version}_${revision}"
-elif [ "$build_option_llvm" ]; then
-	depends=" ghdl-llvm>=${version}_${revision}"
-fi
-
 case "$XBPS_TARGET_MACHINE" in
 	i686*|x86_64*)
-		build_options_default+=" mcode"
+		build_options_default="mcode"
 		;;
 	*)
+		build_options_default="llvm"
 		if [ "$build_option_mcode" ]; then
 			broken="mcode backend only available on x86"
 		fi
 esac
 
-# get around xbps-src's broken 2-pass option eval
-unset subpackages
-
-if [ "$build_option_mcode" ]; then
-	subpackages+=" ghdl-mcode"
-fi
-
 if [ "$build_option_llvm" ]; then
-	subpackages+=" ghdl-llvm"
 	makedepends+=" llvm12"
 fi
 
@@ -58,14 +46,13 @@ do_configure() {
 	if [ "$build_option_mcode" ]; then
 		mkdir -p build_mcode
 		cd build_mcode
-		../configure --libdir=lib/ghdl/mcode \
-			${configure_args}
+		../configure ${configure_args}
 		cd ..
 	fi
 	if [ "$build_option_llvm" ]; then
 		mkdir -p build_llvm
 		cd build_llvm
-		../configure --libdir=lib/ghdl/llvm --with-llvm-config \
+		../configure --with-llvm-config \
 			${configure_args}
 		cd ..
 	fi
@@ -87,14 +74,10 @@ do_install() {
 	if [ "$build_option_mcode" ]; then
 		make -C build_mcode DESTDIR=${DESTDIR} install
 		rm -rf ${DESTDIR}/usr/lib/ghdl/src
-		mv ${DESTDIR}/usr/lib/ghdl/mcode/src ${DESTDIR}/usr/lib/ghdl
-		ln -s ../src ${DESTDIR}/usr/lib/ghdl/mcode/src
 	fi
 	if [ "$build_option_llvm" ]; then
 		make -C build_llvm DESTDIR=${DESTDIR} install
 		rm -rf ${DESTDIR}/usr/lib/ghdl/src
-		mv ${DESTDIR}/usr/lib/ghdl/llvm/src ${DESTDIR}/usr/lib/ghdl
-		ln -s ../src ${DESTDIR}/usr/lib/ghdl/llvm/src
 	fi
 	# manpage is not installed by default
 	vman doc/ghdl.1
@@ -121,17 +104,13 @@ do_check() {
 }
 
 ghdl-mcode_package() {
-	short_desc+=" - mcode backend"
-	pkg_install() {
-		vmove usr/bin/ghdl-mcode
-		vmove usr/lib/ghdl/mcode
-	}
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
 }
 
 ghdl-llvm_package() {
-	short_desc+=" - LLVM backend"
-	pkg_install() {
-		vmove usr/bin/ghdl-llvm
-		vmove usr/lib/ghdl/llvm
-	}
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ghdl: update to 2.0.0.
  2022-11-19 13:18 [PR PATCH] ghdl: update to 2.0.0 paper42
@ 2022-11-27 13:10 ` sgn
  2022-11-29 14:29 ` [PR PATCH] [Updated] " sgn
  2022-12-03 12:11 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-11-27 13:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/40614#issuecomment-1328243963

Comment:
Please add `--disable-werror` to `configure_args`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] ghdl: update to 2.0.0.
  2022-11-19 13:18 [PR PATCH] ghdl: update to 2.0.0 paper42
  2022-11-27 13:10 ` sgn
@ 2022-11-29 14:29 ` sgn
  2022-12-03 12:11 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-11-29 14:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/paper42/void-packages ghdl2
https://github.com/void-linux/void-packages/pull/40614

ghdl: update to 2.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

TODO: test, restore subpackages

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40614.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghdl2-40614.patch --]
[-- Type: text/x-diff, Size: 25870 bytes --]

From 0054dce00c1aac942cb7b72211fcf2aae2adef72 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Fri, 18 Nov 2022 15:23:58 +0100
Subject: [PATCH] ghdl: update to 2.0.0.

---
 ...b764f49666616063d4239df83b5aed961fff.patch |  49 ------
 srcpkgs/ghdl/patches/curdir.patch             |  11 --
 srcpkgs/ghdl/patches/gcc11.patch              |  26 +++
 srcpkgs/ghdl/patches/gcc12.patch              |  68 ++++++++
 srcpkgs/ghdl/patches/gcc12b.patch             |  63 +++++++
 srcpkgs/ghdl/patches/install-paths.patch      | 164 ------------------
 srcpkgs/ghdl/patches/llvm12.patch             |  12 --
 srcpkgs/ghdl/patches/musl.patch               |  51 +++++-
 srcpkgs/ghdl/patches/respect-ldflags.patch    |  34 ----
 srcpkgs/ghdl/template                         |  51 ++----
 10 files changed, 221 insertions(+), 308 deletions(-)
 delete mode 100644 srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
 delete mode 100644 srcpkgs/ghdl/patches/curdir.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc11.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc12.patch
 create mode 100644 srcpkgs/ghdl/patches/gcc12b.patch
 delete mode 100644 srcpkgs/ghdl/patches/install-paths.patch
 delete mode 100644 srcpkgs/ghdl/patches/llvm12.patch
 delete mode 100644 srcpkgs/ghdl/patches/respect-ldflags.patch

diff --git a/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch b/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
deleted file mode 100644
index 23c5673e593e..000000000000
--- a/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 396eb764f49666616063d4239df83b5aed961fff Mon Sep 17 00:00:00 2001
-From: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
-Date: Mon, 26 Apr 2021 20:17:40 +0200
-Subject: [PATCH] Migrate deprecated DebugLoc::get to DILocation::get
-
----
- src/ortho/llvm6/llvm-cbindings.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp
-index f82845ffcd..98470d8fab 100644
---- a/src/ortho/llvm6/llvm-cbindings.cpp
-+++ b/src/ortho/llvm6/llvm-cbindings.cpp
-@@ -1254,7 +1254,7 @@ new_var_decl(ODnode *Res, OIdent Ident, OStorage Storage, OTnode Atype)
-          DebugCurrentLine, Atype->Dbg, true);
-       DBuilder->insertDeclare
-         (unwrap(Decl), D, DBuilder->createExpression(),
--         DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope),
-+         DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope),
-          unwrap(LLVMGetInsertBlock(DeclBuilder)));
-     }
- #endif
-@@ -1597,7 +1597,7 @@ start_subprogram_body(ODnodeSubprg *Func)
-     DebugCurrentScope = DebugCurrentSubprg;
- 
-     unwrap(Builder)->SetCurrentDebugLocation
--      (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
-+      (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
-   }
- 
-   if (FlagDebug) {
-@@ -1612,7 +1612,7 @@ start_subprogram_body(ODnodeSubprg *Func)
-          DebugCurrentFile, DebugCurrentLine, Inter->Dtype->Dbg, true);
-       DBuilder->insertDeclare
-         (unwrap(Var), D, DBuilder->createExpression(),
--         DebugLoc::get(DebugCurrentLine, 0, DebugCurrentSubprg),
-+         DILocation::get(DebugCurrentSubprg->getContext(), DebugCurrentLine, 0, DebugCurrentSubprg),
-          unwrap(LLVMGetInsertBlock(DeclBuilder)));
-       LLVMBuildStore(DeclBuilder, Inter->Ref, Var);
-       Inter->Ref = Var;
-@@ -2759,7 +2759,7 @@ new_debug_line_stmt (unsigned Line)
-   if (FlagDebugLines && Line != DebugCurrentLine) {
-     DebugCurrentLine = Line;
-     unwrap(Builder)->SetCurrentDebugLocation
--      (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
-+      (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
-   }
- #endif
- }
diff --git a/srcpkgs/ghdl/patches/curdir.patch b/srcpkgs/ghdl/patches/curdir.patch
deleted file mode 100644
index 12e7648e7d45..000000000000
--- a/srcpkgs/ghdl/patches/curdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@
- 
- INSTALL_PROGRAM=install -m 755
- INSTALL_DATA=install -m 644
--PWD?=$(shell pwd)
-+PWD=$(CURDIR)
- DESTDIR=
- bindir=$(prefix)/bin
- libdir=$(prefix)/lib
diff --git a/srcpkgs/ghdl/patches/gcc11.patch b/srcpkgs/ghdl/patches/gcc11.patch
new file mode 100644
index 000000000000..f13a4c634ef5
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc11.patch
@@ -0,0 +1,26 @@
+From f8b87697e8b893b6293ebbfc34670c32bfb49397 Mon Sep 17 00:00:00 2001
+From: Tristan Gingold <tgingold@free.fr>
+Date: Thu, 12 May 2022 18:16:38 +0200
+Subject: [PATCH] ghdllocal.adb: move pragma suppress.  Fix #2056
+
+---
+ src/ghdldrv/ghdllocal.adb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
+index 4ed71a590a..756589602b 100644
+--- a/src/ghdldrv/ghdllocal.adb
++++ b/src/ghdldrv/ghdllocal.adb
+@@ -1259,11 +1259,11 @@ package body Ghdllocal is
+             Src : String_Access;
+             Dst : String_Access;
+             Success : Boolean;
+-            pragma Unreferenced (Success);
+          begin
+             Src := new String'(Image (Dir) & Basename & Get_Object_Suffix.all);
+             Dst := new String'(Basename & Get_Object_Suffix.all);
+             Copy_File (Src.all, Dst.all, Success, Overwrite, Full);
++            pragma Unreferenced (Success);
+             --  Be silent in case of error.
+             Free (Src);
+             Free (Dst);
diff --git a/srcpkgs/ghdl/patches/gcc12.patch b/srcpkgs/ghdl/patches/gcc12.patch
new file mode 100644
index 000000000000..c22e1f099094
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc12.patch
@@ -0,0 +1,68 @@
+From 8c5689b93e68ac34cdf7dd089a3990ae22f0049c Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Sat, 14 May 2022 11:46:53 +0200
+Subject: [PATCH] fix: avoid "pragma Unreferenced given" warnings with GCC 12
+
+---
+ src/ghdldrv/ghdldrv.adb            | 2 +-
+ src/synth/synth-vhdl_stmts.adb     | 2 +-
+ src/vhdl/translate/trans-chap2.adb | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
+index e7990ed4d4..0313e60579 100644
+--- a/src/ghdldrv/ghdldrv.adb
++++ b/src/ghdldrv/ghdldrv.adb
+@@ -1192,7 +1192,6 @@ package body Ghdldrv is
+    procedure Perform_Action (Cmd : in out Command_Elab; Args : Argument_List)
+    is
+       Success : Boolean;
+-      pragma Unreferenced (Success);
+    begin
+       Set_Elab_Units (Cmd, "-e", Args);
+       Setup_Compiler (Cmd, False);
+@@ -1202,6 +1201,7 @@ package body Ghdldrv is
+          Link (Cmd, Add_Std => True, Disp_Only => False);
+       end if;
+       Delete_File (Filelist_Name.all, Success);
++      pragma Unreferenced (Success);
+    end Perform_Action;
+ 
+    --  Command Run.
+diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
+index 3e09c3318e..6fa2e92272 100644
+--- a/src/synth/synth-vhdl_stmts.adb
++++ b/src/synth/synth-vhdl_stmts.adb
+@@ -1933,11 +1933,11 @@ package body Synth.Vhdl_Stmts is
+                                            Assoc_Chain : Node)
+    is
+       Infos : Target_Info_Array (1 .. 0);
+-      pragma Unreferenced (Infos);
+       Init : Association_Iterator_Init;
+    begin
+       Init := Association_Iterator_Build (Inter_Chain, Assoc_Chain);
+       Synth_Subprogram_Association (Subprg_Inst, Caller_Inst, Init, Infos);
++      pragma Unreferenced (Infos);
+    end Synth_Subprogram_Association;
+ 
+    --  Create wires for out and inout interface variables.
+diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb
+index ff04a13b78..9e7e329157 100644
+--- a/src/vhdl/translate/trans-chap2.adb
++++ b/src/vhdl/translate/trans-chap2.adb
+@@ -1006,7 +1006,6 @@ package body Trans.Chap2 is
+       Info   : constant Ortho_Info_Acc := Get_Info (Spec);
+       Final  : Boolean;
+       Constr : O_Assoc_List;
+-      pragma Unreferenced (Final);
+    begin
+       if not Is_Nested then
+          Start_Subprogram_Body (Info.Package_Elab_Spec_Subprg);
+@@ -1039,6 +1038,7 @@ package body Trans.Chap2 is
+             (Info.Package_Spec_Scope'Access, Info.Package_Spec_Scope));
+       end if;
+       Chap4.Elab_Declaration_Chain (Spec, Final);
++      pragma Unreferenced (Final);
+ 
+       if not Is_Nested then
+          Close_Temp;
diff --git a/srcpkgs/ghdl/patches/gcc12b.patch b/srcpkgs/ghdl/patches/gcc12b.patch
new file mode 100644
index 000000000000..05ae2d78d979
--- /dev/null
+++ b/srcpkgs/ghdl/patches/gcc12b.patch
@@ -0,0 +1,63 @@
+From 4c3825daf54f81433e5de46cc25fdfac7189ffab Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Sat, 14 May 2022 11:45:56 +0200
+Subject: [PATCH] fix: avoid "unnecessary with of ancestor [-gnatwr]" with GCC
+ 12
+
+---
+ src/ortho/mcode/ortho_code-x86-abi.adb | 1 -
+ src/synth/netlists-disp_dot.ads        | 2 --
+ src/synth/netlists-inference.ads       | 1 -
+ src/vhdl/translate/trans-rtis.adb      | 2 +-
+ 4 files changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/ortho/mcode/ortho_code-x86-abi.adb b/src/ortho/mcode/ortho_code-x86-abi.adb
+index fd543ef2ed..2b0d778fa0 100644
+--- a/src/ortho/mcode/ortho_code-x86-abi.adb
++++ b/src/ortho/mcode/ortho_code-x86-abi.adb
+@@ -24,7 +24,6 @@ with Ortho_Code.Debug;
+ with Ortho_Code.Disps;
+ with Ortho_Code.Flags;
+ with Ortho_Code.Dwarf;
+-with Ortho_Code.X86; use Ortho_Code.X86;
+ with Ortho_Code.X86.Insns;
+ with Ortho_Code.X86.Emits;
+ with Binary_File;
+diff --git a/src/synth/netlists-disp_dot.ads b/src/synth/netlists-disp_dot.ads
+index 416554c766..01f07d41eb 100644
+--- a/src/synth/netlists-disp_dot.ads
++++ b/src/synth/netlists-disp_dot.ads
+@@ -16,8 +16,6 @@
+ --  You should have received a copy of the GNU General Public License
+ --  along with this program.  If not, see <gnu.org/licenses>.
+ 
+-with Netlists;
+-
+ package Netlists.Disp_Dot is
+    procedure Disp_Dot_Top_Module (M : Module);
+ end Netlists.Disp_Dot;
+diff --git a/src/synth/netlists-inference.ads b/src/synth/netlists-inference.ads
+index ae671a0ac4..8a6aef2f30 100644
+--- a/src/synth/netlists-inference.ads
++++ b/src/synth/netlists-inference.ads
+@@ -16,7 +16,6 @@
+ --  You should have received a copy of the GNU General Public License
+ --  along with this program.  If not, see <gnu.org/licenses>.
+ 
+-with Netlists; use Netlists;
+ with Netlists.Builders; use Netlists.Builders;
+ 
+ package Netlists.Inference is
+diff --git a/src/vhdl/translate/trans-rtis.adb b/src/vhdl/translate/trans-rtis.adb
+index 8f658ae39f..eeddad578b 100644
+--- a/src/vhdl/translate/trans-rtis.adb
++++ b/src/vhdl/translate/trans-rtis.adb
+@@ -21,7 +21,7 @@ with Vhdl.Utils; use Vhdl.Utils;
+ with Vhdl.Configuration;
+ with Libraries;
+ with Trans.Chap7;
+-with Trans; use Trans.Helpers;
++use Trans.Helpers;
+ with Trans.Helpers2; use Trans.Helpers2;
+ 
+ package body Trans.Rtis is
diff --git a/srcpkgs/ghdl/patches/install-paths.patch b/srcpkgs/ghdl/patches/install-paths.patch
deleted file mode 100644
index 6575b34ff396..000000000000
--- a/srcpkgs/ghdl/patches/install-paths.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-This is needed so that llvm and mcode backends can coexist.
-Taken and adapted from Debian (simplified).
-
-Description: Patch installation paths for Debian packaging
-Author: Andreas Bombe <aeb@debian.org>
-Last-Update: 2020-03-28
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-diff --git a/Makefile.in b/Makefile.in
-index e4923c2..c94853f 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -24,6 +24,7 @@ prefix=@prefix@
- backend=@backend@
- libdirsuffix=@libdirsuffix@
- libdirreverse=@libdirreverse@
-+incdirsuffix=@incdirsuffix@
- EXEEXT=@EXEEXT@
- SOEXT=@SOEXT@
- PIC_FLAGS=@PIC_FLAGS@
-@@ -46,8 +47,8 @@ INSTALL_DATA=install -m 644
- PWD=$(CURDIR)
- DESTDIR=
- bindir=$(prefix)/bin
--libdir=$(prefix)/lib
--incdir=$(prefix)/include
-+libdir=$(prefix)/$(libdirsuffix)
-+incdir=$(prefix)/$(incdirsuffix)
- MKDIR=mkdir
- LN=ln -s
- CP=cp
-@@ -200,7 +201,7 @@ libs.vhdl.mcode: ghdl_mcode$(EXEEXT)
- 	$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_mcode$(EXEEXT) GHDL_FLAGS="" VHDL_COPY_OBJS=no vhdl.libs.all
- 
- install.mcode.program: install.dirs ghdl_mcode$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl_mcode$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl_mcode$(EXEEXT) $(DESTDIR)$(bindir)/ghdl-mcode$(EXEEXT)
- 
- uninstall.mcode.program:
- 	$(RM) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
-@@ -372,8 +373,8 @@ oread-llvm$(EXEEXT): force
- 	 LLVM_CONFIG="$(LLVM_CONFIG)" CXX="$(CXX)"
- 
- install.llvm.program: install.dirs ghdl1-llvm$(EXEEXT) ghdl_llvm$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
--	$(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl1-llvm$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl-llvm$(EXEEXT)
-+	$(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(libdir)/ghdl1-llvm$(EXEEXT)
- 
- test.llvm: ghdl_llvm$(EXEEXT)
- 	cd $(srcdir)/testsuite; GHDL=$(CURDIR)/ghdl_llvm$(EXEEXT) ./testsuite.sh
-diff --git a/configure b/configure
-index 917215a..c1c1a6d 100755
---- a/configure
-+++ b/configure
-@@ -32,6 +32,7 @@ MAKE=${MAKE:-make}
- LDFLAGS=
- prefix=/usr/local
- libdirsuffix=lib/ghdl
-+incdirsuffix=include
- libdirreverse=../..
- gcc_src_dir=
- llvm_config=
-@@ -52,7 +53,7 @@ PIC_FLAGS=-fPIC
- show_help=no
- progname=$0
- 
--subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version"
-+subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version"
- 
- # Find srcdir
- srcdir=`dirname $progname`
-@@ -91,6 +92,8 @@ for opt do
-       ;;
-     --prefix=*)             prefix="$optarg";;
-     --srcdir=*)             srcdir="$optarg";;
-+    --libdir=*)             libdirsuffix="$optarg";;
-+    --incdir=*)             incdirsuffix="$optarg";;
-     --with-gcc=*)           gcc_src_dir="$optarg";     backend=gcc;;
-     --with-llvm=*)
-       echo "--with-llvm is deprecated, use --with-llvm-config"
-@@ -126,6 +129,8 @@ Usage: configure [options]
- Options [defaults in brackets]:
-   --prefix=PREFIX             install in PREFIX [$prefix]
-   --srcdir=SRCDIR             source code path [$srcdir]
-+  --libdir=LIBDIR             lib dir path relative to PREFIX [$libdirsuffix]
-+  --incdir=INCDIR             C include dir path relative to PREFIX [$incdirsuffix]
-   --with-gcc=DIR              use gcc backend from DIR
-   --with-llvm-config[=LLVM-CONFIG]  use llvm backend [llvm-config]
-   --with-backtrace-lib=LIB.a  link with libbacktrace LIB.a to display a
-@@ -400,10 +405,11 @@ echo "Generate default_paths.ads"
- sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \
-     -e "s%@COMPILER_DEBUG@%ghdl1-debug$EXEEXT%" \
-     -e "s%@COMPILER_MCODE@%ghdl1-mcode$EXEEXT%" \
--    -e "s%@COMPILER_LLVM@%ghdl1-llvm$EXEEXT%" \
-+    -e "s%@COMPILER_LLVM@%lib/ghdl/llvm/ghdl1-llvm$EXEEXT%" \
-     -e "s%@POST_PROCESSOR@%oread-$backend%" \
-     -e "s%@INSTALL_PREFIX@%$prefix%" \
-     -e "s%@LIB_PREFIX@%$libdirsuffix%" \
-+    -e "s%@INC_PREFIX@%$incdirsuffix%" \
-     -e "s%@SOEXT@%$SOEXT%" \
-     -e "s%@default_pic@%$default_pic%" \
-     < $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads
-diff --git a/scripts/gcc/Make-lang.in b/scripts/gcc/Make-lang.in
-index 108b05b..f9f3b16 100644
---- a/scripts/gcc/Make-lang.in
-+++ b/scripts/gcc/Make-lang.in
-@@ -104,7 +104,9 @@ vhdl/default_paths.ads: Makefile
- 	echo "   Compiler_Llvm  : constant String := \"\";" >> tmp-dpaths.ads
- 	echo "   Post_Processor : constant String := \"\";" >> tmp-dpaths.ads
- 	echo "   Lib_Prefix     : constant String :=">> tmp-dpaths.ads
--	echo "     \"lib/ghdl\";" >> tmp-dpaths.ads
-+	echo "     \"lib/ghdl/gcc\";" >> tmp-dpaths.ads
-+	echo "   Inc_Prefix     : constant String :=" >> tmp-dpaths.ads
-+	echo "     \"lib/ghdl/include\";" >> tmp-dpaths.ads
- 	echo "   Shared_Library_Extension : constant String :=">> tmp-dpaths.ads
- 	echo "     \"$(VHDL_SOEXT)\";" >> tmp-dpaths.ads
- 	echo "   Default_Pie : constant Boolean := False;" >> tmp-dpaths.ads
-@@ -159,8 +161,8 @@ vhdl.install-plugin:
- # Install the driver program as ghdl.
- vhdl.install-common: ghdl$(exeext) ghdl1$(exeext)
- 	-mkdir $(DESTDIR)$(bindir)
--	-$(RM) $(DESTDIR)$(bindir)/ghdl$(exeext)
--	$(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl$(exeext)
-+	-$(RM) $(DESTDIR)$(bindir)/ghdl-gcc$(exeext)
-+	$(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl-gcc$(exeext)
- 	-mkdir $(DESTDIR)$(libdir)
- 	-mkdir $(DESTDIR)$(libdir)/ghdl
- 	$(INSTALL_DATA) ../libbacktrace/.libs/libbacktrace.a $(DESTDIR)$(libdir)/ghdl
-diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in
-index ec6b68d..0b773ce 100644
---- a/src/ghdldrv/default_paths.ads.in
-+++ b/src/ghdldrv/default_paths.ads.in
-@@ -23,6 +23,8 @@ package Default_Paths is
-      "@INSTALL_PREFIX@";
-    Lib_Prefix : constant String :=
-      "@LIB_PREFIX@";
-+   Inc_Prefix : constant String :=
-+     "@INC_PREFIX@";
- 
-    Compiler_Gcc : constant String :=
-      "@COMPILER_GCC@";
-diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb
-index 3ecd831..36fdc6f 100644
---- a/src/ghdldrv/ghdlvpi.adb
-+++ b/src/ghdldrv/ghdlvpi.adb
-@@ -37,7 +37,7 @@ package body Ghdlvpi is
-       --  Compute install path
-       Ghdllocal.Set_Exec_Prefix_From_Program_Name;
- 
--      return Ghdllocal.Exec_Prefix.all & Directory_Separator & "include";
-+      return Ghdllocal.Exec_Prefix.all & Directory_Separator & Inc_Prefix;
-    end Get_Vpi_Include_Dir;
- 
-    --  Return the lib directory.
-@@ -48,7 +48,7 @@ package body Ghdlvpi is
-          Ghdllocal.Set_Exec_Prefix_From_Program_Name;
-       end if;
- 
--      return Ghdllocal.Exec_Prefix.all & Directory_Separator & "lib";
-+      return Ghdllocal.Exec_Prefix.all & Directory_Separator & Lib_Prefix;
-    end Get_Vpi_Lib_Dir;
- 
-    --  Return the lib directory, but unixify the path (for a unix shell in
diff --git a/srcpkgs/ghdl/patches/llvm12.patch b/srcpkgs/ghdl/patches/llvm12.patch
deleted file mode 100644
index 8d2f76bfda06..000000000000
--- a/srcpkgs/ghdl/patches/llvm12.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/configure b/configure
-index c1c1a6d..dad7c38 100755
---- a/configure
-+++ b/configure
-@@ -280,6 +280,7 @@ if test $backend = llvm; then
-        check_version  9.0 $llvm_version ||
-        check_version 10.0 $llvm_version ||
-        check_version 11.0 $llvm_version ||
-+       check_version 12.0 $llvm_version ||
-        false; then
-     echo "Debugging is enabled with llvm $llvm_version"
-   else
diff --git a/srcpkgs/ghdl/patches/musl.patch b/srcpkgs/ghdl/patches/musl.patch
index 298fba36ecd1..0f5dc41819c7 100644
--- a/srcpkgs/ghdl/patches/musl.patch
+++ b/srcpkgs/ghdl/patches/musl.patch
@@ -1,11 +1,58 @@
+From 7ab20a0919c2bd62182cd0f93ce3d275c6eb4492 Mon Sep 17 00:00:00 2001
+From: Guiltybyte <jordan.mcconnon5@mail.dcu.ie>
+Date: Thu, 9 Jun 2022 15:54:07 +0100
+Subject: [PATCH 1/2] Only enable backtrace on linux if glibc is present
+
+---
+ src/grt/config/jumps.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/grt/config/jumps.c b/src/grt/config/jumps.c
+index 9a2ee10467..9a2f25bef7 100644
 --- a/src/grt/config/jumps.c
 +++ b/src/grt/config/jumps.c
-@@ -29,7 +29,7 @@
+@@ -27,7 +27,7 @@
  #include <signal.h>
  #include <fcntl.h>
  
 -#if ( defined (__linux__) || defined (__APPLE__) ) && !defined (__ANDROID__)
-+#if ( defined (__linux__) && defined(__GLIBC__) || defined (__APPLE__) ) && !defined (__ANDROID__)
++#if ( (defined (__linux__) && defined (__GLIBC__) ) || defined (__APPLE__) ) && !defined (__ANDROID__)
  #define HAVE_BACKTRACE 1
  #include <sys/ucontext.h>
  #endif
+@@ -97,8 +97,10 @@ get_bt_from_ucontext (void *uctxt, struct backtrace_addrs *bt)
+ #ifdef HAVE_BACKTRACE
+   bt->size = backtrace (bt->addrs, sizeof (bt->addrs) / sizeof (void *));
+   bt->skip = 0;
++  #pragma message "HAVE_BACKTRACE=1"
+ #else
+   bt->size = 0;
++  #pragma message "HAVE_BACKTRACE=0"
+   return;
+ #endif
+ 
+
+From c58a8c30daa3c5a371ef7cfc52175319986efeaf Mon Sep 17 00:00:00 2001
+From: Guiltybyte <jordan.mcconnon5@mail.dcu.ie>
+Date: Thu, 9 Jun 2022 15:57:58 +0100
+Subject: [PATCH 2/2] deleted pragma messages
+
+---
+ src/grt/config/jumps.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/grt/config/jumps.c b/src/grt/config/jumps.c
+index 9a2f25bef7..0b01409e73 100644
+--- a/src/grt/config/jumps.c
++++ b/src/grt/config/jumps.c
+@@ -97,10 +97,8 @@ get_bt_from_ucontext (void *uctxt, struct backtrace_addrs *bt)
+ #ifdef HAVE_BACKTRACE
+   bt->size = backtrace (bt->addrs, sizeof (bt->addrs) / sizeof (void *));
+   bt->skip = 0;
+-  #pragma message "HAVE_BACKTRACE=1"
+ #else
+   bt->size = 0;
+-  #pragma message "HAVE_BACKTRACE=0"
+   return;
+ #endif
+ 
diff --git a/srcpkgs/ghdl/patches/respect-ldflags.patch b/srcpkgs/ghdl/patches/respect-ldflags.patch
deleted file mode 100644
index 61b27c4558aa..000000000000
--- a/srcpkgs/ghdl/patches/respect-ldflags.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Partially adapted from Debian. Do not ignore LDFLAGS we set.
-We do not want the -g part, as that is handled by xbps-src.
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -99,13 +99,14 @@
- #target=x86_64-apple-darwin
- #target=i386-pc-mingw32
- 
-+SHLIB_FLAGS=$(LDFLAGS)
- ifeq ($(SOEXT),.so)
--SHLIB_FLAGS=-Wl,-soname,$@
-+SHLIB_FLAGS+=-Wl,-soname,$@
- else ifeq ($(SOEXT),.dll)
--SHLIB_FLAGS=
-+SHLIB_FLAGS+=
- else ifeq ($(SOEXT),.dylib)
- # Allow the use of -rpath in executable
--SHLIB_FLAGS=-Wl,-install_name,@rpath/$@
-+SHLIB_FLAGS+=-Wl,-install_name,@rpath/$@
- endif
- 
- # Flags for libraries
---- a/configure
-+++ b/configure
-@@ -16,7 +16,7 @@
- CFLAGS=${CFLAGS:--g}
- GNATMAKE=${GNATMAKE:-gnatmake}
- MAKE=${MAKE:-make}
--LDFLAGS=
-+LDFLAGS=${LDFLAGS}
- prefix=/usr/local
- libdirsuffix=lib/ghdl
- incdirsuffix=include
diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template
index e756d8c3cd87..de0e85b505bf 100644
--- a/srcpkgs/ghdl/template
+++ b/srcpkgs/ghdl/template
@@ -6,51 +6,39 @@
 #
 pkgname=ghdl
 reverts="20181129_1"
-version=1.0.0
+version=2.0.0
 revision=1
 build_style=configure
-configure_args="--prefix=/usr --srcdir=.. --incdir=lib/ghdl/include"
+configure_args="--prefix=/usr --srcdir=.. --disable-werror"
 makedepends="zlib-devel"
 short_desc="VHDL 2008/93/87 simulator"
 maintainer="m3tav3rse <mtvrs@tuta.io>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ghdl/ghdl"
+changelog="https://raw.githubusercontent.com/ghdl/ghdl/master/NEWS.md"
 distfiles="https://github.com/ghdl/ghdl/archive/v${version}.tar.gz"
-checksum=cb424766fbe831ff41bec84016a6af0406d735c272b0b639d507c3503df30495
+checksum=5f258369e0faf730298916dfdc134c54c25a7a8a7f19722b7ce2717db19af6ec
 nocross=yes
 make_check=extended
 
 build_options="llvm mcode"
-build_options_default="llvm"
+#build_options_default=" "
 
 desc_option_llvm="Build the portable LLVM backend"
 desc_option_mcode="Build the x86-only mcode backend"
 
-if [ "$build_option_mcode" ]; then
-	depends=" ghdl-mcode>=${version}_${revision}"
-elif [ "$build_option_llvm" ]; then
-	depends=" ghdl-llvm>=${version}_${revision}"
-fi
-
 case "$XBPS_TARGET_MACHINE" in
 	i686*|x86_64*)
-		build_options_default+=" mcode"
+		build_options_default="mcode"
 		;;
 	*)
+		build_options_default="llvm"
 		if [ "$build_option_mcode" ]; then
 			broken="mcode backend only available on x86"
 		fi
 esac
 
-# get around xbps-src's broken 2-pass option eval
-unset subpackages
-
-if [ "$build_option_mcode" ]; then
-	subpackages+=" ghdl-mcode"
-fi
-
 if [ "$build_option_llvm" ]; then
-	subpackages+=" ghdl-llvm"
 	makedepends+=" llvm12"
 fi
 
@@ -58,14 +46,13 @@ do_configure() {
 	if [ "$build_option_mcode" ]; then
 		mkdir -p build_mcode
 		cd build_mcode
-		../configure --libdir=lib/ghdl/mcode \
-			${configure_args}
+		../configure ${configure_args}
 		cd ..
 	fi
 	if [ "$build_option_llvm" ]; then
 		mkdir -p build_llvm
 		cd build_llvm
-		../configure --libdir=lib/ghdl/llvm --with-llvm-config \
+		../configure --with-llvm-config \
 			${configure_args}
 		cd ..
 	fi
@@ -87,14 +74,10 @@ do_install() {
 	if [ "$build_option_mcode" ]; then
 		make -C build_mcode DESTDIR=${DESTDIR} install
 		rm -rf ${DESTDIR}/usr/lib/ghdl/src
-		mv ${DESTDIR}/usr/lib/ghdl/mcode/src ${DESTDIR}/usr/lib/ghdl
-		ln -s ../src ${DESTDIR}/usr/lib/ghdl/mcode/src
 	fi
 	if [ "$build_option_llvm" ]; then
 		make -C build_llvm DESTDIR=${DESTDIR} install
 		rm -rf ${DESTDIR}/usr/lib/ghdl/src
-		mv ${DESTDIR}/usr/lib/ghdl/llvm/src ${DESTDIR}/usr/lib/ghdl
-		ln -s ../src ${DESTDIR}/usr/lib/ghdl/llvm/src
 	fi
 	# manpage is not installed by default
 	vman doc/ghdl.1
@@ -121,17 +104,13 @@ do_check() {
 }
 
 ghdl-mcode_package() {
-	short_desc+=" - mcode backend"
-	pkg_install() {
-		vmove usr/bin/ghdl-mcode
-		vmove usr/lib/ghdl/mcode
-	}
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
 }
 
 ghdl-llvm_package() {
-	short_desc+=" - LLVM backend"
-	pkg_install() {
-		vmove usr/bin/ghdl-llvm
-		vmove usr/lib/ghdl/llvm
-	}
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: ghdl: update to 2.0.0.
  2022-11-19 13:18 [PR PATCH] ghdl: update to 2.0.0 paper42
  2022-11-27 13:10 ` sgn
  2022-11-29 14:29 ` [PR PATCH] [Updated] " sgn
@ 2022-12-03 12:11 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-12-03 12:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

There's a merged pull request on the void-packages repository

ghdl: update to 2.0.0.
https://github.com/void-linux/void-packages/pull/40614

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

TODO: test, restore subpackages

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-03 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19 13:18 [PR PATCH] ghdl: update to 2.0.0 paper42
2022-11-27 13:10 ` sgn
2022-11-29 14:29 ` [PR PATCH] [Updated] " sgn
2022-12-03 12:11 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).