]> git.draconx.ca Git - gentoo-draconx.git/blob - sys-libs/flashmap/flashmap-20160808.ebuild
Add mosys ebuild.
[gentoo-draconx.git] / sys-libs / flashmap / flashmap-20160808.ebuild
1 # Copyright © 2017 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or later.
3 # There is NO WARRANTY, to the extent permitted by law.
4
5 EAPI=6
6
7 inherit toolchain-funcs multilib-minimal
8
9 # Github repo has no release tags, and chromium repo has no stable
10 # download archives.  Fun times.
11 SHA1=976420e9ecae3c3933d5e59e67a4debad751d003
12 MY_P=$PN-$SHA1
13
14 DESCRIPTION="library for manipulating flashmap data structure used in ChromiumOS"
15 HOMEPAGE="https://github.com/dhendrix/flashmap"
16 SRC_URI="https://github.com/dhendrix/$PN/archive/$SHA1.tar.gz -> $MY_P.tar.gz"
17
18 LICENSE="|| ( BSD GPL-2 )"
19 SLOT=0
20 KEYWORDS="~amd64 ~arm"
21
22 PATCHES=(
23         "$FILESDIR/$PN-respect-CFLAGS-LDFLAGS.patch"
24         "$FILESDIR/$PN-respect-AR.patch"
25         "$FILESDIR/$PN-dont-set-make.patch"
26         "$FILESDIR/$PN-no-static-libs.patch"
27         "$FILESDIR/$PN-split-install.patch"
28 )
29
30 S=$WORKDIR/$MY_P
31
32 src_prepare () {
33         default_src_prepare
34         multilib_copy_sources
35 }
36
37 multilib_src_compile () {
38         local progs=$(multilib_is_native_abi || echo PROGRAMS=)
39         emake CC="$(tc-getCC)" AR="$(tc-getAR)" $progs || die
40 }
41
42 multilib_src_install () {
43         local target=$(multilib_is_native_abi || echo _lib)
44         emake DESTDIR="$D" LIBDIR="$(get_libdir)" install$target || die
45 }