- Update to snapshot 0.1.9998+svn3613

new version required for Vbox 7.1

OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/kbuild?expand=0&rev=58
This commit is contained in:
Jan Engelhardt 2024-09-23 11:13:30 +00:00 committed by Git OBS Bridge
commit 6723e7e95c
20 changed files with 1011 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

14
_service Normal file
View File

@ -0,0 +1,14 @@
<services>
<service name="tar_scm" mode="manual">
<param name="filename">kbuild</param>
<param name="scm">svn</param>
<param name="url">http://svn.netlabs.org/repos/kbuild/trunk</param>
<param name="revision">3613</param>
<param name="versionformat">0.1.9998.svn%r</param>
</service>
<service name="recompress" mode="manual">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual"/>
</services>

48
aarch64.patch Normal file
View File

@ -0,0 +1,48 @@
---
kBuild/env.sh | 3 +++
kBuild/header.kmk | 4 ++--
src/lib/kStuff/include/k/kDefs.h | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
Index: kbuild-0.1.9998+svn3613/kBuild/env.sh
===================================================================
--- kbuild-0.1.9998+svn3613.orig/kBuild/env.sh
+++ kbuild-0.1.9998+svn3613/kBuild/env.sh
@@ -422,6 +422,9 @@ if test -z "$KBUILD_HOST_ARCH"; then
sparc64|sparcv9)
KBUILD_HOST_ARCH='sparc64'
;;
+ aarch64)
+ KBUILD_HOST_ARCH='aarch64'
+ ;;
*) echo "$0: unknown cpu/arch - $KBUILD_HOST_ARCH" 1>&${ERR_REDIR}
sleep 1
Index: kbuild-0.1.9998+svn3613/kBuild/header.kmk
===================================================================
--- kbuild-0.1.9998+svn3613.orig/kBuild/header.kmk
+++ kbuild-0.1.9998+svn3613/kBuild/header.kmk
@@ -197,8 +197,8 @@ KBUILD_BLD_TYPES := release profile debu
# build types. (PORTME)
#
KBUILD_OSES := darwin dos dragonfly freebsd gnuhurd gnukfbsd gnuknbsd haiku l4 linux netbsd nt openbsd os2 solaris win os-agnostic
-KBUILD_ARCHES := x86 amd64 noarch alpha arm32 arm64 hppa32 hppa64 ia64 m68k loongarch64 mips32 mips64 ppc32 ppc64 ppc64le riscv32 riscv64 s390 s390x sh32 sh64 sparc32 sparc64 x32
-KBUILD_ARCHES_64 := amd64 alpha arm64 hppa64 ia64 loongarch64 mips64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x32
+KBUILD_ARCHES := x86 amd64 noarch alpha arm32 arm64 aarch64 hppa32 hppa64 ia64 m68k loongarch64 mips32 mips64 ppc32 ppc64 ppc64le riscv32 riscv64 s390 s390x sh32 sh64 sparc32 sparc64 x32
+KBUILD_ARCHES_64 := amd64 alpha arm64 aarch64 hppa64 ia64 loongarch64 mips64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x32
KBUILD_ARCHES_32 := x86 arm32 hppa32 m68k mips32 ppc32 riscv32 s390 sh32 sparc32
Index: kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kDefs.h
===================================================================
--- kbuild-0.1.9998+svn3613.orig/src/lib/kStuff/include/k/kDefs.h
+++ kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kDefs.h
@@ -219,7 +219,7 @@
# define K_ARCH K_ARCH_ALPHA
# elif defined(__arm__) || defined(__arm32__)
# define K_ARCH K_ARCH_ARM_32
-# elif defined(__aarch64__) || defined(__arm64__)
+# elif defined(__arm64__) || defined(__aarch64__)
# define K_ARCH K_ARCH_ARM_64
# elif defined(__hppa__) && defined(__LP64__)
# define K_ARCH K_ARCH_PARISC_64

71
glob-lstat.patch Normal file
View File

