pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Patch: include version in OpenBSD target triplet



Hi all,

On OpenBSD, 'clang -dumpmachine' returns something like
amd64-unknown-openbsd7.1. Note that the OS version is included. In
pkgsrc we omit that: 'amd64--openbsd'.

Some software uses the version suffix, e.g. some checks in ncurses'
aclocal.m4. Without it the wrong decisions are made and we end up with
compile errors in the package (in this case 'undefined locale_t' due to
a bad _XOPEN_SOURCE value). I have only OpenBSD 7.1 available right now
but looking at the ncurses script I don't think this is specific to
that version.

This patch adds the OpenBSD version number to MACHINE_GNU_PLATFORM,
like the native behaviour, fixing ncurses and possibly other packages.

OK to commit? It seems to work fine for me but I'm not quite sure about
the full ramifications of this change.

Sijmen


Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.418
diff -u -r1.418 bsd.prefs.mk
--- bsd.prefs.mk        4 Apr 2022 11:23:18 -0000       1.418
+++ bsd.prefs.mk        22 Apr 2022 09:49:26 -0000
@@ -268,6 +268,7 @@
 
 .elif ${OPSYS} == "OpenBSD"
 LOWER_OPSYS?=		openbsd
+LOWER_OPSYS_VERSUFFIX?=	${OS_VERSION}
 
 .elif ${OPSYS} == "OSF1"
 OS_VERSION:=	${OS_VERSION:C/^V//}


Home | Main Index | Thread Index | Old Index