dev-scheme/elk: dev-scheme/elk: Fix passing of incompatible pointer type

And other C99 build fixes, along with updating EAPI 7 -> 8

Closes: https://bugs.gentoo.org/928675
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36397
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Brahmajit Das
2024-04-24 13:23:24 +00:00
committed by Maciej Barć
parent 626e2de372
commit 3c7e26f26d
2 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Scheme implementation designed to be embeddable extension to C/C++ applications"
HOMEPAGE="http://sam.zoy.org/elk/"
SRC_URI="http://sam.zoy.org/elk/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
PATCHES=(
"${FILESDIR}"/${P}-implicit-int-incompat-ptr.patch
"${FILESDIR}"/${P}-implicit-function.patch
"${FILESDIR}"/${P}-c99-build-fix.patch
)
src_configure() {
econf --disable-static
}
src_compile() {
# parallel build is broken
emake -j1
}
# tests are run automatically during make and fail with default src_test
src_test() {
echo "Tests already run during compile"
}
src_install() {
# parallel install is broken
emake -j1 DESTDIR="${D}" \
docsdir="${EPREFIX}"/usr/share/doc/${PF} \
examplesdir="${EPREFIX}"/usr/share/doc/${PF}/examples \
install
einstalldocs
docompress -x /usr/share/doc/${PF}
# no static archives
find "${D}" -name '*.la' -delete || die
}

View File

@@ -0,0 +1,33 @@
https://bugs.gentoo.org/928675
--- a/lib/xwidgets/xaw/list.c
+++ b/lib/xwidgets/xaw/list.c
@@ -2,15 +2,15 @@
#include <X11/Xaw/List.h>
-static const char **Get_List (Object x) {
+static char **Get_List (Object x) {
register int i, n;
register char *s;
- register const char **l;
+ register char **l;
Alloca_Begin;
Check_List (x);
n = Fast_Length (x);
- l = (const char **)XtMalloc ((n+1) * sizeof (char *));
+ l = (char **)XtMalloc ((n+1) * sizeof (char *));
for (i = 0; i < n; i++, x = Cdr (x)) {
Get_Strsym_Stack (Car (x), s);
l[i] = XtNewString (s);
--- a/include/extern.h
+++ b/include/extern.h
@@ -442,7 +442,7 @@ extern Object P_String_Fill (Object, Object);
extern Object P_Substringp (Object, Object);
extern Object P_CI_Substringp (Object, Object);
extern int String_Getc (Object);
-extern void String_Ungetc (Object, register int);
+extern void String_Ungetc (Object, int);
/* Symbols, variables, frequently used Scheme objects
*/