diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-06-05 16:38:21 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-06-05 16:38:21 +0000 |
commit | 3bf403e66abf9dbe8b3bd5169f5c525607ace9ea (patch) | |
tree | 532214d3e3495e205661f96b48aa577f18084d8d /eclass | |
parent | amd64 stable, bug #547462 (diff) | |
download | gentoo-2-3bf403e66abf9dbe8b3bd5169f5c525607ace9ea.tar.gz gentoo-2-3bf403e66abf9dbe8b3bd5169f5c525607ace9ea.tar.bz2 gentoo-2-3bf403e66abf9dbe8b3bd5169f5c525607ace9ea.zip |
Enable IUSE=profile globally. Use upstream tarball for FreeBSD > 10.0.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/freebsd.eclass | 34 |
2 files changed, 32 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 5b718925cedb..83fe2ef3bf1b 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1640 2015/06/04 18:49:42 kensington Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1641 2015/06/05 16:38:21 mgorny Exp $ + + 05 Jun 2015; Michał Górny <mgorny@gentoo.org> freebsd.eclass: + Enable IUSE=profile globally. Use upstream tarball for FreeBSD > 10.0. 04 Jun 2015; Michael Palimaka <kensington@gentoo.org> chromium.eclass, kde4-base.eclass: diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass index e741b13dad89..9d640e546ac6 100644 --- a/eclass/freebsd.eclass +++ b/eclass/freebsd.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.37 2015/05/24 08:43:02 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.38 2015/06/05 16:38:21 mgorny Exp $ # # Diego Pettenò <flameeyes@gentoo.org> @@ -66,10 +66,19 @@ if [[ ${MY_PV} == *9999* ]]; then ESVN_PROJECT="freebsd-${BRANCH}" fi -if [[ ${PN} != "freebsd-share" ]] && [[ ${PN} != freebsd-sources ]]; then - IUSE="profile" +# use the original source code. +if [[ ${MY_PV} != *9999* ]] && version_is_at_least 10.0 ${RV} ; then + DL_PV=${MY_PV/_rc/-RC} + DL_PV=${DL_PV/_beta/-BETA} + DL_PV=${DL_PV/_alpha/-ALPHA} + if [[ ${DL_PV} == ${MY_PV} ]]; then + DL_PV="${DL_PV}-RELEASE" + fi + SRC_URI="mirror://freebsd/releases/i386/${DL_PV}/src.txz -> freebsd-src-${MY_PV}.tar.xz" fi +IUSE="profile" + #unalias -a alias install-info='/usr/bin/bsdinstall-info' @@ -153,9 +162,22 @@ freebsd_src_unpack() { [[ -e "${WORKDIR}"/share/mk ]] && rm -rf "${WORKDIR}"/share/mk/*.mk fi else - for f in ${A} ; do - [[ ${f} == *.tar.* ]] && unpack ${f} - done + if version_is_at_least 10.0 ${RV} ; then + local tarball="freebsd-src-${MY_PV}.tar.xz" + local topdir="usr/src/" + local extractlist=() + for i in ${EXTRACTONLY} ; do + extractlist+=( ${topdir}${i} ) + done + ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" + cd "${WORKDIR}" || die + tar -xJpf "${DISTDIR}/${tarball}" --strip-components=2 "${extractlist[@]}" 2> /dev/null || die "tar extract command failed" + cd - || die + else + for f in ${A} ; do + [[ ${f} == *.tar.* ]] && unpack ${f} + done + fi fi cd "${S}" |