@ -0,0 +1,71 @@
From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 24 Sep 2017 09:12:58 -0400
Subject: [PATCH] glob: Do not assume glibc glob internals.
It has been proposed that glibc glob start using gl_lstat,
which the API allows it to do. GNU 'make' should not get in
the way of this. See:
https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
* dir.c (local_lstat): New function, like local_stat.
(dir_setup_glob): Use it to initialize gl_lstat too, as the API
requires.
---
dir.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
Index: kbuild-0.1.9998svn3427/src/kmk/dir.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/kmk/dir.c
+++ kbuild-0.1.9998svn3427/src/kmk/dir.c
@@ -1559,6 +1559,32 @@ static int dir_exists_p (const char *dir
}
#endif
+/* Similarly for lstat. */
+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
+# ifndef VMS
+# ifndef HAVE_SYS_STAT_H
+int lstat (const char *path, struct stat *sbuf);
+# endif
+# else
+ /* We are done with the fake lstat. Go back to the real lstat */
+# ifdef lstat
+# undef lstat
+# endif
+# endif
+# define local_lstat lstat
+#elif defined(WINDOWS32)
+/* Windows doesn't support lstat(). */
+# define local_lstat local_stat
+#else
+static int
+local_lstat (const char *path, struct stat *buf)
+{
+ int e;
+ EINTRLOOP (e, lstat (path, buf));
+ return e;
+}
+#endif
+
void
dir_setup_glob (glob_t *gl)
{
@@ -1566,15 +1592,11 @@ dir_setup_glob (glob_t *gl)
gl->gl_readdir = read_dirstream;
gl->gl_closedir = free;
gl->gl_stat = local_stat;
-#ifdef __EMX__ /* The FreeBSD implementation actually uses gl_lstat!! */
- gl->gl_lstat = local_stat;
-#endif
+ gl->gl_lstat = local_lstat;
#ifdef GLOB_WITH_EXTENDED_KMK_MEMBERS
gl->gl_exists = file_exists_p;
gl->gl_isdir = dir_exists_p;
#endif
- /* We don't bother setting gl_lstat, since glob never calls it.
- The slot is only there for compatibility with 4.4 BSD. */
}
void

16
kBuild-c99-2.patch Normal file
View File

@ -0,0 +1,16 @@
The eval_buffer function expects the end of the string as the
(optional) last argument, not its length.
Index: src/kmk/loadapi.c
===================================================================
--- src/kmk/loadapi.c (revision 3600)
+++ src/kmk/loadapi.c (working copy)
@@ -59,7 +59,7 @@
install_variable_buffer (&pbuf, &plen);
s = xstrdup (buffer);
- eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strlen (s) /** @todo suboptimal */));
+ eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (s + strlen (s) /** @todo suboptimal */));
free (s);
restore_variable_buffer (pbuf, plen);

158
kBuild-c99.patch Normal file
View File

@ -0,0 +1,158 @@
Do not treat <strings.h> as an umbrella header for <string.h>
The two are distinct on GNU/Linux.
Also add missing #include <string.h> in some files.
Index: kbuild-0.1.9998svn3427/src/sed/lib/getline.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/getline.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/getline.c
@@ -9,10 +9,10 @@
#include <stdio.h>
#undef getline /* bird */
+#include <string.h>
+
#ifdef HAVE_STRINGS_H
# include <strings.h>
-#else
-# include <string.h>
#endif /* HAVE_STRINGS_H */
#ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/mkstemp.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c
@@ -2,10 +2,10 @@
#include "config.h"
#endif
+#include <string.h>
+
#ifdef HAVE_STRINGS_H
# include <strings.h>
-#else
-# include <string.h>
#endif /* HAVE_STRINGS_H */
#ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/lib/utils.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/utils.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/utils.c
@@ -19,16 +19,17 @@
#include "config.h"
#include <stdio.h>
+#include <unistd.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
+#include <string.h>
+
#ifdef HAVE_STRINGS_H
# include <strings.h>
-#else
-# include <string.h>
#endif /* HAVE_STRINGS_H */
#ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/sed/compile.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/compile.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/compile.c
@@ -22,14 +22,13 @@
#include "strverscmp.h"
#include <stdio.h>
#include <ctype.h>
+#include <string.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
# ifdef HAVE_MEMORY_H
# include <memory.h>
# endif
-#else
-# include <string.h>
#endif /* HAVE_STRINGS_H */
#ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/sed/execute.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/execute.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/execute.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <string.h>
#include <errno.h>
#ifndef errno
@@ -46,8 +47,6 @@ extern int errno;
#ifdef HAVE_STRINGS_H
# include <strings.h>
-#else
-# include <string.h>
#endif /*HAVE_STRINGS_H*/
#ifdef HAVE_MEMORY_H
# include <memory.h>
Index: kbuild-0.1.9998svn3427/src/sed/sed/fmt.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/fmt.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/fmt.c
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
+#include <string.h>
#if HAVE_LIMITS_H
# include <limits.h>
Index: kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/mbcs.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c
@@ -17,6 +17,7 @@
#include "sed.h"
#include <stdlib.h>
+#include <string.h>
int mb_cur_max;
Index: kbuild-0.1.9998svn3427/src/sed/sed/regexp.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/regexp.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/regexp.c
@@ -19,6 +19,7 @@
#include <ctype.h>
#include <stdio.h>
+#include <string.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
Index: kbuild-0.1.9998svn3427/src/sed/sed/sed.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/sed.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/sed.c
@@ -22,12 +22,10 @@
#include "sed.h"
-
#include <stdio.h>
+#include <string.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
-#else
-# include <string.h>
#endif /*HAVE_STRINGS_H*/
#ifdef HAVE_MEMORY_H
# include <memory.h>

