commit:     d8a86c121faccde7c72e3a8052fcc68898be566a
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 29 14:03:08 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Nov 29 14:05:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8a86c12

dev-build/kbuild: add 0.1.9998.3660

Closes: https://bugs.gentoo.org/923130
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 dev-build/kbuild/Manifest                          |  2 +
 .../kbuild/files/kbuild-0.1.9998.3660-gcc-15.patch | 19 ++++++
 .../kbuild-0.1.9998.3660-int-conversion.patch      | 17 +++++
 dev-build/kbuild/kbuild-0.1.9998.3660.ebuild       | 75 ++++++++++++++++++++++
 4 files changed, 113 insertions(+)

diff --git a/dev-build/kbuild/Manifest b/dev-build/kbuild/Manifest
index 13279a1ec0d1..095b7cae2350 100644
--- a/dev-build/kbuild/Manifest
+++ b/dev-build/kbuild/Manifest
@@ -1,3 +1,5 @@
 DIST kbuild-0.1.9998.3499-fix-clang-16.patch.bz2 10271 BLAKE2B 
fe40a3a0afafefa10da6fe675eec72392fe6bcc318d1d8728363b9e855d10e11d0b7189f875cd2d496bf4871f87b96ed2ad6775e6968e044cc107dad23f5fcab
 SHA512 
8f11355f0bfdda431dba4cb4dcd73c5bf0b10d2380495fe91292846b57fb7f80711d711b0b229fb4a865512d90010a181d1e1ab7d2b57d1a1751ce79440b02dc
 DIST kbuild-0.1.9998.3499-src.tar.xz 2371580 BLAKE2B 
847c5c67ded37ca87228ff7164d6c7f2f670a57f2fd94d6d0bf4f8896266e7fe5442666c03dbda016564a52dc91d10be83f0d4b0ef5093db0f5210ac8d5f3aaa
 SHA512 
eebdcd1d2fa71313edd764d45a4aa3580078af22d7c5fed32d3d139a4f41c4e028282fdfdda0ee9b617ed0e8e63b8f5d065b3cf6647f08fe446560938b7577fc
 DIST kbuild-0.1.9998.3592-src.tar.xz 3975348 BLAKE2B 
4b1862238f6f6c35ba1b586e11e17baca3b66c4ba3a97b17168ced902d7fcc9f1baa9a4b8669489902346b9bab67095f4ff4d008187c36cd2ef4b7841d4134be
 SHA512 
b9ca1723b426db81571b048db5afe4b7c3d2d8a881003812e9a5f9df44c5109b628d77af415cf56eb44a8775c590a6f0e343efccf562ef83213c5525e081e59b
+DIST kbuild-0.1.9998.3660-fix-clang-16.patch.bz2 11762 BLAKE2B 
48c083a8c008da3cac4e0e175b65d487f4c2ed49bd46baa7fca8d847f8894b52bb5e21d5c99bab8d06141a2de0924e69b61930e63fb8061d54d291469d28afb7
 SHA512 
cc45721a69b970062a24c95e1426865c097df190c63bfe9cc86ebb76ba66a7f892c30e76d33298ec0d9e0a24ba81ac22e99de3eb5f0b6da3d53b95f4334b5820
+DIST kbuild-0.1.9998.3660-src.tar.xz 5281800 BLAKE2B 
6c8ca902efddbbdce4588a046edc243ad76bd56cc319c94b4ffb7c25dad7c3ad9e5f816c960c6d80a13374995469d6f1d4c91a20860321a2d12b2456c21ba26f
 SHA512 
d993de9a481a30aef7f4db2bbd6c19ffbeba6e5e505ae2ea63e7479007198d3eb89308860b90a5df8728997fb239ff5e553e6050c136468522c780a2a1e593e2

diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3660-gcc-15.patch 
b/dev-build/kbuild/files/kbuild-0.1.9998.3660-gcc-15.patch
new file mode 100644
index 000000000000..0ab71235a982
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3660-gcc-15.patch
@@ -0,0 +1,19 @@
+diff --git a/src/kmk/glob/fnmatch.c b/src/kmk/glob/fnmatch.c
+index b346e10..008a4a7 100644
+--- a/src/kmk/glob/fnmatch.c
++++ b/src/kmk/glob/fnmatch.c
+@@ -120,14 +120,6 @@ USA.  */
+ /* Avoid depending on library functions or files
+    whose names are inconsistent.  */
+ 
+-# if !defined _LIBC && !defined getenv && !defined _MSC_VER
+-extern char *getenv ();
+-# endif
+-
+-# ifndef errno
+-extern int errno;
+-# endif
+-
+ /* This function doesn't exist on most systems.  */
+ 
+ # if !defined HAVE___STRCHRNUL && !defined _LIBC

diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3660-int-conversion.patch 
b/dev-build/kbuild/files/kbuild-0.1.9998.3660-int-conversion.patch
new file mode 100644
index 000000000000..9e472abbfdd6
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3660-int-conversion.patch
@@ -0,0 +1,17 @@
+Fix int to pointer conversion for clang
+
+Note - this parameter was not actually used inside eval_buffer because of a 
define.
+
+Bug: https://bugs.gentoo.org/875449
+
+--- a/src/kmk/loadapi.c
++++ b/src/kmk/loadapi.c
+@@ -20,6 +20,8 @@
+ #include "variable.h"
+ #include "dep.h"
+ 
++#include <string.h>
++
+ /* Allocate a buffer in our context, so we can free it.  */
+ char *
+ gmk_alloc (unsigned int len)

diff --git a/dev-build/kbuild/kbuild-0.1.9998.3660.ebuild 
b/dev-build/kbuild/kbuild-0.1.9998.3660.ebuild
new file mode 100644
index 000000000000..36fda5b3b52b
--- /dev/null
+++ b/dev-build/kbuild/kbuild-0.1.9998.3660.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="A makefile framework for writing simple makefiles for complex 
tasks"
+HOMEPAGE="https://trac.netlabs.org/kbuild/wiki";
+SRC_URI="
+       https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${P}-src.tar.xz
+       
https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-0.1.9998.3660-fix-clang-16.patch.bz2
+"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+       sys-apps/texinfo
+       app-alternatives/lex
+       sys-devel/gettext
+       virtual/pkgconfig
+       app-alternatives/yacc
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.1.9998.3407-unknown_configure_opt.patch"
+       "${FILESDIR}/${PN}-0.1.5-gentoo-docdir.patch"
+       "${FILESDIR}/${PN}-0.1.9998_pre20110817-kash-link-pthread.patch"
+       "${FILESDIR}/${PN}-0.1.9998.3572-fix-bison.patch"
+       "${FILESDIR}/${PN}-0.1.9998.3572-fix-lto.patch"
+       "${FILESDIR}/${PN}-0.1.9998.3660-int-conversion.patch"
+       "${FILESDIR}/${PN}-0.1.9998.3499-fix-CC.patch"
+       "${FILESDIR}/${PN}-0.1.9998.3660-gcc-15.patch"
+
+       "${WORKDIR}/${PN}-0.1.9998.3660-fix-clang-16.patch"
+)
+
+pkg_setup() {
+       # Package fails with distcc (bug #255371)
+       export DISTCC_DISABLE=1
+}
+
+src_prepare() {
+       default
+
+       # 905419 - build fails if /bin/sh is something other than bash
+       sed 's:ln -s /bin/sh:ln -s /bin/bash:' -i bootstrap.gmk || die
+
+       # Add a file with the svn revision this package was pulled from
+       printf '%s\n' "KBUILD_SVN_REV := $(ver_cut 4)" \
+               > SvnInfo.kmk || die
+
+       cd "${S}/src/kmk" || die
+       eautoreconf
+       cd "${S}/src/sed" || die
+       eautoreconf
+
+       sed -e "s@_LDFLAGS\.$(tc-arch)*.*=@& ${LDFLAGS}@g" \
+               -e "s@_CFLAGS\.$(tc-arch)*.*=@& ${CFLAGS}@g" \
+               -e "s@_CXXFLAGS\.$(tc-arch)*.*=@& ${CXXFLAGS}@g" \
+               -i "${S}"/Config.kmk || die #332225
+       tc-export CC PKG_CONFIG RANLIB AR # bug #923130: AR must be both here 
and below
+}
+
+src_compile() {
+       kBuild/env.sh --full emake -f bootstrap.gmk AUTORECONF=true 
AR="$(tc-getAR)" \
+               || die "bootstrap failed"
+}
+
+src_install() {
+       kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="${D}" install \
+               || die "install failed"
+}

Reply via email to