blob: 4e42b4fdc9d6afaacf0cfa53f32c0bb11ca49031 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit toolchain-funcs
DESCRIPTION="zstd fast compression library"
HOMEPAGE="http://facebook.github.io/zstd/"
SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="static-libs"
PATCHES=( "${FILESDIR}/${P}-fix_build_system.patch" )
src_compile() {
emake \
CC="$(tc-getCC)" \
AR="$(tc-getAR)" \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
emake -C lib \
CC="$(tc-getCC)" \
AR="$(tc-getAR)" \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" libzstd
}
src_install() {
emake \
DESTDIR="${D}" \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
einstalldocs
if ! use static-libs; then
rm "${ED%/}"/usr/$(get_libdir)/libzstd.a || die
fi
}
|