sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / dev-libs / xxhash / xxhash-0.7.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Extremely fast non-cryptographic hash algorithm"
9 HOMEPAGE="https://www.xxhash.com"
10 SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="BSD-2 GPL-2+"
13 # https://abi-laboratory.pro/tracker/timeline/xxhash
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos"
16 IUSE="static-libs"
17
18 S="${WORKDIR}/xxHash-${PV}"
19
20 src_compile() {
21         PREFIX="${EPREFIX}/usr" \
22         LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
23         emake AR="$(tc-getAR)" CC="$(tc-getCC)"
24 }
25
26 src_install() {
27         PREFIX="${EPREFIX}/usr" \
28         LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
29         MANDIR="${EPREFIX}/usr/share/man/man1" \
30         emake DESTDIR="${D}" install
31
32         if ! use static-libs ; then
33                 rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die
34         fi
35 }