Skip to content

Commit

Permalink
app-crypt/argon2: Fix build under multilib-strict
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/627856
Closes: gentoo#5418
Package-Manager: Portage-2.3.6, Repoman-2.3.3
  • Loading branch information
sonOfRa authored and mgorny committed Aug 21, 2017
1 parent a290a16 commit 7aef8f2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app-crypt/argon2/argon2-20161029-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit multilib

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-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"
}

src_install() {
emake DESTDIR="${D}" LIBRARY_REL=$(get_libdir) install || die
}

0 comments on commit 7aef8f2

Please sign in to comment.