1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils autotools toolchain-funcs versionator
9 DESCRIPTION="A makefile framework for writing simple makefiles for complex tasks"
10 HOMEPAGE="http://svn.netlabs.org/kbuild/wiki"
11 #SRC_URI="ftp://ftp.netlabs.org/pub/${PN}/${MY_P}.tar.gz"
12 SRC_URI="https://dev.gentoo.org/~polynomial-c/${MY_P}.tar.xz"
16 KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
28 "${FILESDIR}/${PN}-unknown-configure-opt.patch"
29 "${FILESDIR}/${PN}-0.1.5-gentoo-docdir.patch"
30 "${FILESDIR}/${PN}-0.1.9998_pre20120806-qa.patch"
31 "${FILESDIR}/${PN}-0.1.9998_pre20110817-kash-link-pthread.patch"
32 "${FILESDIR}/${PN}-0.1.9998_pre20171020-gold.patch"
36 rm -rf "${S}/kBuild/bin"
40 mv src/kmk/configure.{in,ac} || die
42 # Add a file with the svn revision this package was pulled from
43 printf '%s\n' "KBUILD_SVN_REV := $(get_version_component_range 4)" \
46 cd "${S}/src/kmk" || die
48 cd "${S}/src/sed" || die
49 # AM_CONFIG_HEADER is obsolete since automake-1.13 (bug #467104)
50 sed 's@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@' -i configure.ac || die
53 sed -e "s@_LDFLAGS\.$(tc-arch)*.*=@& ${LDFLAGS}@g" \
54 -i "${S}"/Config.kmk || die #332225
55 tc-export CC RANLIB #AR does not work here
59 kBuild/env.sh --full emake -f bootstrap.gmk AUTORECONF=true AR="$(tc-getAR)" \
60 || die "bootstrap failed"
64 kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="${D}" install \
65 || die "install failed"