This is absolutely gross, but it makes allegro and all its consumers
build with llvm 19. I don't want to commit this, but perhaps it helps
someone to figure out the correct fix.
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/allegro/Makefile,v
diff -u -p -r1.23 Makefile
--- Makefile 25 Feb 2024 13:40:36 -0000 1.23
+++ Makefile 30 Jan 2025 01:37:45 -0000
@@ -25,9 +25,11 @@ AUTOCONF_VERSION = 2.63
SUBST_VARS = V
-WANTLIB = X11 Xcursor Xext Xpm Xxf86dga Xxf86vm c m \
+WANTLIB = ${COMPILER_LIBCXX} X11 Xcursor Xext Xpm Xxf86dga
Xxf86vm c m \
sndio pthread
+LDFLAGS += ${COMPILER_LIBCXX:S/^/-l/}
+
CONFIGURE_ARGS = --enable-artsdigi=no \
--enable-esddigi=no \
--enable-jackdigi=no \
@@ -38,8 +40,10 @@ CONFIGURE_ARGS = --enable-artsdigi=no \
# XXX work around bogus configure entry with clang
CONFIGURE_ENV = allegro_cv_support_include_prefix=yes
+CONFIGURE_ENV += LDFLAGS="${LDFLAGS}"
+
.if ${MACHINE_ARCH} == "i386"
-CONFIGURE_ENV += LDFLAGS="-Wl,-znotext"
+LDFLAGS += -Wl,-znotext
.endif
MAKE_ENV += shared_major_minor=${LIBalleg_VERSION}
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/games/allegro/patches/patch-configure_in,v
diff -u -p -r1.4 patch-configure_in
--- patches/patch-configure_in 11 Mar 2022 19:04:05 -0000 1.4
+++ patches/patch-configure_in 30 Jan 2025 01:20:29 -0000
@@ -1,5 +1,6 @@
---- configure.in.orig Sat Jul 14 21:46:22 2007
-+++ configure.in Wed Jan 13 01:30:01 2010
+Index: configure.in
+--- configure.in.orig
++++ configure.in
@@ -28,26 +28,26 @@ allegro_enable_asm=yes)
dnl Enable 8-bpp color depth (default).
AC_ARG_ENABLE(color8,
@@ -177,3 +178,12 @@
fi
ALLEGRO_SFLAGS="-x assembler-with-cpp"
ALLEGRO_SHAREDLIB_CFLAGS="-fPIC -DALLEGRO_SHARED"
+@@ -858,7 +873,7 @@ AC_SUBST(ALLEGRO_SHAREDLIB_CFLAGS)
+
+ dnl How to compile C++ files.
+ if test "X$allegro_cv_support_cplusplus" = "Xyes"; then
+- CXX="$CC"
++ CXX="${CXX}"
+ CXXFLAGS="-fno-exceptions $CFLAGS"
+ ALLEGRO_DEBUG_CXXFLAGS="-fno-exceptions $ALLEGRO_DEBUG_CFLAGS"
+ ALLEGRO_PROFILE_CXXFLAGS="-fno-exceptions $ALLEGRO_PROFILE_CFLAGS"