dev-embedded/arduino-ctags: fix configure phase for modern c

Closes: https://bugs.gentoo.org/900022
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
This commit is contained in:
Andreas K. Hüttel
2024-11-05 01:02:09 +01:00
parent b67739f35a
commit 6069bb281f
3 changed files with 43 additions and 1 deletions

View File

@@ -1,8 +1,10 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
MY_COMMIT_HASH="abc8fca7499f44c725122881cd380a88c37abe0e"
DESCRIPTION="Arduino private fork of dev-util/ctags"
HOMEPAGE="https://github.com/arduino/ctags"
@@ -15,8 +17,15 @@ KEYWORDS="amd64 x86"
PATCHES=(
"${FILESDIR}"/${PN}-20161123-gcc-unused-attribute.patch
"${FILESDIR}"/${PN}-20161123-implicit-exit.patch
"${FILESDIR}"/${PN}-20161123-implicit-int.patch
)
src_prepare() {
default
eautoreconf
}
src_configure() {
econf \
--disable-readlib \

View File

@@ -0,0 +1,21 @@
diff '--color=auto' -ruN ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac
--- ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac 2016-11-23 10:52:52.000000000 +0100
+++ ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac 2024-11-05 00:53:01.050413525 +0100
@@ -369,7 +369,8 @@
AC_EXEEXT
AC_MSG_CHECKING(if struct stat contains st_ino)
-AC_TRY_COMPILE([#include <sys/stat.h>], [
+AC_TRY_COMPILE([#include <sys/stat.h>
+#include <stdlib.h>], [
struct stat st;
stat(".", &st);
if (st.st_ino > 0)
@@ -449,6 +450,7 @@
AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
+#include <stdlib.h>
main() {
regex_t patbuf;
exit (regcomp (&patbuf, "/hello/", 0) != 0);

View File

@@ -0,0 +1,12 @@
diff '--color=auto' -ruN ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac
--- ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac 2024-11-05 00:55:57.281788938 +0100
+++ ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac 2024-11-05 00:59:21.852536947 +0100
@@ -451,7 +451,7 @@
#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
-main() {
+int main() {
regex_t patbuf;
exit (regcomp (&patbuf, "/hello/", 0) != 0);
}],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP))