| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Distributed under the terms of the GNU General Public License v2 | 2 # Distributed under the terms of the GNU General Public License v2 |
| 3 | 3 |
| 4 inherit eutils toolchain-funcs git | 4 inherit cros-workon |
| 5 | 5 |
| 6 DESCRIPTION="Chrome OS verified boot tools" | 6 DESCRIPTION="Chrome OS verified boot tools" |
| 7 LICENSE="GPL-3" | 7 LICENSE="GPL-3" |
| 8 SLOT="0" | 8 SLOT="0" |
| 9 KEYWORDS="amd64 x86 arm" | 9 KEYWORDS="amd64 arm x86" |
| 10 IUSE="minimal" | 10 IUSE="minimal" |
| 11 EAPI="2" | 11 EAPI="2" |
| 12 | 12 |
| 13 DEPEND="dev-libs/openssl | 13 DEPEND="dev-libs/openssl |
| 14 sys-apps/util-linux" | 14 sys-apps/util-linux" |
| 15 | 15 |
| 16 EGIT_REPO_URI=git://chromiumos-git/git/repos/not-yet-populated.git | 16 EGIT_REPO_URI=git://chromiumos-git/git/repos/not-yet-populated.git |
| 17 SRCPATH=src/platform/vboot_reference | 17 SRCPATH=src/platform/vboot_reference |
| 18 | 18 |
| 19 src_unpack() { | |
| 20 if [ -z "${CHROMEOS_ROOT}" ] ; then | |
| 21 local CHROMEOS_ROOT=$(eval echo -n ~${SUDO_USER}/trunk) | |
| 22 fi | |
| 23 if [ -e "${CHROMEOS_ROOT}/${SRCPATH}" ] ; then | |
| 24 cp -a "${CHROMEOS_ROOT}/${SRCPATH}" "${S}" || die | |
| 25 else | |
| 26 git_src_unpack | |
| 27 fi | |
| 28 } | |
| 29 | |
| 30 | |
| 31 src_compile() { | 19 src_compile() { |
| 32 tc-export CC AR CXX | 20 tc-export CC AR CXX |
| 33 » emake || die "${SRCPATH} compile failed." | 21 » err_msg="${SRCPATH} compile failed. " |
| 22 » err_msg+="Try running 'make clean' in the package root directory" |
| 23 » emake || die "${err_msg}" |
| 34 } | 24 } |
| 35 | 25 |
| 36 src_install() { | 26 src_install() { |
| 37 if use minimal ; then | 27 if use minimal ; then |
| 38 » emake DESTDIR="${D}/usr/bin" -C cgpt install || \ | 28 » emake DESTDIR="${D}/usr/bin" BUILD="${S}"/build -C cgpt \ |
| 39 » » die "${SRCPATH} install failed." | 29 » » install || die "${SRCPATH} install failed." |
| 40 » else | 30 » else |
| 41 emake DESTDIR="${D}/usr/bin" install || \ | 31 emake DESTDIR="${D}/usr/bin" install || \ |
| 42 die "${SRCPATH} install failed." | 32 die "${SRCPATH} install failed." |
| 43 fi | 33 fi |
| 44 } | 34 } |
| OLD | NEW |