commit:     8c6a1df68f698376b7e5aa89a4850b803066c0ed
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 17 15:37:39 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 17 15:39:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6a1df6

app-text/mandoc: Pre-configure test results when cross-compiling

This should cover modern Linux with glibc or musl. It's not great, but this is
what upstream have given us to work with.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-text/mandoc/mandoc-1.14.6.ebuild | 43 +++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/app-text/mandoc/mandoc-1.14.6.ebuild 
b/app-text/mandoc/mandoc-1.14.6.ebuild
index e66c4176eec6..68fe015de4e6 100644
--- a/app-text/mandoc/mandoc-1.14.6.ebuild
+++ b/app-text/mandoc/mandoc-1.14.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -92,6 +92,47 @@ src_prepare() {
                MANM_TBL=mandoc_tbl
                MANM_MANCONF=mman.conf
        EOF
+       # Assuming modern Linux + glibc/musl and not BSD.
+       tc-is-cross-compiler && cat <<-EOF >> "configure.local"
+               HAVE_ATTRIBUTE=1
+               HAVE_CMSG=1
+               HAVE_DIRENT_NAMLEN=0
+               HAVE_EFTYPE=0
+               HAVE_ENDIAN=1
+               HAVE_ERR=1
+               HAVE_FTS_COMPARE_CONST=0
+               HAVE_FTS=$(usex elibc_glibc 1 0)
+               HAVE_GETLINE=1
+               HAVE_GETSUBOPT=1
+               HAVE_ISBLANK=1
+               HAVE_LESS_T=1
+               HAVE_MKDTEMP=1
+               HAVE_MKSTEMPS=1
+               HAVE_NANOSLEEP=1
+               HAVE_NTOHL=1
+               HAVE_O_DIRECTORY=1
+               HAVE_OHASH=0
+               HAVE_PATH_MAX=0
+               HAVE_PLEDGE=0
+               HAVE_PROGNAME=0
+               HAVE_REALLOCARRAY=1
+               HAVE_RECALLOCARRAY=0
+               HAVE_RECVMSG=1
+               HAVE_REWB_BSD=0
+               HAVE_REWB_SYSV=1
+               HAVE_SANDBOX_INIT=0
+               HAVE_STRCASESTR=$(usex elibc_glibc 1 0)
+               HAVE_STRINGLIST=0
+               HAVE_STRLCAT=$(usex elibc_glibc 1 0)
+               HAVE_STRLCPY=$(usex elibc_glibc 1 0)
+               HAVE_STRPTIME=1
+               HAVE_STRSEP=1
+               HAVE_STRTONUM=0
+               HAVE_SYS_ENDIAN=0
+               HAVE_VASPRINTF=1
+               HAVE_WCHAR=1
+               NEED_GNU_SOURCE=1
+       EOF
        if use cgi; then
                cp cgi.h{.example,} || die
        fi

Reply via email to