View File

@ -0,0 +1,12 @@
Index: kbuild-0.1.9998svn3427/src/kmk/configure.ac
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/kmk/configure.ac
+++ kbuild-0.1.9998svn3427/src/kmk/configure.ac
@@ -121,6 +121,7 @@ pds_AC_DOS_PATHS
AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday],
[ac_cv_func_gettimeofday=no
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
+ #include <stdlib.h>
int main ()
{
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;

View File

@ -0,0 +1,48 @@
Fix some typical C99 compatibility issues in old configure scripts.
diff --git a/src/sed/config/getline.m4 b/src/sed/config/getline.m4
index ff8b5f4b..52d2e3e7 100644
--- a/src/sed/config/getline.m4
+++ b/src/sed/config/getline.m4
@@ -27,7 +27,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
if (!in)
return 1;
len = getline (&line, &siz, in);
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
}
], am_cv_func_working_getline=yes dnl The library version works.
, am_cv_func_working_getline=no dnl The library version does NOT work.
diff --git a/src/sed/configure b/src/sed/configure
index 0b01618f..b1172113 100755
--- a/src/sed/configure
+++ b/src/sed/configure
@@ -2593,7 +2593,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- '' \
+ '#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -3378,8 +3378,8 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
@@ -5747,7 +5747,7 @@ cat >>conftest.$ac_ext <<_ACEOF
if (!in)
return 1;
len = getline (&line, &siz, in);
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
}
_ACEOF

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:105718d323ada5d77d949b737918e3af987530cfcff7a9bbd5bdcbb94f5d8a9e
size 17614096

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42bf7a384cd8580f971d29ddd48d6b771e5f53c97ee9d9a73b607610ecb0d80d
size 2807755

13
kbuild-armv7l.diff Normal file
View File

@ -0,0 +1,13 @@
Index: kbuild-0.1.9998svn3110/kBuild/env.sh
===================================================================
--- kbuild-0.1.9998svn3110.orig/kBuild/env.sh
+++ kbuild-0.1.9998svn3110/kBuild/env.sh
@@ -356,7 +356,7 @@ if test -z "$KBUILD_HOST_ARCH"; then
hppa64|parisc64)
KBUILD_HOST_ARCH='hppa64'
;;
- ia64)
+ ia64|armv7l)
KBUILD_HOST_ARCH='ia64'
;;
ppc32|ppc|powerpc)

View File

@ -0,0 +1,30 @@
---
src/kmk/kmkbuiltin/expr.c | 2 ++
src/kmk/kmkbuiltin/kbuild_protection.c | 1 +
2 files changed, 3 insertions(+)
Index: kbuild-0.1.9998+svn3613/src/kmk/kmkbuiltin/expr.c
===================================================================
--- kbuild-0.1.9998+svn3613.orig/src/kmk/kmkbuiltin/expr.c
+++ kbuild-0.1.9998+svn3613/src/kmk/kmkbuiltin/expr.c
@@ -317,6 +317,8 @@ eval6(PEXPRINSTANCE pThis)
return v;
} else {
error(pThis);
+ /* dummy return in order to make the build checks happy (this will never be reached) */
+ return NULL;
}
/* NOTREACHED */
}
Index: kbuild-0.1.9998+svn3613/src/kmk/kmkbuiltin/kbuild_protection.c
===================================================================
--- kbuild-0.1.9998+svn3613.orig/src/kmk/kmkbuiltin/kbuild_protection.c
+++ kbuild-0.1.9998+svn3613/src/kmk/kmkbuiltin/kbuild_protection.c
@@ -29,6 +29,7 @@
#include "config.h"
#include <sys/types.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>

33
kbuild-man.diff Normal file
View File

@ -0,0 +1,33 @@
---
kmk.pod | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
Index: kbuild-0.1.9998+svn3613/kmk.pod
===================================================================
--- /dev/null
+++ kbuild-0.1.9998+svn3613/kmk.pod
@@ -0,0 +1,24 @@
+=head1 NAME
+
+kmk - framework for writing simple makefiles for complex tasks
+
+=head1 SYNOPSIS
+
+B<kmk> [S<I<options>>]
+
+=head1 DESCRIPTION
+
+kmk and its helper tools are an extension to GNU make to ease writing
+portable Makefile. There is not a lot of documentation though. A
+starting point is L<http://svn.netlabs.org/kbuild>.
+
+On SUSE the kBuild binaries can be found in F</usr/bin> and its data
+files in F</usr/share/kBuild>.
+
+=head1 SEE ALSO
+
+L<make(1)>
+
+=head1 AUTHOR
+
+Torsten Werner <twerner@debian.org>

