summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2023-07-26 10:28:47 +0200
committerSam James <sam@gentoo.org>2023-07-26 09:41:01 +0100
commit4e5709ef2baaed3fc97fc2c968aa8965469cb3ae (patch)
tree376c623e54611d57503e6c8e8b1f6ff9ebe1be3a /net-misc/tinyssh
parentapp-emacs/php-mode: add live (diff)
downloadgentoo-4e5709ef2baaed3fc97fc2c968aa8965469cb3ae.tar.gz
gentoo-4e5709ef2baaed3fc97fc2c968aa8965469cb3ae.tar.bz2
gentoo-4e5709ef2baaed3fc97fc2c968aa8965469cb3ae.zip
net-misc/tinyssh: Use pkg-config instead of hardcoding libsodium flags
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Closes: https://github.com/gentoo/gentoo/pull/32045 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/tinyssh')
-rw-r--r--net-misc/tinyssh/tinyssh-20230101.ebuild10
-rw-r--r--net-misc/tinyssh/tinyssh-99999999.ebuild10
2 files changed, 12 insertions, 8 deletions
diff --git a/net-misc/tinyssh/tinyssh-20230101.ebuild b/net-misc/tinyssh/tinyssh-20230101.ebuild
index 6a91309a999d..4b288ff014ec 100644
--- a/net-misc/tinyssh/tinyssh-20230101.ebuild
+++ b/net-misc/tinyssh/tinyssh-20230101.ebuild
@@ -40,13 +40,15 @@ src_prepare() {
}
src_compile() {
+ tc-export PKG_CONFIG
+
if use sodium
then
emake \
- CC="$(tc-getCC)"
- LIBS="-lsodium" \
- CFLAGS="${CFLAGS} -I/usr/include/sodium" \
- LDFLAGS="${LDFLAGS} -L/usr/lib"
+ CC="$(tc-getCC)" \
+ LIBS="$("${PKG_CONFIG}" --libs libsodium)" \
+ CFLAGS="${CFLAGS} $("${PKG_CONFIG}" --cflags libsodium)" \
+ LDFLAGS="${LDFLAGS}"
else
emake CC="$(tc-getCC)"
fi
diff --git a/net-misc/tinyssh/tinyssh-99999999.ebuild b/net-misc/tinyssh/tinyssh-99999999.ebuild
index 6a91309a999d..4b288ff014ec 100644
--- a/net-misc/tinyssh/tinyssh-99999999.ebuild
+++ b/net-misc/tinyssh/tinyssh-99999999.ebuild
@@ -40,13 +40,15 @@ src_prepare() {
}
src_compile() {
+ tc-export PKG_CONFIG
+
if use sodium
then
emake \
- CC="$(tc-getCC)"
- LIBS="-lsodium" \
- CFLAGS="${CFLAGS} -I/usr/include/sodium" \
- LDFLAGS="${LDFLAGS} -L/usr/lib"
+ CC="$(tc-getCC)" \
+ LIBS="$("${PKG_CONFIG}" --libs libsodium)" \
+ CFLAGS="${CFLAGS} $("${PKG_CONFIG}" --cflags libsodium)" \
+ LDFLAGS="${LDFLAGS}"
else
emake CC="$(tc-getCC)"
fi