Erlang (all versions) doesn't package with ports-gcc-8, because:
- WxWidgets is built with headers made for ports-gcc-8, with
C++14 as the standard C++ version.
- Erlang requires WxWidgets but uses base-gcc, and during
configuration, it indeed outputs in $WRKSRC/lib/wx/config.log:
"/usr/local/include/wx-3.0/wx/strvararg.h:25:27: error:"
"type_traits: No such file or directory"
AFAIK base-gcc wants
- Meanwhile, it just builds without Wx, the issue appears when
packaging, because the Wx related files are not present.
It should have been easy if CHOSEN_COMPILER wasn't "irrelevant",
and if we were able to define it, but it would break the build on
clang archs.
What i'm proposing here is to bypass CHOSEN_COMPILER for !clang
arches. It unbreaks the packaging and ensures that WANTLIB is
proper, calling egcc/++ directly seems a bit too rough though.
It has been tested against Erlang 16 and 18, as my partial bulk
is still ongoing, i don't have resources to try them all.
Charlène.
Index: Makefile.inc
===
RCS file: /cvs/ports/lang/erlang/Makefile.inc,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile.inc
--- Makefile.inc2 Jun 2018 14:03:24 - 1.17
+++ Makefile.inc14 Apr 2019 22:19:51 -
@@ -40,6 +40,18 @@ CFLAGS +=-fno-pie
LDFLAGS += -nopie
.endif
+# Unbreak wx libs. WxWidgets is built with ports-gcc-8, clashing
+# with base-gcc-4.2 used to build Erlang because of different C++
+# headers used. We can't set COMPILER in a short, don't repeat
+# yourself way because COMPILER is "irrelevant" (see 18/Makefile
+# for example), so doing it here.
+.if ! ${PROPERTIES:Mclang}
+MODULES += gcc4
+COMPILER_LIBCXX = ${LIBECXX}
+CC = ${LOCALBASE}/bin/egcc
+CXX = ${LOCALBASE}/bin/eg++
+.endif
+
USE_GMAKE= Yes
MAKE_ENV +=DESTDIR=$(DESTDIR)
Index: 16/Makefile
===
RCS file: /cvs/ports/lang/erlang/16/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- 16/Makefile 2 Jan 2019 12:44:07 - 1.23
+++ 16/Makefile 14 Apr 2019 22:19:51 -
@@ -13,8 +13,8 @@ PKGNAME= erlang-$V
PKGNAME-main= erlang-16b.03
PKGNAME-wx=erlang-wx-16b.03
-REVISION-main= 16
-REVISION-wx= 4
+REVISION-main= 17
+REVISION-wx= 5
VERSION_SPEC= >=16v0,<17v0
PKGSPEC-main= erlang-${VERSION_SPEC}
Index: 17/Makefile
===
RCS file: /cvs/ports/lang/erlang/17/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- 17/Makefile 2 Jan 2019 12:44:07 - 1.23
+++ 17/Makefile 14 Apr 2019 22:19:51 -
@@ -13,8 +13,8 @@ PKGNAME= erlang-$V
PKGNAME-main= erlang-$V
PKGNAME-wx=erlang-wx-$V
-REVISION-main= 12
-REVISION-wx= 4
+REVISION-main= 13
+REVISION-wx= 5
VERSION_SPEC= >=17v0,<18v0
PKGSPEC-main= erlang-${VERSION_SPEC}
Index: 18/Makefile
===
RCS file: /cvs/ports/lang/erlang/18/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- 18/Makefile 2 Jan 2019 12:44:07 - 1.20
+++ 18/Makefile 14 Apr 2019 22:19:51 -
@@ -12,7 +12,8 @@ DISTNAME= otp_src_$V
PKGNAME= erlang-$V
PKGNAME-main= erlang-$V
PKGNAME-wx=erlang-wx-$V
-REVISION-wx= 0
+REVISION-main= 0
+REVISION-wx= 1
VERSION_SPEC= >=18v0,<19v0
PKGSPEC-main= erlang-${VERSION_SPEC}
Index: 19/Makefile
===
RCS file: /cvs/ports/lang/erlang/19/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- 19/Makefile 2 Jan 2019 12:44:07 - 1.13
+++ 19/Makefile 14 Apr 2019 22:19:51 -
@@ -13,8 +13,8 @@ PKGNAME= erlang-$V
PKGNAME-main= erlang-$V
PKGNAME-wx=erlang-wx-$V
-REVISION-main= 5
-REVISION-wx= 2
+REVISION-main= 6
+REVISION-wx= 3
VERSION_SPEC= >=19v0,<20v0
PKGSPEC-main= erlang-${VERSION_SPEC}
Index: 21/Makefile
===
RCS file: /cvs/ports/lang/erlang/21/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- 21/Makefile 2 Jan 2019 12:44:07 - 1.2
+++ 21/Makefile 14 Apr 2019 22:19:51 -
@@ -7,7 +7,8 @@ COMMENT-wx= WxWidgets bindings for Erlan
V= 21.2
MAJ_V= 21
-REVISION= 0
+REVISION= 1
+REVISION-wx= 0
EPOCH= 0
DISTNAME= otp_src_$V
PKGNAME= erlang-$V