17
kbuild-pthread.diff Normal file
View File

@ -0,0 +1,17 @@
---
Config.kmk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kbuild-0.1.9998svn3110/Config.kmk
===================================================================
--- kbuild-0.1.9998svn3110.orig/Config.kmk
+++ kbuild-0.1.9998svn3110/Config.kmk
@@ -340,7 +340,7 @@ else # !os2, !win, !nt
TEMPLATE_BIN_INCS += $(PATH_GNUMAKE_SRC)/glob /usr/local/include
endif
ifeq ($(KBUILD_TARGET),linux)
- TEMPLATE_BIN_LIBS += rt
+ TEMPLATE_BIN_LIBS += rt pthread
endif
endif

34
kbuild-timestamps.diff Normal file
View File

@ -0,0 +1,34 @@
---
src/kmk/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: kbuild-0.1.9998svn2784/src/kmk/main.c
===================================================================
--- kbuild-0.1.9998svn2784.orig/src/kmk/main.c
+++ kbuild-0.1.9998svn2784/src/kmk/main.c
@@ -3098,10 +3098,10 @@ print_usage (int bad)
#ifdef KMK
if (!remote_description || *remote_description == '\0')
- fprintf (usageto, _("\nThis program is built for %s/%s/%s [" __DATE__ " " __TIME__ "]\n"),
+ fprintf (usageto, _("\nThis program is built for %s/%s/%s\n"),
KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU);
else
- fprintf (usageto, _("\nThis program is built for %s/%s/%s (%s) [" __DATE__ " " __TIME__ "]\n"),
+ fprintf (usageto, _("\nThis program is built for %s/%s/%s (%s)\n"),
KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description);
#else /* !KMK */
if (!remote_description || *remote_description == '\0')
@@ -3783,10 +3783,10 @@ print_version (void)
# endif /* !KBUILD_PATH */
if (!remote_description || *remote_description == '\0')
- printf (_("%sThis program is a %s build, built for %s/%s/%s [" __DATE__ " " __TIME__ "]\n\n"),
+ printf (_("%sThis program is a %s build, built for %s/%s/%s\n\n"),
precede, KBUILD_TYPE, KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU);
else
- printf (_("%sThis program is a %s build, built for %s/%s/%s (%s) [" __DATE__ " " __TIME__ "]\n\n"),
+ printf (_("%sThis program is a %s build, built for %s/%s/%s (%s)\n\n"),
precede, KBUILD_TYPE, KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description);
#endif /* KMK */

13
kbuild-wrong-memset.patch Normal file
View File

@ -0,0 +1,13 @@
Index: kbuild-0.1.9998svn3110/src/lib/md5.c
===================================================================
--- kbuild-0.1.9998svn3110.orig/src/lib/md5.c
+++ kbuild-0.1.9998svn3110/src/lib/md5.c
@@ -144,7 +144,7 @@ void MD5Final(unsigned char digest[16],
MD5Transform(ctx->buf, (uint32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(struct MD5Context)); /* In case it's sensitive */
}

306
kbuild.changes Normal file
View File

@ -0,0 +1,306 @@
-------------------------------------------------------------------
Fri Sep 20 19:12:07 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to snapshot 0.1.9998+svn3613
* Qt6 support
- Switch all patches to the same patch level (p1)
- Delete kbuild-armv7l.diff (nonsensical change),
kBuild-configure-c99.patch, kBuild-configure-c99-2.patch,
kBuild-c99.patch, kBuild-c99-2.patch (obsolete)
- Rework ppc64le.patch: reuse ppc64 arch enumerator value;
implement unconditional trap macro
- Rework aarch64.patch: define aarch64 as a full alias of arm64
-------------------------------------------------------------------
Fri Jun 7 11:04:30 UTC 2024 - Martin Jambor <mjambor@suse.com>
- Make kbuild buildable with GCC 14 (boo#1225792)
* Changes to configure machinery so that it does not fail and detect
what it has detected with previous GCC versions.
(kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
* Add many missing includes (kBuild-c99.patch).
* Fix an actual bug in a call to eval_buffer that also manifests as
a C99 violation (kBuild-c99-2.patch).
-------------------------------------------------------------------
Thu Feb 22 12:41:22 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Tue Sep 1 10:40:11 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add byacc to BuildRequires fixes problems with bison 3.7 (bsc#1175268)
-------------------------------------------------------------------
Mon Aug 31 18:46:37 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to svn3427:
* 3 years of changes, see http://trac.netlabs.org/kbuild/timeline
- remove patches:
gcc10-fno-common-fix.patch, glob-interface.patch,
use-alloca.patch, kbuild-gcc7.patch, kbuild-glob.patch,
strsignal.patch: upstream or obsolete
-------------------------------------------------------------------
Mon Aug 31 14:25:14 UTC 2020 - Andreas Schwab <schwab@suse.de>
- strsignal.patch: use strsignal instead of sys_siglist (bsc#1175268)
-------------------------------------------------------------------
Fri Apr 3 05:46:51 UTC 2020 - Martin Liška <mliska@suse.cz>
- Add gcc10-fno-common-fix.patch in order to fix boo#1160274.
-------------------------------------------------------------------
Tue Dec 17 16:11:30 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
- Modernise spec file
-------------------------------------------------------------------
Sun Feb 10 20:19:51 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>
- Returned changelist back to a %doc.
-------------------------------------------------------------------
Sun Feb 10 18:09:43 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>
- Changed spec file to require readline-devel, not a specific libreadline version.
Thanks to Jan Engelhardt <jengelh@inai.de> for suggestion.
-------------------------------------------------------------------
Sat Feb 9 19:57:25 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>
- Add libreadline6 to the BuildRequires list.
- Changed %doc to %license for COPYING as directed by osc.
-------------------------------------------------------------------
Tue Feb 20 16:26:24 UTC 2018 - schwab@suse.de
- glob-lstat.patch: Do not assume glibc glob internals
- glob-interface.patch: Support GLIBC glob interface version 2
-------------------------------------------------------------------
Tue Feb 20 10:01:52 UTC 2018 - dmueller@suse.com
- add use-alloca.patch (bsc#1079838)
-------------------------------------------------------------------
Sun Oct 22 00:43:39 UTC 2017 - Larry.Finger@lwfinger.net
- Update to version 0.1.9998svn3110. VirtualBox 5.2.0 needs this one to build.
Changes detailed in upstream url from svn 2815 to 3110.
- Rebased patches
- Removed test for openSUSE 12.3 from spec file.
-------------------------------------------------------------------
Wed May 17 16:38:25 UTC 2017 - dimstar@opensuse.org
- Add kbuild-gcc7.patch: Fix build with GCC7 (boo#1039375): we also
need the definition of strlcpy on Linux; only *BSD has this by
default.
-------------------------------------------------------------------
Sat Nov 12 13:58:15 CET 2016 - ro@suse.de
- add aarch64.patch
-------------------------------------------------------------------
Thu Jul 21 23:23:07 UTC 2016 - luizluca@tre-sc.jus.br
- Update to version 0.1.9998svn2814:
Changes detailed in upstream url from svn 2784 to 2814.
http://trac.netlabs.org/kbuild/changeset?old_path=%2F&old=2784&new_path=%2F&new=2814
- Rebased patches:
ppc64le.patch
-------------------------------------------------------------------
Fri Jun 26 14:50:13 UTC 2015 - normand@linux.vnet.ibm.com
- Update to version 0.1.9998svn2784:
many changes detailed in upstream url from svn 2720 to 2784.
http://trac.netlabs.org/kbuild/timeline?from=2015-06-26&daysback=365
http://trac.netlabs.org/kbuild/changeset?old_path=%2F&old=2784&new_path=%2F&new=2720
- Dropped patches:
kbuild-kmk-makefile-am.patch
- Rebased patches:
kbuild-glob.patch
ppc64le.patch
kbuild-timestamps.diff
kbuild-pthread.diff
- All above changes allow to build package for ppc64/ppc64le archs
-------------------------------------------------------------------
Fri Jun 12 09:45:46 UTC 2015 - dvaleev@suse.com
- Rework ppc64le patch. Previous one was totally wrong.
- Modified patch ppc64le.patch
-------------------------------------------------------------------
Fri Jan 17 08:27:50 UTC 2014 - speilicke@suse.com
- Update to version 0.1.9998svn2720:
+ VirtualBox-4.3.6 requires revision 2689 or later
- Dropped patches:
+ warnings.diff (obsolete)
+ glibc-2.10.diff (solved differently upstream)
+ kbuild-func_missing_args.diff (obsolete)
- Rebased patches:
+ kbuild-pthread.diff (only offset)
+ kbuild-timestamps.diff (only offset)
+ kbuild-armv7l.diff (only offset)
+ kbuild-dummy_noreturn.diff (manually)
- Add patches:
+ kbuild-glob.patch: Include local glob implementation
+ kbuild-kmk-makefile-am.patch: Fix wrong file list
-------------------------------------------------------------------
Mon Dec 2 19:44:57 UTC 2013 - dvaleev@suse.com
- added patches:
* ppc64le.patch
- Make ppc64le architecture known
-------------------------------------------------------------------
Fri Apr 26 08:17:17 UTC 2013 - mmeister@suse.com
- Added makeinfo BuildRequire to fix build with new automake
-------------------------------------------------------------------
Fri Sep 28 07:56:06 UTC 2012 - seife+obs@b1-systems.com
- update to svn rev 2577
rev 2577 is minimum required by virtualbox-4.2.0, but newer
versions do not work (tested with rev 2662)
-------------------------------------------------------------------
Tue Dec 27 15:20:13 UTC 2011 - idonmez@suse.com
- Fix wrong size parameter in memset call
-------------------------------------------------------------------
Fri Dec 2 15:50:58 UTC 2011 - coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Mon Oct 3 22:56:19 UTC 2011 - joop.boonen@opensuse.org
- Added a patch to support armv7l
-------------------------------------------------------------------
Tue Aug 23 08:35:11 UTC 2011 - mseben@gmail.com
- updated to 0.1.9998 (svn revision 2538) in order to build
virtualbox 4.1.2, for changes check http://svn.netlabs.org/kbuild/timeline
-------------------------------------------------------------------
Tue Nov 3 19:09:22 UTC 2009 - coolo@novell.com
- updated patches to apply with fuzz=0
-------------------------------------------------------------------
Sun May 31 17:04:35 CEST 2009 - dmueller@suse.de
- fix build against glibc 2.10
-------------------------------------------------------------------
Mon Apr 20 11:30:46 CEST 2009 - mseben@suse.cz
- updated to 0.1.5svn2336
- updated Maintenance.kmk with a patch variable.
- backported 2320: qt3.kmk: Fixed PATH_SDK_QT3_LIB detection
- backported 2318: footer.kmk: No need to apply defpath to 2_OBJS
wholesale fashion, the handler(s) will do this
- backported 2316: *WATCOM*: Fixed RC commands.
- backported 2283: incdep.c: If we find LD_PRELOAD on linux, assume
the worst and disable threading
- backported 2277: kmk: Testcase for the $(if-expr 1==2,) crash.
- backported 2276: kmk: Do not crash if is missing the 3rd
argument, it is supposed to be optional...
- backported 2275: TAR.kmk,TARGZ.kmk,TARBZ2.kmk: Fixes and
additions (BZ2).
- backported 2274: footer.kmk,header.kmk: Enhanced tools inhertiance
- backported 2273: VCC80X86: TOOL_VCC80X86_LINK_LIBRARY_OUTPUT_OUTPUT
-> TOOL_VCC80X86_LINK_LIBRARY_OUTPUT_MAYBE. oops
- backported 2272: qt4.kmk: Look for the QT4 tools in the
alternative tools tree (x86) when present (amd64).
- backported 2271: header.kmk: KBUILD_DEVTOOLS, KBUILD_DEVTOOLS_TRG,
KBUILD_DEVTOOLS_HST, KBUILD_DEVTOOLS_TRG_ALT and KBUILD_DEVTOOLS_HST_ALT.
- updated func_missing_args.diff
-------------------------------------------------------------------
Wed Feb 11 14:18:04 CET 2009 - dmueller@suse.de
- merge with openSUSE Factory:
* remove macro from Version line again. Although it is nice,
it causes other problems
-------------------------------------------------------------------
Thu Jan 29 19:29:10 CET 2009 - suse-tux@gmx.de
- create SvnInfo.kmk before the build starts
-------------------------------------------------------------------
Thu Jan 29 17:14:24 CET 2009 - suse-tux@gmx.de
- updated to 0.1.5svn2270
- use macros inside the spec
- updated Patch1 (warnings.diff) - some parts are already fixed upstream
- removed Patch3 (kbuild-buildfix.diff) because it isn't needed anymore
- added Patch3 (kbuild-func_missing_args.diff) to prevent some compiler warnings
-------------------------------------------------------------------
Thu Dec 25 20:03:52 CET 2008 - suse-tux@gmx.de
- updated to 0.1.4svn2112
- added kbuild-buildfix.diff
-------------------------------------------------------------------
Tue Oct 14 18:28:33 CEST 2008 - meissner@suse.de
- fixed an implicit getcwd()
-------------------------------------------------------------------
Thu Sep 25 16:35:58 CEST 2008 - mkudlvasr@suse.cz
- merge into openSUSE Factory
-------------------------------------------------------------------
Thu Sep 18 19:53:10 CEST 2008 - suse-tux@gmx.de
- added Patch2 (kbuild-dummy_noreturn.diff) in order to make the build checks happy
-------------------------------------------------------------------
Sun Sep 14 20:13:08 CEST 2008 - suse-tux@gmx.de
- update to 0.1.3svn1785
-------------------------------------------------------------------
Sun Sep 14 00:39:02 CEST 2008 - suse-tux@gmx.de
- update to 0.1.3svn1775
- removed kbuild-r1599_KBUILD_SVN_INFO_KMK-fix.diff
-------------------------------------------------------------------
Tue May 6 23:52:43 CEST 2008 - dmueller@suse.de
- fix uninit return values
-------------------------------------------------------------------
Sun May 4 14:04:34 CEST 2008 - suse-tux@gmx.de
- update to svn1599 in order to build virtualbox-ose 1.6.0
- added kbuild-r1599_KBUILD_SVN_INFO_KMK-fix.diff
- start the bootstrap with kBuild/env.sh --full because this sets all required
variables automagically
-------------------------------------------------------------------
Mon Apr 7 20:59:27 CEST 2008 - dmueller@suse.de
- fix crash on x86_64
-------------------------------------------------------------------
Wed Apr 2 09:19:37 CEST 2008 - dmueller@suse.de
- Initial package (0.1.2svn1480)

86
kbuild.spec Normal file
View File

@ -0,0 +1,86 @@
#
# spec file for package kbuild
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _svnrev 3613
Name: kbuild
Version: 0.1.9998+svn3613
Release: 0
Summary: Framework for writing simple makefiles for complex tasks
License: GPL-2.0-or-later
Group: Development/Tools/Building
URL: https://svn.netlabs.org/kbuild
Source: %{name}-%{version}.tar.xz
Patch0: kbuild-man.diff
Patch2: kbuild-dummy_noreturn.diff
Patch5: kbuild-pthread.diff
Patch6: kbuild-timestamps.diff
Patch8: kbuild-wrong-memset.patch
Patch9: ppc64le.patch
Patch10: aarch64.patch
Patch13: glob-lstat.patch
BuildRequires: automake
BuildRequires: bison
BuildRequires: byacc
BuildRequires: flex
BuildRequires: libacl-devel
BuildRequires: makeinfo
BuildRequires: readline-devel
%description
The goals of the kBuild framework:
- Similar behavior across all supported platforms
- Flexibility, don't create unnecessary restrictions preventing ad-hoc
solutions
- Makefiles can be simple to write and maintain
- One configuration file for a subtree automatically included
- Target configuration templates as the primary mechanism for makefile
simplification
- Tools and SDKs for helping out the templates with flexibility
- Non-recursive makefile method by using sub-makefiles
%prep
%autosetup -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
cat > SvnInfo.kmk << EOF
KBUILD_SVN_REV := %{_svnrev}
KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
EOF
kBuild/env.sh --full make -f bootstrap.gmk SRCDIR=`pwd`
kBuild/env.sh kmk rebuild PATH_INS=`pwd`
pod2man -c 'kBuild for SUSE Linux' -r kBuild-%{version} kmk.pod > kmk.1
%install
kBuild/env.sh kmk NIX_INSTALL_DIR=%{_prefix} BUILD_TYPE=release PATH_INS=%{buildroot} LDFLAGS=-Wl,--as-needed install
install -m 644 -D kmk.1 %{buildroot}/%{_mandir}/man1/kmk.1
#remove execute flag, if occurs
chmod a-x %{buildroot}/%{_datadir}/kBuild/*/*kmk
rm -r %{buildroot}%{_datadir}/doc/kBuild-0.1.9998
%files
%license COPYING
%license kBuild/doc/COPYING-FDL-1.3
%doc ChangeLog
%doc kBuild/doc/QuickReference-kmk.*
%{_bindir}/*
%{_mandir}/man1/kmk.1%{?ext_man}
%{_datadir}/kBuild
%changelog

82
ppc64le.patch Normal file
View File

@ -0,0 +1,82 @@
---
kBuild/env.sh | 3 +++
kBuild/header.kmk | 6 +++---
src/lib/kStuff/include/k/kDefs.h | 5 ++++-
src/lib/kStuff/include/k/kHlpAssert.h | 2 ++
4 files changed, 12 insertions(+), 4 deletions(-)
Index: kbuild-0.1.9998+svn3613/kBuild/env.sh
===================================================================
--- kbuild-0.1.9998+svn3613.orig/kBuild/env.sh
+++ kbuild-0.1.9998+svn3613/kBuild/env.sh
@@ -383,6 +383,9 @@ if test -z "$KBUILD_HOST_ARCH"; then
m68k)
KBUILD_HOST_ARCH='m68k'
;;
+ ppc64le|powerpc64le)
+ KBUILD_HOST_ARCH='ppc64le'
+ ;;
mips32|mips)
KBUILD_HOST_ARCH='mips32'
;;
Index: kbuild-0.1.9998+svn3613/kBuild/header.kmk
===================================================================
--- kbuild-0.1.9998+svn3613.orig/kBuild/header.kmk
+++ kbuild-0.1.9998+svn3613/kBuild/header.kmk
@@ -197,8 +197,8 @@ KBUILD_BLD_TYPES := release profile debu
# build types. (PORTME)
#
KBUILD_OSES := darwin dos dragonfly freebsd gnuhurd gnukfbsd gnuknbsd haiku l4 linux netbsd nt openbsd os2 solaris win os-agnostic
-KBUILD_ARCHES := x86 amd64 noarch alpha arm32 arm64 hppa32 hppa64 ia64 m68k loongarch64 mips32 mips64 ppc32 ppc64 riscv32 riscv64 s390 s390x sh32 sh64 sparc32 sparc64 x32
-KBUILD_ARCHES_64 := amd64 alpha arm64 hppa64 ia64 loongarch64 mips64 ppc64 riscv64 s390x sh64 sparc64 x32
+KBUILD_ARCHES := x86 amd64 noarch alpha arm32 arm64 hppa32 hppa64 ia64 m68k loongarch64 mips32 mips64 ppc32 ppc64 ppc64le riscv32 riscv64 s390 s390x sh32 sh64 sparc32 sparc64 x32
+KBUILD_ARCHES_64 := amd64 alpha arm64 hppa64 ia64 loongarch64 mips64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x32
KBUILD_ARCHES_32 := x86 arm32 hppa32 m68k mips32 ppc32 riscv32 s390 sh32 sparc32
@@ -524,7 +524,7 @@ KBUILD_DEVTOOLS_HST ?= $(KBUILD_DEVTOOLS
KBUILD_DEVTOOLS_TRG_NOARCH ?= $(KBUILD_DEVTOOLS)/$(KBUILD_TARGET).noarch
KBUILD_DEVTOOLS_HST_NOARCH ?= $(KBUILD_DEVTOOLS)/$(KBUILD_HOST).noarch
-if1of ($(KBUILD_TARGET_ARCH), amd64 hppa64 mips64 ppc64 s390x sparc64)
+if1of ($(KBUILD_TARGET_ARCH), amd64 hppa64 mips64 ppc64 ppc64le s390x sparc64)
ifeq ($(KBUILD_TARGET_ARCH),amd64)
KBUILD_DEVTOOLS_TRG_ALT ?= $(KBUILD_DEVTOOLS)/$(KBUILD_TARGET).x86
else ifeq ($(KBUILD_TARGET_ARCH),hppa64)
Index: kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kDefs.h
===================================================================
--- kbuild-0.1.9998+svn3613.orig/src/lib/kStuff/include/k/kDefs.h
+++ kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kDefs.h
@@ -176,6 +176,7 @@
#define K_ARCH_POWERPC_32 ( 9 | K_ARCH_BIT_32 | K_ARCH_END_BI)
/** 64-bit PowerPC. */
#define K_ARCH_POWERPC_64 ( 9 | K_ARCH_BIT_64 | K_ARCH_END_BI)
+#define K_ARCH_POWERPC_64LE ( 9 | K_ARCH_BIT_64 | K_ARCH_END_LITTLE)
/** 32(31)-bit S390. */
#define K_ARCH_S390_32 (10 | K_ARCH_BIT_32 | K_ARCH_END_BIG)
/** 64-bit S390. */
@@ -232,8 +233,10 @@
# define K_ARCH K_ARCH_MIPS_64
# elif defined(__mips__)
# define K_ARCH K_ARCH_MIPS_32
-# elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__)
+# elif (defined(__powerpc64__) && defined(__BIG_ENDIAN__))|| defined(__ppc64__) || defined(__PPC64__)
# define K_ARCH K_ARCH_POWERPC_64
+# elif (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__))
+# define K_ARCH K_ARCH_POWERPC_64LE
# elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
# define K_ARCH K_ARCH_POWERPC_32
# elif defined(__riscv)
Index: kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kHlpAssert.h
===================================================================
--- kbuild-0.1.9998+svn3613.orig/src/lib/kStuff/include/k/kHlpAssert.h
+++ kbuild-0.1.9998+svn3613/src/lib/kStuff/include/k/kHlpAssert.h
@@ -59,6 +59,8 @@ extern "C" {
# define kHlpAssertBreakpoint() do { __asm__ __volatile__ ("unimp 0"); } while (0) /*??*/
#elif defined(__GNUC__) && (K_ARCH == K_ARCH_SPARC_64)
# define kHlpAssertBreakpoint() do { __asm__ __volatile__ ("illtrap 0"); } while (0) /*??*/
+#elif defined(__GNUC__) && (K_ARCH == K_ARCH_POWERPC_64 || K_ARCH == K_ARCH_POWERPC_64LE)
+# define kHlpAssertBreakpoint() do { __asm__ __volatile__ ("tw 31,0,0"); } while (0)
#else
# error "Port Me"
#endif