blob: d71fb53308c4dffe419e1278f438b39a2f7568e7 [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 Deymo19edfc42017-03-02 16:31:18 -080022IUSE="cros_host test"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070023
Thieu Le18bb5592011-05-17 16:43:07 -070024RDEPEND="app-arch/bzip2
Mike Frysinger57f8ada2014-08-13 02:57:26 -040025 dev-libs/libdivsufsort"
Alex Deymo19edfc42017-03-02 16:31:18 -080026DEPEND="${RDEPEND}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070027
Gilad Arnold20287862013-04-30 09:24:14 -070028src_configure() {
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070029 append-lfs-flags
Alex Deymo95289652016-01-22 18:28:44 -080030 tc-export CXX
Alex Deymo19edfc42017-03-02 16:31:18 -080031 export GENTOO_LIBDIR=$(get_libdir)
Mike Frysinger57f8ada2014-08-13 02:57:26 -040032 makeargs=( USE_BSDIFF=y )
Alex Deymo7fcda512014-05-12 19:43:59 -070033}
34
35src_compile() {
Alex Deymo19edfc42017-03-02 16:31:18 -080036 emake "${makeargs[@]}" all $(usev test)
Alex Deymo7fcda512014-05-12 19:43:59 -070037}
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
Alex Deymo19edfc42017-03-02 16:31:18 -080047 rm "${D}"/usr/bin/bsdiff "${D}"/usr/$(get_libdir)/bsdiff.so
Mike Frysinger57f8ada2014-08-13 02:57:26 -040048 fi
49}