diff options
author | Simon Levermann <simon@slevermann.de> | 2016-10-15 15:34:37 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-11-25 23:07:32 +0100 |
commit | 739e63516cc43a6f25ae13ab9eb7b0238adf1ee4 (patch) | |
tree | 64637bb86be666ef74f58d13085b7806dfc3f8c0 /app-crypt/argon2 | |
parent | sys-freebsd/freebsd-usbin: fix FreeBSD-SA-16:32.bhyve. (diff) | |
download | gentoo-739e63516cc43a6f25ae13ab9eb7b0238adf1ee4.tar.gz gentoo-739e63516cc43a6f25ae13ab9eb7b0238adf1ee4.tar.bz2 gentoo-739e63516cc43a6f25ae13ab9eb7b0238adf1ee4.zip |
app-crypt/argon2: new ebuild.
Argon2 is a password hashing tool and library that won the Password Hashing
Competition (https://password-hashing.net/).
Gentoo-Bug: https://bugs.gentoo.org/597062
Closes: https://github.com/gentoo/gentoo/pull/2561
Diffstat (limited to 'app-crypt/argon2')
-rw-r--r-- | app-crypt/argon2/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/argon2/argon2-20160821.ebuild | 30 | ||||
-rw-r--r-- | app-crypt/argon2/files/argon2-20160821-makefile-install-target.patch | 44 | ||||
-rw-r--r-- | app-crypt/argon2/files/argon2-20160821-makefile-soname-symlinks.patch | 28 | ||||
-rw-r--r-- | app-crypt/argon2/metadata.xml | 13 |
5 files changed, 116 insertions, 0 deletions
diff --git a/app-crypt/argon2/Manifest b/app-crypt/argon2/Manifest new file mode 100644 index 000000000000..2a1ad7d2ffb1 --- /dev/null +++ b/app-crypt/argon2/Manifest @@ -0,0 +1 @@ +DIST argon2-20160821.tar.gz 1170019 SHA256 f81456ae31337a13a1a1b8ffe994d71ace741833a97a75f0c1a76259639bf3b8 SHA512 e5b7484a2f3212d78481e7994457d69e5f42d6132b31f86d8de106e8e3fa8ffa3b7244fd74b63d15846be3a0fd407e6c57c6f766cdfa0ee1e3d7706124853b5f WHIRLPOOL ad476d23572ebe8701a71a79aff09dd08a0db3dde9b0a6104884a91309d651298adfb514cc7de9c585672ffbc816c9afae67cbbe09b3f9a300624036981c3d78 diff --git a/app-crypt/argon2/argon2-20160821.ebuild b/app-crypt/argon2/argon2-20160821.ebuild new file mode 100644 index 000000000000..372efd321795 --- /dev/null +++ b/app-crypt/argon2/argon2-20160821.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="Password hashing software that won the Password Hashing Competition (PHC)" +HOMEPAGE="https://github.com/P-H-C/phc-winner-argon2" +SRC_URI="https://github.com/P-H-C/phc-winner-argon2/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( Apache-2.0 CC0-1.0 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="-static-libs" + +S="${WORKDIR}/phc-winner-${P}" +PATCHES=( + "${FILESDIR}/${P}-makefile-install-target.patch" + "${FILESDIR}/${P}-makefile-soname-symlinks.patch" + ) +src_prepare() { + default + if ! use static-libs; then + sed -i -e 's/LIBRARIES = \$(LIB_SH) \$(LIB_ST)/LIBRARIES = \$(LIB_SH)/' Makefile || die "sed failed!" + fi + sed -i -e 's/-O3 //' Makefile || die "sed failed" + sed -i -e 's/-g //' Makefile || die "sed failed" + sed -i -e "s/-march=\$(OPTTARGET) /${CFLAGS} /" Makefile || die "sed failed" + sed -i -e 's/CFLAGS += -march=\$(OPTTARGET)//' Makefile || die "sed failed" +} diff --git a/app-crypt/argon2/files/argon2-20160821-makefile-install-target.patch b/app-crypt/argon2/files/argon2-20160821-makefile-install-target.patch new file mode 100644 index 000000000000..bcd8562a21c4 --- /dev/null +++ b/app-crypt/argon2/files/argon2-20160821-makefile-install-target.patch @@ -0,0 +1,44 @@ +diff --git a/Makefile b/Makefile +index e9d27c8..90c1818 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,11 +80,25 @@ endif + + LIB_SH := lib$(LIB_NAME).$(LIB_EXT) + LIB_ST := lib$(LIB_NAME).a ++LIBRARIES = $(LIB_SH) $(LIB_ST) ++HEADERS = include/argon2.h + +-.PHONY: clean dist format $(GENKAT) ++INSTALL = install ++ ++DESTDIR = ++PREFIX = /usr ++INCLUDE_REL = include ++LIBRARY_REL = lib ++BINARY_REL = bin ++ ++INST_INCLUDE = $(DESTDIR)$(PREFIX)/$(INCLUDE_REL) ++INST_LIBRARY = $(DESTDIR)$(PREFIX)/$(LIBRARY_REL) ++INST_BINARY = $(DESTDIR)$(PREFIX)/$(BINARY_REL) ++ ++.PHONY: clean dist format $(GENKAT) all install + + all: clean $(RUN) libs +-libs: $(LIB_SH) $(LIB_ST) ++libs: $(LIBRARIES) + + $(RUN): $(SRC) $(SRC_RUN) + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ +@@ -129,3 +143,11 @@ testci: $(SRC) src/test.c + format: + clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4}" \ + -i include/*.h src/*.c src/*.h src/blake2/*.c src/blake2/*.h ++ ++install: $(RUN) libs ++ $(INSTALL) -d $(INST_INCLUDE) ++ $(INSTALL) $(HEADERS) $(INST_INCLUDE) ++ $(INSTALL) -d $(INST_LIBRARY) ++ $(INSTALL) $(LIBRARIES) $(INST_LIBRARY) ++ $(INSTALL) -d $(INST_BINARY) ++ $(INSTALL) $(RUN) $(INST_BINARY) diff --git a/app-crypt/argon2/files/argon2-20160821-makefile-soname-symlinks.patch b/app-crypt/argon2/files/argon2-20160821-makefile-soname-symlinks.patch new file mode 100644 index 000000000000..11892de11158 --- /dev/null +++ b/app-crypt/argon2/files/argon2-20160821-makefile-soname-symlinks.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile b/Makefile +index 1838c13..85aa710 100644 +--- a/Makefile ++++ b/Makefile +@@ -87,8 +87,10 @@ endif + endif + + LIB_SH := lib$(LIB_NAME).$(LIB_EXT) ++LIB_SH_VERSION := $(LIB_SH).0 + LIB_ST := lib$(LIB_NAME).a + LIBRARIES = $(LIB_SH) $(LIB_ST) ++INSTALL_LIBRARIES = $(LIBRARIES) $(LIB_SH_VERSION) + HEADERS = include/argon2.h + + INSTALL = install +@@ -153,9 +155,11 @@ format: + -i include/*.h src/*.c src/*.h src/blake2/*.c src/blake2/*.h + + install: $(RUN) libs ++ mv $(LIB_SH) $(LIB_SH_VERSION) ++ ln -sf $(LIB_SH_VERSION) $(LIB_SH) + $(INSTALL) -d $(INST_INCLUDE) + $(INSTALL) $(HEADERS) $(INST_INCLUDE) + $(INSTALL) -d $(INST_LIBRARY) +- $(INSTALL) $(LIBRARIES) $(INST_LIBRARY) ++ $(INSTALL) $(INSTALL_LIBRARIES) $(INST_LIBRARY) + $(INSTALL) -d $(INST_BINARY) + $(INSTALL) $(RUN) $(INST_BINARY) diff --git a/app-crypt/argon2/metadata.xml b/app-crypt/argon2/metadata.xml new file mode 100644 index 000000000000..62b022eda636 --- /dev/null +++ b/app-crypt/argon2/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>simon-bgo@slevermann.de</email> + <name>Simon Levermann</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription>Argon2 is a password hashing tool and library that won the Password Hashing Competition (PHC)</longdescription> +</pkgmetadata> |