The diff at the end lets me build an algol68g package on riscv64 - and
virtually any non-x86 architecture.  make package/test passes on
riscv64.

However, configure.ac only recognizes OpenBSD/amd64 as tested, and
thus builds a minimal version on other archs.  It doesn't make much
sense to me (all our platforms have IEEE754 FP now) and I'd rather
build the same package everywhere.  But that would require either
patching configure or using autoreconf.  Addressing this could be
delayed until it goes upstream.  Thoughts?

|Index: patches/patch-configure_ac
|===================================================================
|RCS file: patches/patch-configure_ac
|diff -N patches/patch-configure_ac
|--- /dev/null  1 Jan 1970 00:00:00 -0000
|+++ patches/patch-configure_ac 4 Jun 2024 07:28:27 -0000
|@@ -0,0 +1,15 @@
|+All our architectures have IEEE754 floating point, build the same set of
|+features on all of them.
|+
|+Index: configure.ac
|+--- configure.ac.orig
|++++ configure.ac
|+@@ -99,7 +99,7 @@ case "$host" in
|+ # OpenBSD.
|+ #
|+ 
|+-*86-*-openbsd* | *86_64-*-openbsd*) 
|++*-openbsd*)
|+   AC_DEFINE(BUILD_BSD, 1, [Define this if OpenBSD was detected]) 
|+   AC_DEFINE(HAVE_IEEE_754, 1, [Define this if IEEE_754 compliant]) 
|+   bsd_include_dirs=yes

Now fo the minimal fix.  The src/a68g/parser-scanner.c patch fixes the
cause of the build failure spotted on riscv64 and arm64[0]: when
building a minimal package, ncurses isn't used and thus FALSE from
ncurses.h isn't available.  Just use A68_FALSE as was probably
intended.

Bumping REVISION is cheap but probably not required.  ok for the
the diff below, or also for the full proposal?

Brian, do you wish to take care of upstreaming these fixes?  Else I
can handle it as time permits.


[0] http://build-failures.rhaalovely.net/aarch64/2024-05-29/lang/algol68g.log

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/algol68g/Makefile,v
diff -u -p -r1.16 Makefile
--- Makefile    21 May 2024 14:48:06 -0000      1.16
+++ Makefile    4 Jun 2024 07:28:27 -0000
@@ -1,5 +1,6 @@
 COMMENT =      Algol 68 Genie compiler-interpreter
 DISTNAME =     algol68g-3.5.2
+REVISION =     0
 CATEGORIES =   lang
 
 HOMEPAGE =     https://jmvdveer.home.xs4all.nl/algol.html
Index: patches/patch-src_a68g_parser-scanner_c
===================================================================
RCS file: patches/patch-src_a68g_parser-scanner_c
diff -N patches/patch-src_a68g_parser-scanner_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_a68g_parser-scanner_c     4 Jun 2024 07:28:27 -0000
@@ -0,0 +1,14 @@
+Don't depend on curses defining FALSE.
+
+Index: src/a68g/parser-scanner.c
+--- src/a68g/parser-scanner.c.orig
++++ src/a68g/parser-scanner.c
+@@ -856,7 +856,7 @@ char *pragment (int type, LINE_T ** ref_l, char **ref_
+         ADD_ONE_CHAR (c);
+         c = next_char (ref_l, ref_c, A68_FALSE);
+       }
+-      scan_next = FALSE;
++      scan_next = A68_FALSE;
+     } else if (IS_PRINT (c) || IS_SPACE (c)) {
+       ADD_ONE_CHAR (c);
+     }


-- 
jca

Reply via email to