blob: faf199d069d2bd8050c4fa6d96afd3154b0a2692 [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
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07006
Zdenek Behancfaaa0e2010-06-14 12:50:53 -07007inherit eutils toolchain-funcs flag-o-matic
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07008
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -07009DESCRIPTION="bsdiff: Binary Differencer using a suffix alg"
10HOMEPAGE="http://www.daemonology.net/bsdiff/"
Zdenek Behancfaaa0e2010-06-14 12:50:53 -070011SRC_URI="http://www.daemonology.net/bsdiff/${P}.tar.gz"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070012
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070013LICENSE="BSD-2"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040014SLOT="0"
Mike Frysinger65332152014-02-14 13:55:27 -050015KEYWORDS="*"
Alex Deymo7fcda512014-05-12 19:43:59 -070016IUSE="cros_host"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070017
Thieu Le18bb5592011-05-17 16:43:07 -070018RDEPEND="app-arch/bzip2
Alex Deymo7fcda512014-05-12 19:43:59 -070019 cros_host? ( dev-libs/libdivsufsort )"
Mike Frysinger57f8ada2014-08-13 02:57:26 -040020DEPEND="${RDEPEND}
21 dev-libs/libdivsufsort"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070022
Zdenek Behancfaaa0e2010-06-14 12:50:53 -070023src_prepare() {
Gilad Arnold20287862013-04-30 09:24:14 -070024 epatch "${FILESDIR}"/${PV}_bspatch-extent-files.patch
25 epatch "${FILESDIR}"/${PV}_bsdiff-divsufsort.patch
26 epatch "${FILESDIR}"/${PV}_makefile.patch
Alex Deymocb060bd2014-05-12 13:34:02 -070027 epatch "${FILESDIR}"/${PV}_sanity_check.patch
Alex Deymo7fcda512014-05-12 19:43:59 -070028 epatch "${FILESDIR}"/${PV}_makefile_without_bsdiff.patch
Andrew de los Reyes517c05e2010-04-13 16:43:54 -070029}
30
Gilad Arnold20287862013-04-30 09:24:14 -070031src_configure() {
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070032 append-lfs-flags
Alex Deymo7fcda512014-05-12 19:43:59 -070033 tc-export CC
Mike Frysinger57f8ada2014-08-13 02:57:26 -040034 makeargs=( USE_BSDIFF=y )
Alex Deymo7fcda512014-05-12 19:43:59 -070035}
36
37src_compile() {
38 emake "${makeargs[@]}"
39}
40
41src_install() {
42 emake install DESTDIR="${D}" "${makeargs[@]}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070043}
Mike Frysinger57f8ada2014-08-13 02:57:26 -040044
45pkg_preinst() {
46 # We want bsdiff in the sdk and in the sysroot (for testing), but
47 # we don't want it in the target image as it isn't used.
48 if [[ $(cros_target) == "target_image" ]]; then
49 rm "${D}"/usr/bin/bsdiff || die
50 fi
51}