diff --git a/dev-libs/lsbcrypt/files/1.0.0-fix-flags-directry.patch b/dev-libs/lsbcrypt/files/1.0.0-fix-flags-directry.patch deleted file mode 100644 index 75c4a083ef..0000000000 --- a/dev-libs/lsbcrypt/files/1.0.0-fix-flags-directry.patch +++ /dev/null @@ -1,14 +0,0 @@ -I am attempting to fix the following bugs. -https://bugs.gentoo.org/909726 -diff --git a/Makefile b/Makefile -index 03ebfa5..bed7d39 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,5 +1,5 @@ --CC = gcc --CFLAGS = $(shell grep '^CFLAGS = ' crypt_blowfish/Makefile | cut -d= -f2-) -+#CC = gcc -+#CFLAGS = $(shell grep '^CFLAGS = ' crypt_blowfish/Makefile | cut -d= -f2-) - .PHONY: crypt_blowfish - - all: bcrypt.a diff --git a/dev-libs/lsbcrypt/lsbcrypt-1.0.0-r2.ebuild b/dev-libs/lsbcrypt/lsbcrypt-1.0.0-r2.ebuild index 605f740e3f..a692e84949 100644 --- a/dev-libs/lsbcrypt/lsbcrypt-1.0.0-r2.ebuild +++ b/dev-libs/lsbcrypt/lsbcrypt-1.0.0-r2.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit toolchain-funcs + COMMIT="55ff64349dec3012cfbbb1c4f92d4dbd46920213" DESCRIPTION="libcrypt wrapper for LiteSpeedTech" @@ -17,11 +19,21 @@ KEYWORDS="~amd64" PATCHES=( "${FILESDIR}"/${PV}-fix-tests.patch - "${FILESDIR}"/${PV}-fix-flags-directly.patch ) -src_test() { +src_prepare() { default + + # fix hardcoded ar + sed -i "s/ar/$(tc-getAR)/" Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_test() { + emake test CC="$(tc-getCC)" CFLAGS="${CFLAGS}" ./bcrypt_test || die "Tests failed!" }