summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-04 17:37:30 +0100
committerSam James <sam@gentoo.org>2023-10-04 17:47:17 +0100
commit5b0f61ca5820d9fad9344c6681a79095d2ffa9cf (patch)
tree9902b20529a42e5631764aaed81da4bb4c071c6a /app-crypt
parentnet-analyzer/odhcploc: don't redefine _FORTIFY_SOURCE (diff)
downloadgentoo-5b0f61ca5820d9fad9344c6681a79095d2ffa9cf.tar.gz
gentoo-5b0f61ca5820d9fad9344c6681a79095d2ffa9cf.tar.bz2
gentoo-5b0f61ca5820d9fad9344c6681a79095d2ffa9cf.zip
app-crypt/libscrypt: don't redefine _FORTIFY_SOURCE
Closes: https://bugs.gentoo.org/892928 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/libscrypt/files/libscrypt-1.22-no-clobber-fortify-source.patch14
-rw-r--r--app-crypt/libscrypt/libscrypt-1.22-r1.ebuild31
2 files changed, 45 insertions, 0 deletions
diff --git a/app-crypt/libscrypt/files/libscrypt-1.22-no-clobber-fortify-source.patch b/app-crypt/libscrypt/files/libscrypt-1.22-no-clobber-fortify-source.patch
new file mode 100644
index 000000000000..c54dc522b380
--- /dev/null
+++ b/app-crypt/libscrypt/files/libscrypt-1.22-no-clobber-fortify-source.patch
@@ -0,0 +1,14 @@
+Don't clobber toolchain defaults.
+
+https://bugs.gentoo.org/892928
+--- a/Makefile
++++ b/Makefile
+@@ -5,7 +5,7 @@ MAKE_DIR ?= install -d
+ INSTALL_DATA ?= install
+
+ CC?=gcc
+-CFLAGS?=$(CFLAGS_EXTRA) -D_FORTIFY_SOURCE=2 -fPIC
++CFLAGS?=$(CFLAGS_EXTRA) -fPIC
+ LDFLAGS?=$(LDFLAGS_EXTRA) -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version
+ CFLAGS_EXTRA?=-Wl,-rpath=. -O2 -Wall -g -fstack-protector
+ LDFLAGS_EXTRA?=-Wl,-z,relro
diff --git a/app-crypt/libscrypt/libscrypt-1.22-r1.ebuild b/app-crypt/libscrypt/libscrypt-1.22-r1.ebuild
new file mode 100644
index 000000000000..71ad49bd50fc
--- /dev/null
+++ b/app-crypt/libscrypt/libscrypt-1.22-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Shared library to implement the scrypt algorithm"
+HOMEPAGE="https://github.com/technion/libscrypt"
+SRC_URI="https://github.com/technion/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.22-no-clobber-fortify-source.patch
+)
+
+src_configure() {
+ export LIBDIR=${PREFIX}/$(get_libdir)
+ export CFLAGS_EXTRA="${CFLAGS}"
+ export LDFLAGS_EXTRA="${LDFLAGS}"
+ export PREFIX=/usr
+ unset CFLAGS
+ unset LDFLAGS
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}