commit:     5344a12960e267c18b7d90163a99b1f4e1fb1527
Author:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  7 13:07:39 2018 +0000
Commit:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Wed Mar  7 13:15:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5344a129

dev-libs/xxhash: new package

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-libs/xxhash/Manifest                     |  1 +
 dev-libs/xxhash/files/xxhash-staticlib.patch | 27 +++++++++++++++++++++++++++
 dev-libs/xxhash/metadata.xml                 | 12 ++++++++++++
 dev-libs/xxhash/xxhash-0.6.4.ebuild          | 24 ++++++++++++++++++++++++
 4 files changed, 64 insertions(+)

diff --git a/dev-libs/xxhash/Manifest b/dev-libs/xxhash/Manifest
new file mode 100644
index 00000000000..58202f6ce63
--- /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 00000000000..b30ac93dbef
--- /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 00000000000..ffe46e89cab
--- /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>ama...@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 00000000000..e21fdc1aa0d
--- /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
+}

Reply via email to