summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-06 05:06:12 +0000
committerSam James <sam@gentoo.org>2022-11-06 05:41:13 +0000
commit9963929bb82eee544a2d2029a66288b2b9ae507e (patch)
tree887b16131170ffcdc7e0fadfc091ce60ba0371b2 /app-text/opensp
parentdev-libs/leatherman: stabilize 1.12.9 for amd64, ppc, ppc64, sparc, x86 (diff)
downloadgentoo-9963929bb82eee544a2d2029a66288b2b9ae507e.tar.gz
gentoo-9963929bb82eee544a2d2029a66288b2b9ae507e.tar.bz2
gentoo-9963929bb82eee544a2d2029a66288b2b9ae507e.zip
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@gentoo.org>
Diffstat (limited to 'app-text/opensp')
-rw-r--r--app-text/opensp/files/opensp-1.5.2-configure-clang16.patch13
-rw-r--r--app-text/opensp/opensp-1.5.2-r8.ebuild (renamed from app-text/opensp/opensp-1.5.2-r7.ebuild)7
2 files changed, 19 insertions, 1 deletions
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
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 \