blob: c1a6027826f70d155728afa5b74c679e99db9939 [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 Deymo92002a02015-04-07 19:57:17 -07006CROS_WORKON_PROJECT="chromiumos/third_party/bsdiff"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07007
Alex Deymo92002a02015-04-07 19:57:17 -07008inherit cros-workon toolchain-funcs flag-o-matic
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07009
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070010DESCRIPTION="bsdiff: Binary Differencer using a suffix alg"
11HOMEPAGE="http://www.daemonology.net/bsdiff/"
Alex Deymo92002a02015-04-07 19:57:17 -070012SRC_URI=""
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070013
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070014LICENSE="BSD-2"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040015SLOT="0"
Alex Deymo92002a02015-04-07 19:57:17 -070016KEYWORDS="~*"
Alex Deymo7fcda512014-05-12 19:43:59 -070017IUSE="cros_host"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070018
Thieu Le18bb5592011-05-17 16:43:07 -070019RDEPEND="app-arch/bzip2
Alex Deymo7fcda512014-05-12 19:43:59 -070020 cros_host? ( dev-libs/libdivsufsort )"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040021DEPEND="${RDEPEND}
22 dev-libs/libdivsufsort"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070023
Gilad Arnold20287862013-04-30 09:24:14 -070024src_configure() {
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070025 append-lfs-flags
Alex Deymo7fcda512014-05-12 19:43:59 -070026 tc-export CC
Mike Frysinger57f8ada2014-08-13 02:57:26 -040027 makeargs=( USE_BSDIFF=y )
Alex Deymo7fcda512014-05-12 19:43:59 -070028}
29
30src_compile() {
31 emake "${makeargs[@]}"
32}
33
34src_install() {
35 emake install DESTDIR="${D}" "${makeargs[@]}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070036}
Mike Frysinger57f8ada2014-08-13 02:57:26 -040037
38pkg_preinst() {
39 # We want bsdiff in the sdk and in the sysroot (for testing), but
40 # we don't want it in the target image as it isn't used.
41 if [[ $(cros_target) == "target_image" ]]; then
42 rm "${D}"/usr/bin/bsdiff || die
43 fi
44}