git: c43b09081c53 - main - lang/gcc14-devel: Fix conflict on libgccjit.h and libgccjit++.h

From: Lorenzo Salvadore <salvadore_at_FreeBSD.org>
Date: Sat, 06 Apr 2024 19:15:00 UTC
The branch main has been updated by salvadore:

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

commit c43b09081c53651e478e226f77d25562852a8b8b
Author:     Trond Endrestøl <Trond.Endrestol@ximalas.info>
AuthorDate: 2024-04-06 12:44:39 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2024-04-06 19:14:53 +0000

    lang/gcc14-devel: Fix conflict on libgccjit.h and libgccjit++.h
    
    Some GCC ports install libgccjit.h and libgccjit++.h in the
    same directory.
    
    Fix conflict for lang/gcc14-devel.
    
    See also commit 0338e04504ee269b7a95e6707f1314bc1c4239fe that fixed the
    conflict in the same way for lang/gcc11.
    
    PR:             257060, 277383
---
 lang/gcc14-devel/Makefile                         |  1 +
 lang/gcc14-devel/files/patch-gcc_Makefile.in      | 19 +++++++++++++++++++
 lang/gcc14-devel/files/patch-gcc_jit_Make-lang.in | 14 ++++++++++++++
 lang/gcc14-devel/pkg-plist                        |  2 --
 4 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/lang/gcc14-devel/Makefile b/lang/gcc14-devel/Makefile
index 20caa11dce59..60562e38e9c0 100644
--- a/lang/gcc14-devel/Makefile
+++ b/lang/gcc14-devel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gcc
 PORTVERSION=	14.0.1.s20240331
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	lang
 MASTER_SITES=	GCC/snapshots/${DIST_VERSION}
diff --git a/lang/gcc14-devel/files/patch-gcc_Makefile.in b/lang/gcc14-devel/files/patch-gcc_Makefile.in
new file mode 100644
index 000000000000..127c87b1af79
--- /dev/null
+++ b/lang/gcc14-devel/files/patch-gcc_Makefile.in
@@ -0,0 +1,19 @@
+--- gcc/Makefile.in.orig	2024-02-25 22:32:27 UTC
++++ gcc/Makefile.in
+@@ -671,6 +671,8 @@ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/
+ 
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++# Directory in which the compiler finds headers.
++libsubincludedir = $(libdir)/gcc/$(target_alias)/$(version)/include
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -3821,6 +3823,7 @@ installdirs:
+ # $(libdir)/gcc/include isn't currently searched by cpp.
+ installdirs:
+ 	$(mkinstalldirs) $(DESTDIR)$(libsubdir)
++	$(mkinstalldirs) $(DESTDIR)$(libsubincludedir)
+ 	$(mkinstalldirs) $(DESTDIR)$(libexecsubdir)
+ 	$(mkinstalldirs) $(DESTDIR)$(bindir)
+ 	$(mkinstalldirs) $(DESTDIR)$(includedir)
diff --git a/lang/gcc14-devel/files/patch-gcc_jit_Make-lang.in b/lang/gcc14-devel/files/patch-gcc_jit_Make-lang.in
new file mode 100644
index 000000000000..d5fdd6103146
--- /dev/null
+++ b/lang/gcc14-devel/files/patch-gcc_jit_Make-lang.in
@@ -0,0 +1,14 @@
+--- gcc/jit/Make-lang.in.orig	2024-02-25 22:32:31 UTC
++++ gcc/jit/Make-lang.in
+@@ -360,9 +360,9 @@ jit.install-headers: installdirs
+ # Install hooks:
+ jit.install-headers: installdirs
+ 	$(INSTALL_DATA) $(srcdir)/jit/libgccjit.h \
+-	  $(DESTDIR)$(includedir)/libgccjit.h
++	  $(DESTDIR)$(libsubincludedir)/libgccjit.h
+ 	$(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \
+-	  $(DESTDIR)$(includedir)/libgccjit++.h
++	  $(DESTDIR)$(libsubincludedir)/libgccjit++.h
+ 
+ ifneq (,$(findstring mingw,$(target)))
+ jit.install-common: installdirs jit.install-headers
diff --git a/lang/gcc14-devel/pkg-plist b/lang/gcc14-devel/pkg-plist
index c32d1546a63e..8dcc98c6dd52 100644
--- a/lang/gcc14-devel/pkg-plist
+++ b/lang/gcc14-devel/pkg-plist
@@ -19,8 +19,6 @@ bin/gcov-tool%%SUFFIX%%
 bin/gfortran%%SUFFIX%%
 bin/lto-dump%%SUFFIX%%
 include/gcc%%SUFFIX%%/ISO_Fortran_binding.h
-include/libgccjit++.h
-include/libgccjit.h
 share/man/man1/cpp%%SUFFIX%%.1.gz
 share/man/man1/g++%%SUFFIX%%.1.gz
 share/man/man1/gcc%%SUFFIX%%.1.gz