summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hyunkoo Jee <edjee@google.com>2018-05-30 19:28:37 -0400
committerAaron Bauman <bman@gentoo.org>2018-06-07 21:28:26 -0400
commited1d845779b056dd89930a60f0b522b512b60729 (patch)
tree18b6f572f7ad1239d75acbb958d02fc424a8ba19 /app-crypt/efitools
parentapp-crypt/efitools: apply patch to fix make rules (diff)
downloadgentoo-ed1d845779b056dd89930a60f0b522b512b60729.tar.gz
gentoo-ed1d845779b056dd89930a60f0b522b512b60729.tar.bz2
gentoo-ed1d845779b056dd89930a60f0b522b512b60729.zip
app-crypt/efitools: support "static" USE flag
If "static" USE flag is set, it makes sense to do static link for user-space executables.
Diffstat (limited to 'app-crypt/efitools')
-rw-r--r--app-crypt/efitools/efitools-1.8.1.ebuild17
1 files changed, 14 insertions, 3 deletions
diff --git a/app-crypt/efitools/efitools-1.8.1.ebuild b/app-crypt/efitools/efitools-1.8.1.ebuild
index d27b90b2cbc1..3e25812bea21 100644
--- a/app-crypt/efitools/efitools-1.8.1.ebuild
+++ b/app-crypt/efitools/efitools-1.8.1.ebuild
@@ -12,15 +12,21 @@ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snaps
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="libressl"
+IUSE="libressl static"
-RDEPEND="!libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
+LIB_DEPEND="!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+ libressl? ( dev-libs/libressl:0=[static-libs(+)] )"
+
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
sys-apps/util-linux"
DEPEND="${RDEPEND}
app-crypt/sbsigntool
dev-perl/File-Slurp
+ static? (
+ ${LIB_DEPEND}
+ dev-util/pkgconfig
+ )
sys-apps/help2man
sys-boot/gnu-efi
virtual/pkgconfig"
@@ -31,6 +37,11 @@ PATCHES=(
)
src_prepare() {
+ if use static; then
+ append-ldflags -static
+ sed -i 's/-lcrypto/`pkg-config --static --libs libcrypto`/g' Makefile || die
+ fi
+
# Respect users CFLAGS
sed -i -e 's/CFLAGS.*= -O2 -g/CFLAGS += /' Make.rules || die