diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-08-11 19:14:57 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-08-11 19:14:57 +0000 |
commit | 934f53954082c49e80895b3c0dec6dbb459a64c1 (patch) | |
tree | 5bbdafce5a36acd3e3e414e76efc72498fbc2d56 /sys-freebsd/freebsd-sources | |
parent | Don't reload the /etc/udev/hwdb.bin when $ROOT isn't set or when it isn't / (diff) | |
download | gentoo-2-934f53954082c49e80895b3c0dec6dbb459a64c1.tar.gz gentoo-2-934f53954082c49e80895b3c0dec6dbb459a64c1.tar.bz2 gentoo-2-934f53954082c49e80895b3c0dec6dbb459a64c1.zip |
Add a useflag to build and install a generic kernel. It makes updates easier.
(Portage version: 2.2.0_alpha196/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'sys-freebsd/freebsd-sources')
-rw-r--r-- | sys-freebsd/freebsd-sources/ChangeLog | 6 | ||||
-rw-r--r-- | sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild | 45 | ||||
-rw-r--r-- | sys-freebsd/freebsd-sources/metadata.xml | 3 |
3 files changed, 45 insertions, 9 deletions
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog index 3e6914f1f8d8..fc9da22047fd 100644 --- a/sys-freebsd/freebsd-sources/ChangeLog +++ b/sys-freebsd/freebsd-sources/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-freebsd/freebsd-sources # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.93 2013/08/11 14:34:25 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.94 2013/08/11 19:14:57 aballier Exp $ + + 11 Aug 2013; Alexis Ballier <aballier@gentoo.org> + freebsd-sources-9.2_rc1.ebuild, metadata.xml: + Add a useflag to build and install a generic kernel. It makes updates easier. 11 Aug 2013; Alexis Ballier <aballier@gentoo.org> freebsd-sources-9.2_rc1.ebuild: diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild index 4ba5d294a7dd..d306eb28d161 100644 --- a/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild +++ b/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild @@ -1,13 +1,15 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild,v 1.3 2013/08/11 14:34:25 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.2_rc1.ebuild,v 1.4 2013/08/11 19:14:57 aballier Exp $ -inherit bsdmk freebsd flag-o-matic +EAPI=5 + +inherit bsdmk freebsd flag-o-matic toolchain-funcs DESCRIPTION="FreeBSD kernel sources" SLOT="0" -IUSE="" +IUSE="+build-generic profile" if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" @@ -16,12 +18,17 @@ fi RDEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* !sys-freebsd/virtio-kmod" -DEPEND="" +DEPEND="build-generic? ( + =sys-freebsd/freebsd-usbin-${RV}* + =sys-freebsd/freebsd-mk-defs-${RV}* + )" RESTRICT="strip binchecks" S="${WORKDIR}/sys" +KERN_BUILD=GENERIC + PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch" "${FILESDIR}/${PN}-9.2-gentoo.patch" "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch" @@ -34,9 +41,7 @@ PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch" "${FILESDIR}/${PN}-9.2-gentoo-gcc.patch" "${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch" ) -src_unpack() { - freebsd_src_unpack - +src_prepare() { # This replaces the gentoover patch, it doesn't need reapply every time. sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \ -e 's:^BRANCH=.*:BRANCH="Gentoo":' \ @@ -53,13 +58,37 @@ src_unpack() { sed -e "s:-Werror:-Wno-error:g" \ -i "${S}/conf/kern.pre.mk" \ -i "${S}/conf/kmod.mk" || die + + # Only used with USE=build-generic, let the kernel build with its own flags, its safer. + unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL +} + +src_configure() { + if use build-generic ; then + tc-export CC + cd "${S}/$(tc-arch-kernel)/conf" || die + config ${KERN_BUILD} || die + fi } src_compile() { - einfo "Nothing to compile.." + if use build-generic ; then + cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die + freebsd_src_compile depend + freebsd_src_compile + else + einfo "Nothing to compile.." + fi } src_install() { + if use build-generic ; then + cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die + freebsd_src_install + rm -rf "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" + cd "${S}" + fi + insinto "/usr/src/sys" doins -r "${S}/"* } diff --git a/sys-freebsd/freebsd-sources/metadata.xml b/sys-freebsd/freebsd-sources/metadata.xml index ecedda4aa2cc..4915b9b948f7 100644 --- a/sys-freebsd/freebsd-sources/metadata.xml +++ b/sys-freebsd/freebsd-sources/metadata.xml @@ -2,4 +2,7 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>bsd</herd> + <use> + <flag name='build-generic'>Build and install a generic kernel (recommended).</flag> + </use> </pkgmetadata> |