summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Amadio <amadio@gentoo.org>2018-03-07 14:07:39 +0100
committerGuilherme Amadio <amadio@gentoo.org>2018-03-07 14:15:01 +0100
commit5344a12960e267c18b7d90163a99b1f4e1fb1527 (patch)
tree15eaf44b8662fa5c2a535a14f4fbe642892d88ec /dev-libs
parentwww-apps/grafana-bin: Fix v5 install error (diff)
downloadgentoo-5344a12960e267c18b7d90163a99b1f4e1fb1527.tar.gz
gentoo-5344a12960e267c18b7d90163a99b1f4e1fb1527.tar.bz2
gentoo-5344a12960e267c18b7d90163a99b1f4e1fb1527.zip
dev-libs/xxhash: new package
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/xxhash/Manifest1
-rw-r--r--dev-libs/xxhash/files/xxhash-staticlib.patch27
-rw-r--r--dev-libs/xxhash/metadata.xml12
-rw-r--r--dev-libs/xxhash/xxhash-0.6.4.ebuild24
4 files changed, 64 insertions, 0 deletions
diff --git a/dev-libs/xxhash/Manifest b/dev-libs/xxhash/Manifest
new file mode 100644
index 000000000000..58202f6ce63a
--- /dev/null
+++ b/dev-libs/xxhash/Manifest
@@ -0,0 +1 @@
+DIST xxhash-0.6.4.tar.gz 28995 BLAKE2B 2556ac14e6a6b1341adeeba244ad5bac7b52ff43b5d85acfc51de903771f1a7b32defeab657db765d21a33ec49aee1a892617d6656a152ad5ce6e1636a743e18 SHA512 6c914bac5092dfd01349c8223c382d3c13ba1b22e08300ce86ea9663a9a934f930debdeb71c14365ec57d72b95088a4354da92dfb7fcf7d07ec01c0f4fb70ca7
diff --git a/dev-libs/xxhash/files/xxhash-staticlib.patch b/dev-libs/xxhash/files/xxhash-staticlib.patch
new file mode 100644
index 000000000000..b30ac93dbef7
--- /dev/null
+++ b/dev-libs/xxhash/files/xxhash-staticlib.patch
@@ -0,0 +1,27 @@
+Only in xxHash-0.6.3.orig/cmake_unofficial: CMakeLists.txt
+diff -ru xxHash-0.6.3.orig/Makefile xxHash-0.6.3/Makefile
+--- xxHash-0.6.3.orig/Makefile 2017-12-18 10:47:41.740700013 +0100
++++ xxHash-0.6.3/Makefile 2017-12-18 11:14:05.157379597 +0100
+@@ -50,7 +50,7 @@
+ default: xxhsum
+
+ .PHONY: all
+-all: xxhsum xxhsum32 xxhsum_inlinedXXH
++all: xxhsum xxhsum32 xxhsum_inlinedXXH libxxhash.a
+
+ xxhsum32: CFLAGS += -m32
+ xxhsum xxhsum32: xxhash.c xxhsum.c
+@@ -58,6 +58,13 @@
+ ln -sf $@ xxh32sum
+ ln -sf $@ xxh64sum
+
++xxhash.o: CPPFLAGS += -DXXHASH_EXPORT
++xxhash.o: xxhash.c
++ $(CC) $(FLAGS) -c $^
++
++libxxhash.a: xxhash.o
++ $(AR) rcs $@ $^ $@
++
+ xxhsum_inlinedXXH: xxhsum.c
+ $(CC) $(FLAGS) -DXXH_PRIVATE_API $^ -o $@$(EXT)
+
diff --git a/dev-libs/xxhash/metadata.xml b/dev-libs/xxhash/metadata.xml
new file mode 100644
index 000000000000..ffe46e89cab8
--- /dev/null
+++ b/dev-libs/xxhash/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>amadio@gentoo.org</email>
+ <name>Guilherme Amadio</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Cyan4973/xxHash</remote-id>
+ <bugs-to>https://github.com/Cyan4973/xxHash/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/xxhash/xxhash-0.6.4.ebuild b/dev-libs/xxhash/xxhash-0.6.4.ebuild
new file mode 100644
index 000000000000..e21fdc1aa0d7
--- /dev/null
+++ b/dev-libs/xxhash/xxhash-0.6.4.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Extremely fast non-cryptographic hash algorithm"
+HOMEPAGE="http://www.xxhash.com"
+SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+DEPEND=""
+
+S="${WORKDIR}/xxHash-${PV}"
+
+src_install() {
+ PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" emake DESTDIR="${D}" install
+ if ! use static-libs ; then
+ rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die
+ fi
+}