blob: 831945281693825d3cc351ab84d2a32ccd110684 [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
9IUSE=""
10
11DESCRIPTION="bsdiff: Binary Differencer using a suffix alg"
12HOMEPAGE="http://www.daemonology.net/bsdiff/"
Zdenek Behancfaaa0e2010-06-14 12:50:53 -070013SRC_URI="http://www.daemonology.net/bsdiff/${P}.tar.gz"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070014
15SLOT="0"
16LICENSE="BSD-2"
Mike Frysinger65332152014-02-14 13:55:27 -050017KEYWORDS="*"
Alex Deymo7fcda512014-05-12 19:43:59 -070018IUSE="cros_host"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070019
Thieu Le18bb5592011-05-17 16:43:07 -070020RDEPEND="app-arch/bzip2
Alex Deymo7fcda512014-05-12 19:43:59 -070021 cros_host? ( dev-libs/libdivsufsort )"
Thieu Le18bb5592011-05-17 16:43:07 -070022DEPEND="${RDEPEND}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070023
Zdenek Behancfaaa0e2010-06-14 12:50:53 -070024src_prepare() {
Gilad Arnold20287862013-04-30 09:24:14 -070025 epatch "${FILESDIR}"/${PV}_bspatch-extent-files.patch
26 epatch "${FILESDIR}"/${PV}_bsdiff-divsufsort.patch
27 epatch "${FILESDIR}"/${PV}_makefile.patch
Alex Deymocb060bd2014-05-12 13:34:02 -070028 epatch "${FILESDIR}"/${PV}_sanity_check.patch
Alex Deymo7fcda512014-05-12 19:43:59 -070029 epatch "${FILESDIR}"/${PV}_makefile_without_bsdiff.patch
Andrew de los Reyes517c05e2010-04-13 16:43:54 -070030}
31
Gilad Arnold20287862013-04-30 09:24:14 -070032src_configure() {
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070033 append-lfs-flags
Alex Deymo7fcda512014-05-12 19:43:59 -070034 tc-export CC
35 makeargs=( USE_BSDIFF=$(usex cros_host y n) )
36}
37
38src_compile() {
39 emake "${makeargs[@]}"
40}
41
42src_install() {
43 emake install DESTDIR="${D}" "${makeargs[@]}"
Andrew de los Reyes02dc6dd2010-04-13 12:07:31 -070044}