blob: 7d3f4281ec5c7d80f08973b53cdb2c47d66ae2d0 [file] [log] [blame]
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07001# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
Diego Elio Pettenòa1605cb2011-02-12 23:24:29 +01003# $Header: /var/cvsroot/gentoo-x86/dev-util/bsdiff/bsdiff-4.3-r2.ebuild,v 1.1 2010/12/13 00:35:03 flameeyes Exp $
4
Gilad Arnold20287862013-04-30 09:24:14 -07005EAPI=4
Alex Deymo95289652016-01-22 18:28:44 -08006CROS_WORKON_BLACKLIST=1
7# cros-workon expects the repo to be in src/third_party, but is in src/aosp.
8CROS_WORKON_LOCALNAME="../aosp/external/bsdiff"
9CROS_WORKON_PROJECT="platform/external/bsdiff"
10CROS_WORKON_REPO="https://android.googlesource.com"
11CROS_WORKON_INCREMENTAL_BUILD=1
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070012
Alex Deymo92002a02015-04-07 19:57:17 -070013inherit cros-workon toolchain-funcs flag-o-matic
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070014
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070015DESCRIPTION="bsdiff: Binary Differencer using a suffix alg"
16HOMEPAGE="http://www.daemonology.net/bsdiff/"
Alex Deymo92002a02015-04-07 19:57:17 -070017SRC_URI=""
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070018
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070019LICENSE="BSD-2"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040020SLOT="0"
Alex Deymo92002a02015-04-07 19:57:17 -070021KEYWORDS="~*"
Alex Deymo7fcda512014-05-12 19:43:59 -070022IUSE="cros_host"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070023
Thieu Le18bb5592011-05-17 16:43:07 -070024RDEPEND="app-arch/bzip2
Alex Deymo7fcda512014-05-12 19:43:59 -070025 cros_host? ( dev-libs/libdivsufsort )"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040026DEPEND="${RDEPEND}
27 dev-libs/libdivsufsort"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070028
Gilad Arnold20287862013-04-30 09:24:14 -070029src_configure() {
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070030 append-lfs-flags
Alex Deymo95289652016-01-22 18:28:44 -080031 tc-export CXX
Mike Frysinger57f8ada2014-08-13 02:57:26 -040032 makeargs=( USE_BSDIFF=y )
Alex Deymo7fcda512014-05-12 19:43:59 -070033}
34
35src_compile() {
36 emake "${makeargs[@]}"
37}
38
39src_install() {
40 emake install DESTDIR="${D}" "${makeargs[@]}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070041}
Mike Frysinger57f8ada2014-08-13 02:57:26 -040042
43pkg_preinst() {
44 # We want bsdiff in the sdk and in the sysroot (for testing), but
45 # we don't want it in the target image as it isn't used.
46 if [[ $(cros_target) == "target_image" ]]; then
47 rm "${D}"/usr/bin/bsdiff || die
48 fi
49}