commit: 9963929bb82eee544a2d2029a66288b2b9ae507e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Nov 6 05:06:12 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Nov 6 05:41:13 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9963929b
app-text/opensp: fix build with clang (16) Fix generic build with Clang but also with Clang 16. Closes: https://bugs.gentoo.org/767865 Signed-off-by: Sam James <sam <AT> gentoo.org> app-text/opensp/files/opensp-1.5.2-configure-clang16.patch | 13 +++++++++++++ .../{opensp-1.5.2-r7.ebuild => opensp-1.5.2-r8.ebuild} | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch b/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch new file mode 100644 index 000000000000..468d0f1d306d --- /dev/null +++ b/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch @@ -0,0 +1,13 @@ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -9,8 +9,9 @@ changequote([, ])dnl + AC_MSG_CHECKING(size of $1) + AC_CACHE_VAL(AC_CV_NAME, + [AC_TRY_RUN([#include <stdio.h> ++#include <stdlib.h> + #include <$2> +-main() ++int main(void) + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); diff --git a/app-text/opensp/opensp-1.5.2-r7.ebuild b/app-text/opensp/opensp-1.5.2-r8.ebuild similarity index 94% rename from app-text/opensp/opensp-1.5.2-r7.ebuild rename to app-text/opensp/opensp-1.5.2-r8.ebuild index 9f6b4f539bb4..743116acc69e 100644 --- a/app-text/opensp/opensp-1.5.2-r7.ebuild +++ b/app-text/opensp/opensp-1.5.2-r8.ebuild @@ -34,11 +34,14 @@ BDEPEND="nls? ( sys-devel/gettext ) PATCHES=( "${FILESDIR}"/${P}-fix-segfault.patch "${FILESDIR}"/${P}-c11-using.patch + "${FILESDIR}"/${P}-configure-clang16.patch ) src_prepare() { default - use prefix && eautoreconf + + # Needed for Clang 16 + eautoreconf } src_configure() { @@ -51,6 +54,8 @@ src_configure() { #ALLOWED_FLAGS="-O -O1 -O2 -pipe -g -march" strip-flags + append-cxxflags -std=gnu++11 + econf \ --enable-http \ --enable-default-catalog="${EPREFIX}"/etc/sgml/catalog \
