lang/ratfor: fix build on platforms where char is unsigned

Turns out the code anticipates this problem and has support for using
"signed char" over "char" where "char" is unsigned by default.

Use "signed char" unconditionally to fix the port on all platforms.

While we are at it, pet portclippy.

PR:		258628, 283509
Approved by:	bofh
MFH:		2024Q4

(cherry picked from commit 147aeb1ee4)
This commit is contained in:
Robert Clausecker 2024-12-25 01:07:07 +01:00
parent cf23a14535
commit dbe8936bd3
2 changed files with 7 additions and 12 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= ratfor
PORTVERSION= 1985.06
PORTREVISION= 16
PORTREVISION= 17
CATEGORIES= lang
MASTER_SITES= LOCAL/obrien \
http://sepwww.stanford.edu/sep/prof/
@ -12,20 +12,15 @@ COMMENT= Rational FORTRAN compiler
LICENSE= PD
LICENSE_FILE= ${WRKSRC}/README
BROKEN_aarch64= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_armv6= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_armv7= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_powerpc= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_powerpc64= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_powerpc64le= ./ratfor -o test.f test.r keeps creating huge output file
BROKEN_powerpcspe= ./ratfor -o test.f test.r keeps creating huge output file
USES= fortran
ALL_TARGET= all tests
NO_WRKSUBDIR= yes
EXTRACT_CMD= ${CAT}
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= | ${SH}
ALL_TARGET= all tests
USES= fortran
NO_WRKSUBDIR= yes
PLIST_FILES= bin/ratfor bin/ratfor77 share/man/man1/ratfor.1.gz

View file

@ -5,7 +5,7 @@
#
-CFLAGS+= -DF77 -DS_CHAR="char"
+CFLAGS+= -DF77 -DS_CHAR="char" -Wno-error=return-type
+CFLAGS+= -DF77 -DS_CHAR="signed char" -Wno-error=return-type
#CFLAGS+= -DS_CHAR="char"
OBJS= rat4.o lookup.o getopt.o