summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-04-19 13:05:12 +0200
committerLars Wendler <polynomial-c@gentoo.org>2021-04-19 13:05:56 +0200
commitde990f5ef0917934e503d5e59a1120e690e6ce29 (patch)
tree188d69065d36f802cb998eb01cf683773db4fb57 /dev-util/kbuild
parentgames-emulation/mgba: Bump to version 0.9.1 (diff)
downloadgentoo-de990f5ef0917934e503d5e59a1120e690e6ce29.tar.gz
gentoo-de990f5ef0917934e503d5e59a1120e690e6ce29.tar.bz2
gentoo-de990f5ef0917934e503d5e59a1120e690e6ce29.zip
dev-util/kbuild: Synced live ebuild
Closes: https://bugs.gentoo.org/783828 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'dev-util/kbuild')
-rw-r--r--dev-util/kbuild/kbuild-9999.ebuild61
1 files changed, 42 insertions, 19 deletions
diff --git a/dev-util/kbuild/kbuild-9999.ebuild b/dev-util/kbuild/kbuild-9999.ebuild
index ac794242d86c..eeb654f1bb8a 100644
--- a/dev-util/kbuild/kbuild-9999.ebuild
+++ b/dev-util/kbuild/kbuild-9999.ebuild
@@ -1,24 +1,45 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit autotools subversion
+inherit autotools toolchain-funcs
DESCRIPTION="A makefile framework for writing simple makefiles for complex tasks"
HOMEPAGE="http://svn.netlabs.org/kbuild/wiki"
-ESVN_REPO_URI="http://svn.netlabs.org/repos/kbuild/trunk"
-
-LICENSE="GPL-3"
+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"
-KEYWORDS=""
IUSE=""
-DEPEND="sys-devel/gettext
- virtual/yacc"
+# We cannot depend on virtual/yacc until bug #734354 has been fixed
+DEPEND="
+ sys-apps/texinfo
+ sys-devel/flex
+ sys-devel/gettext
+ || (
+ dev-util/byacc
+ dev-util/yacc
+ <sys-devel/bison-3.7
+ )
+"
RDEPEND=""
-S="${WORKDIR}/${MY_P/-src}"
+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"
+)
pkg_setup() {
# Package fails with distcc (bug #255371)
@@ -27,28 +48,30 @@ pkg_setup() {
src_prepare() {
default
- rm -rf "${S}/kBuild/bin" || die
- # bootstrapping breaks because of missing po/Makefile.in.in
- sed '/^AC_CONFIG_FILES/s@ po/Makefile\.in@@' \
- -i src/kmk/configure.ac || die
+ 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" \
+ -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 \
+ 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 \
+ kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="${D}" install \
|| die "install failed"
}