diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2023-03-09 10:49:10 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2023-03-09 10:55:12 +0200 |
commit | c9520040d09ef46d20846bb4bc98029c8c88f6f0 (patch) | |
tree | 425e462c02874c1e8d1b5b3d9a81a283d1cbc849 /dev-util/kbuild | |
parent | app-admin/gkrellm: Stabilize 2.3.11-r4 x86, #900457 (diff) | |
download | gentoo-c9520040d09ef46d20846bb4bc98029c8c88f6f0.tar.gz gentoo-c9520040d09ef46d20846bb4bc98029c8c88f6f0.tar.bz2 gentoo-c9520040d09ef46d20846bb4bc98029c8c88f6f0.zip |
dev-util/kbuild: fix compilation with clang-16
Closes: https://bugs.gentoo.org/898770
Bug: https://bugs.gentoo.org/895836
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'dev-util/kbuild')
-rw-r--r-- | dev-util/kbuild/Manifest | 1 | ||||
-rw-r--r-- | dev-util/kbuild/kbuild-0.1.9998.3499-r3.ebuild | 79 | ||||
-rw-r--r-- | dev-util/kbuild/kbuild-0.1.9998.3572-r3.ebuild (renamed from dev-util/kbuild/kbuild-0.1.9998.3572-r2.ebuild) | 9 |
3 files changed, 87 insertions, 2 deletions
diff --git a/dev-util/kbuild/Manifest b/dev-util/kbuild/Manifest index 4632dc45dd6d..4d02cb222e1c 100644 --- a/dev-util/kbuild/Manifest +++ b/dev-util/kbuild/Manifest @@ -1,2 +1,3 @@ +DIST kbuild-0.1.9998.3499-fix-clang.patch.bz2 10161 BLAKE2B a6f5a5c35553825682db92ab5ab0e1bd638e246fd1fa62dfaf97085e33940ca41c8ab29463ebb61d00c19c6775767ddb8fdfe9c28425741e1616cc43799631a5 SHA512 1a3a7509d899ba2d827329dd6658a67ee93520e89b51ea42f3268053c732785d0c7f808961bde5d5312cc604bedaf617df50eadf4efbb8c4216fe404d378473e DIST kbuild-0.1.9998.3499-src.tar.xz 2371580 BLAKE2B 847c5c67ded37ca87228ff7164d6c7f2f670a57f2fd94d6d0bf4f8896266e7fe5442666c03dbda016564a52dc91d10be83f0d4b0ef5093db0f5210ac8d5f3aaa SHA512 eebdcd1d2fa71313edd764d45a4aa3580078af22d7c5fed32d3d139a4f41c4e028282fdfdda0ee9b617ed0e8e63b8f5d065b3cf6647f08fe446560938b7577fc DIST kbuild-0.1.9998.3572-src.tar.xz 3973848 BLAKE2B 103e42d719fd77bc5c55aea48bdfd01c8ad136529cc76cc8c1297f87e21e5d4e2e7149f9321c5174808613a84331dbea8bb4c0a7662eb2de9e1045c8ad365047 SHA512 96bb5e1759990bf3acaca4b0ba7c02926c6607b0cd94f7fca222b13eee5c3364c64b35e3473c5cee45fa094cb2b851ac9f3a3a9fe60cff894baf46238ccb4006 diff --git a/dev-util/kbuild/kbuild-0.1.9998.3499-r3.ebuild b/dev-util/kbuild/kbuild-0.1.9998.3499-r3.ebuild new file mode 100644 index 000000000000..b593d5a5406c --- /dev/null +++ b/dev-util/kbuild/kbuild-0.1.9998.3499-r3.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2023 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.3499-fix-clang.patch.bz2 +" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +BDEPEND=" + sys-apps/texinfo + sys-devel/flex + 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_pre20120806-qa.patch" + "${FILESDIR}/${PN}-0.1.9998_pre20110817-kash-link-pthread.patch" + "${FILESDIR}/${PN}-0.1.9998.3499-gold.patch" + + # Please check on version bumps if this can be removed + "${FILESDIR}/${PN}-0.1.9998.3499-kash-no_separate_parser_allocator.patch" + + "${FILESDIR}/${PN}-0.1.9998.3572-fix-bison.patch" + "${FILESDIR}/${PN}-0.1.9998.3572-fix-lto.patch" + "${FILESDIR}/${PN}-0.1.9998.3499-implicit-function-declaration.patch" + "${FILESDIR}/${PN}-0.1.9998.3499-int-conversion.patch" + "${FILESDIR}/${PN}-0.1.9998.3499-fix-CC.patch" + + "${WORKDIR}/${PN}-0.1.9998.3499-fix-clang.patch" +) + +pkg_setup() { + # Package fails with distcc (bug #255371) + export DISTCC_DISABLE=1 +} + +src_prepare() { + default + + # 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 does not work here +} + +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" +} diff --git a/dev-util/kbuild/kbuild-0.1.9998.3572-r2.ebuild b/dev-util/kbuild/kbuild-0.1.9998.3572-r3.ebuild index 3b479cd2d78d..2b1532f82b37 100644 --- a/dev-util/kbuild/kbuild-0.1.9998.3572-r2.ebuild +++ b/dev-util/kbuild/kbuild-0.1.9998.3572-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,7 +7,10 @@ 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" +SRC_URI=" + https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${P}-src.tar.xz + https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-0.1.9998.3499-fix-clang.patch.bz2 +" LICENSE="GPL-3+" SLOT="0" @@ -32,6 +35,8 @@ PATCHES=( "${FILESDIR}/${PN}-0.1.9998.3499-implicit-function-declaration.patch" "${FILESDIR}/${PN}-0.1.9998.3499-int-conversion.patch" "${FILESDIR}/${PN}-0.1.9998.3499-fix-CC.patch" + + "${WORKDIR}/${PN}-0.1.9998.3499-fix-clang.patch" ) pkg_setup() { |