diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2024-01-17 19:49:34 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2024-01-17 20:27:38 +0200 |
commit | b1a1b5d41844e17d59cc5de373a12fab9a216ca7 (patch) | |
tree | 89c1594c458a7e484fb60667287327f1bdf6f08c /dev-build | |
parent | net-misc/dropbox: drop 188.4.6302, 189.4.8395 (diff) | |
download | gentoo-b1a1b5d41844e17d59cc5de373a12fab9a216ca7.tar.gz gentoo-b1a1b5d41844e17d59cc5de373a12fab9a216ca7.tar.bz2 gentoo-b1a1b5d41844e17d59cc5de373a12fab9a216ca7.zip |
Move {dev-util → dev-build}/kbuild
Closes: https://github.com/gentoo/gentoo/pull/34871
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'dev-build')
18 files changed, 559 insertions, 0 deletions
diff --git a/dev-build/kbuild/Manifest b/dev-build/kbuild/Manifest new file mode 100644 index 000000000000..aafd921a6413 --- /dev/null +++ b/dev-build/kbuild/Manifest @@ -0,0 +1,4 @@ +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.3572-src.tar.xz 3973848 BLAKE2B 103e42d719fd77bc5c55aea48bdfd01c8ad136529cc76cc8c1297f87e21e5d4e2e7149f9321c5174808613a84331dbea8bb4c0a7662eb2de9e1045c8ad365047 SHA512 96bb5e1759990bf3acaca4b0ba7c02926c6607b0cd94f7fca222b13eee5c3364c64b35e3473c5cee45fa094cb2b851ac9f3a3a9fe60cff894baf46238ccb4006 +DIST kbuild-0.1.9998.3592-src.tar.xz 3975348 BLAKE2B 4b1862238f6f6c35ba1b586e11e17baca3b66c4ba3a97b17168ced902d7fcc9f1baa9a4b8669489902346b9bab67095f4ff4d008187c36cd2ef4b7841d4134be SHA512 b9ca1723b426db81571b048db5afe4b7c3d2d8a881003812e9a5f9df44c5109b628d77af415cf56eb44a8775c590a6f0e343efccf562ef83213c5525e081e59b diff --git a/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch b/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch new file mode 100644 index 000000000000..b074a984af4c --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch @@ -0,0 +1,11 @@ +--- a/Config.kmk ++++ b/Config.kmk +@@ -147,7 +147,7 @@ + MY_INST_DATA := $(MY_INST_ROOT)share/kBuild/ + endif + ifndef MY_INST_DOC +- MY_INST_DOC := $(MY_INST_ROOT)share/doc/kBuild-$(KBUILD_VERSION)/ ++ MY_INST_DOC := $(MY_INST_ROOT)share/doc/$(PF)/ + endif + if !defined(MY_INST_BIN_MODE) && defined(MY_INST_MODE) + MY_INST_BIN_MODE := $(MY_INST_MODE),a+x diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch new file mode 100644 index 000000000000..14d5ec7cc422 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch @@ -0,0 +1,11 @@ +--- kbuild-0.1.9998.3407/src/kmk/Makefile.kmk ++++ kbuild-0.1.9998.3407/src/kmk/Makefile.kmk +@@ -60,7 +60,7 @@ + ifneq ($(KBUILD_TARGET),os2) + TEMPLATE_BIN-KMK_INCS += glob + endif +-TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) ++TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) pthread + ifdef ELECTRIC_HEAP # for electric heap (see electric.c). + ifeq ($(KBUILD_TARGET),win) + TEMPLATE_BIN-KMK_CFLAGS = $(TEMPLATE_BIN-THREADED_CFLAGS) /FI$(kmk_DEFPATH)/electric.h -DELECTRIC_HEAP=1 diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch new file mode 100644 index 000000000000..2714716b7806 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch @@ -0,0 +1,20 @@ +--- kbuild-0.1.9998.3407/bootstrap.gmk ++++ kbuild-0.1.9998.3407/bootstrap.gmk +@@ -151,7 +151,7 @@ + $(OUTDIR)/kmk/ts-configured: \ + $(OUTDIR)/kmk/ts-autoreconf \ + $(OUTDIR)/kmk/fts.h +- cd $(OUTDIR)/kmk && $(SRCDIR)/src/kmk/configure --disable-load --without-guile ++ cd $(OUTDIR)/kmk && $(SRCDIR)/src/kmk/configure --disable-load + echo done > $@ + + ifeq ($(KBUILD_HOST),solaris) +@@ -182,7 +182,7 @@ + echo done > $@ + + $(OUTDIR)/sed/ts-configured: $(OUTDIR)/sed/ts-autoreconf +- cd $(OUTDIR)/sed && $(SRCDIR)/src/sed/configure --without-libintl --disable-nls ++ cd $(OUTDIR)/sed && $(SRCDIR)/src/sed/configure --disable-nls + echo done > $@ + + $(OUTDIR)/sed/config.h: $(OUTDIR)/sed/ts-configured diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch new file mode 100644 index 000000000000..7d7f1f7232eb --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch @@ -0,0 +1,23 @@ +A few files are compiled with gcc regardless of setting CC + +This file seems to do some guesswork, override it with CC if set + +Bug: https://bugs.gentoo.org/734302 + +--- a/kBuild/tools/GCC3.kmk ++++ b/kBuild/tools/GCC3.kmk +@@ -84,6 +84,14 @@ + TOOL_GCC3_CXX += -fmessage-length=0 + endif + ++ifneq ($(CC),) ++ TOOL_GCC3_CC = $(CC) ++ TOOL_GCC3_LD = $(CC) ++endif ++ifneq ($(AR),) ++ TOOL_GCC3_AR = $(AR) ++endif ++ + # General Properties used by kBuild + TOOL_GCC3_COBJSUFF ?= .o + TOOL_GCC3_CFLAGS ?= diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch new file mode 100644 index 000000000000..ee870da2ee55 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch @@ -0,0 +1,15 @@ +--- kbuild-0.1.9998.3499/src/kmk/Makefile.kmk ++++ kbuild-0.1.9998.3499/src/kmk/Makefile.kmk +@@ -60,9 +60,9 @@ + ifneq ($(KBUILD_TARGET),os2) + TEMPLATE_BIN-KMK_INCS += glob + endif +-TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) +-TEMPLATE_BIN-KMK_LIBS.x86 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.x86) +-TEMPLATE_BIN-KMK_LIBS.amd64 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.amd64) ++TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) pthread ++TEMPLATE_BIN-KMK_LIBS.x86 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.x86) pthread ++TEMPLATE_BIN-KMK_LIBS.amd64 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.amd64) pthread + ifdef ELECTRIC_HEAP # for electric heap (see electric.c). + ifeq ($(KBUILD_TARGET),win) + TEMPLATE_BIN-KMK_CFLAGS = $(TEMPLATE_BIN-THREADED_CFLAGS) /FI$(kmk_DEFPATH)/electric.h -DELECTRIC_HEAP=1 diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch new file mode 100644 index 000000000000..2d25eacb9826 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch @@ -0,0 +1,74 @@ +Add a few includes to fix this warning: -Wimplicit-function-declaration +Bug: https://bugs.gentoo.org/882143 + +--- a/src/sed/lib/utils.c ++++ b/src/sed/lib/utils.c +@@ -27,7 +27,8 @@ + + #ifdef HAVE_STRINGS_H + # include <strings.h> +-#else ++#endif ++#ifdef HAVE_STRING_H + # include <string.h> + #endif /* HAVE_STRINGS_H */ + +--- a/src/sed/sed/execute.c ++++ b/src/sed/sed/execute.c +@@ -46,7 +46,8 @@ + + #ifdef HAVE_STRINGS_H + # include <strings.h> +-#else ++#endif ++#ifdef HAVE_STRING_H + # include <string.h> + #endif /*HAVE_STRINGS_H*/ + #ifdef HAVE_MEMORY_H +--- a/src/sed/sed/fmt.c ++++ b/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> +--- a/src/sed/sed/mbcs.c ++++ b/src/sed/sed/mbcs.c +@@ -17,6 +17,7 @@ + + #include "sed.h" + #include <stdlib.h> ++#include <string.h> + + int mb_cur_max; + +--- a/src/sed/sed/regexp.c ++++ b/src/sed/sed/regexp.c +@@ -22,6 +22,9 @@ + #ifdef HAVE_STDLIB_H + # include <stdlib.h> + #endif ++#ifdef HAVE_STRING_H ++# include <string.h> ++#endif + + #ifdef gettext_noop + # define N_(String) gettext_noop(String) +--- a/src/sed/sed/sed.c ++++ b/src/sed/sed/sed.c +@@ -26,9 +26,10 @@ + #include <stdio.h> + #ifdef HAVE_STRINGS_H + # include <strings.h> +-#else +-# include <string.h> + #endif /*HAVE_STRINGS_H*/ ++#ifdef HAVE_STRING_H ++# include <string.h> ++#endif /*HAVE_STRING_H*/ + #ifdef HAVE_MEMORY_H + # include <memory.h> + #endif diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch new file mode 100644 index 000000000000..6afdeeb6e7a6 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch @@ -0,0 +1,26 @@ +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) +@@ -59,7 +61,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 (strchr (s, 0) /** @todo suboptimal */)); + free (s); + + restore_variable_buffer (pbuf, plen); diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch new file mode 100644 index 000000000000..24265b96e137 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch @@ -0,0 +1,11 @@ +--- kbuild-0.1.9998.3499/src/kash/Makefile.kmk ++++ kbuild-0.1.9998.3499/src/kash/Makefile.kmk +@@ -35,7 +35,7 @@ + kash_TEMPLATE = BIN-THREADED + kash_NAME = kmk_ash + kash_ASTOOL = YASM +-kash_DEFS = lint SHELL SMALL KASH_SEPARATE_PARSER_ALLOCATOR ++kash_DEFS = lint SHELL SMALL + if "$(KBUILD_TARGET)" != "win" || defined(KASH_WIN_FORKED_MODE) + kash_DEFS += SH_FORKED_MODE + else diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch new file mode 100644 index 000000000000..822194b1c98b --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch @@ -0,0 +1,15 @@ +--- a/src/kash/Makefile.kmk 2022-11-12 16:42:14.195927909 +0200 ++++ b/src/kash/Makefile.kmk 2022-11-12 17:09:46.212159615 +0200 +@@ -210,8 +210,11 @@ + kash_USES = lex yacc + kash_LEXTOOL = FLEX + kash_LEXFLAGS = -8 +-#kash_YACCTOOL = BISON ++ifneq (,$(shell bison -V)) ++kash_YACCTOOL = BISON ++else + kash_YACCTOOL = YACC ++endif + kash_YACCFLAGS = -ld + kash_SOURCES += \ + arith.y \ diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch new file mode 100644 index 000000000000..94eb14ee6cb6 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch @@ -0,0 +1,11 @@ +--- a/src/kmk/remake.c ++++ b/src/kmk/remake.c +@@ -417,7 +417,7 @@ + if (!keep_going_flag && file->parent == 0) + { + const char *msg_joke = 0; +- extern struct dep *goals; ++ extern struct goaldep *goals; + + /* classics */ + if (!strcmp (file->name, "fire") diff --git a/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch b/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch new file mode 100644 index 000000000000..d2b20176ca82 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch @@ -0,0 +1,10 @@ +--- kBuild-0.1.9998-pre20110817/src/kash/Makefile.kmk ++++ kBuild-0.1.9998-pre20110817/src/kash/Makefile.kmk +@@ -59,6 +59,7 @@ + if "$(USER)" == "bird" && "$(KBUILD_TARGET)" != "win" + kash_CFLAGS += -std=gnu99 + endif ++kash_LIBS += pthread + kash_CFLAGS.win.amd64 = -GS- + kash_SOURCES = \ + main.c \ diff --git a/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch b/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch new file mode 100644 index 000000000000..9b0df4204e35 --- /dev/null +++ b/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch @@ -0,0 +1,13 @@ +--- kBuild-0.1.9998-pre20120806/src/sed/lib/utils.c ++++ kBuild-0.1.9998-pre20120806/src/sed/lib/utils.c +@@ -35,6 +35,10 @@ + # include <stdlib.h> + #endif /* HAVE_STDLIB_H */ + ++#ifdef HAVE_UNISTD_H ++# include <unistd.h> ++#endif /* HAVE_UNISTD_H */ ++ + #include "utils.h" + + const char *myname; diff --git a/dev-build/kbuild/kbuild-0.1.9998.3499-r4.ebuild b/dev-build/kbuild/kbuild-0.1.9998.3499-r4.ebuild new file mode 100644 index 000000000000..1ed4a97698af --- /dev/null +++ b/dev-build/kbuild/kbuild-0.1.9998.3499-r4.ebuild @@ -0,0 +1,79 @@ +# 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.3499-fix-clang-16.patch.bz2 +" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +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_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-16.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-build/kbuild/kbuild-0.1.9998.3572-r4.ebuild b/dev-build/kbuild/kbuild-0.1.9998.3572-r4.ebuild new file mode 100644 index 000000000000..31c91dcacac0 --- /dev/null +++ b/dev-build/kbuild/kbuild-0.1.9998.3572-r4.ebuild @@ -0,0 +1,74 @@ +# 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.3499-fix-clang-16.patch.bz2 +" + +LICENSE="GPL-3+" +SLOT="0" +#KEYWORDS="~amd64 ~x86" # for testing only. This version is buggy +IUSE="" + +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_pre20120806-qa.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.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-16.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-build/kbuild/kbuild-0.1.9998.3592.ebuild b/dev-build/kbuild/kbuild-0.1.9998.3592.ebuild new file mode 100644 index 000000000000..0d1386d186ec --- /dev/null +++ b/dev-build/kbuild/kbuild-0.1.9998.3592.ebuild @@ -0,0 +1,76 @@ +# 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.3499-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_pre20120806-qa.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.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-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 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-build/kbuild/kbuild-9999.ebuild b/dev-build/kbuild/kbuild-9999.ebuild new file mode 100644 index 000000000000..0c7ecee2efa6 --- /dev/null +++ b/dev-build/kbuild/kbuild-9999.ebuild @@ -0,0 +1,78 @@ +# 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" +if [[ "${PV}" == *9999 ]] ; then + inherit subversion + ESVN_REPO_URI="http://svn.netlabs.org/repos/kbuild/trunk" +else + MY_P="${P}-src" + #SRC_URI="ftp://ftp.netlabs.org/pub/${PN}/${MY_P}.tar.gz" + SRC_URI="https://dev.gentoo.org/~polynomial-c/${MY_P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi +LICENSE="GPL-3+" +SLOT="0" +IUSE="" + +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_pre20120806-qa.patch" + "${FILESDIR}/${PN}-0.1.9998_pre20110817-kash-link-pthread.patch" + #"${FILESDIR}/${PN}-0.1.9998.3407-gold.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" +) + +pkg_setup() { + # Package fails with distcc (bug #255371) + export DISTCC_DISABLE=1 +} + +src_prepare() { + default + + if [[ "${PV}" != *9999 ]] ; then + # Add a file with the svn revision this package was pulled from + printf '%s\n' "KBUILD_SVN_REV := $(ver_cut 4)" \ + > SvnInfo.kmk || die + fi + + 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-build/kbuild/metadata.xml b/dev-build/kbuild/metadata.xml new file mode 100644 index 000000000000..b22a815172dd --- /dev/null +++ b/dev-build/kbuild/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ceamac@gentoo.org</email> + <name>Viorel Munteanu</name> + </maintainer> +</pkgmetadata> |