From: "Marco Leise" <marco.leise@gmx.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/user/dlang:master commit in: eclass/
Date: Sun, 17 Dec 2023 11:58:07 +0000 (UTC) [thread overview]
Message-ID: <1702245214.1bb2eb6ab240eec201a15cb78ed0fed2d7c6f9c3.mleise@gentoo> (raw)
commit: 1bb2eb6ab240eec201a15cb78ed0fed2d7c6f9c3
Author: Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Thu Nov 30 19:13:46 2023 +0000
Commit: Marco Leise <marco.leise <AT> gmx <DOT> de>
CommitDate: Sun Dec 10 21:53:34 2023 +0000
URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=1bb2eb6a
dlang.eclass: export PKG_CONFIG_* in phase functions
PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH will now be set to a list of the
the system pkg-config directories and the compiler specific one, allowing
packages that use build systems to easily find both their C and D
dependencies.
Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> proton.me>
eclass/dlang.eclass | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/eclass/dlang.eclass b/eclass/dlang.eclass
index 2817779..ab41b18 100644
--- a/eclass/dlang.eclass
+++ b/eclass/dlang.eclass
@@ -610,6 +610,17 @@ _dlang_use_build_vars() {
# The original value is exported as LIBDIR_HOST.
local libdir_var="LIBDIR_${ABI}"
export LIBDIR_HOST="${!libdir_var}"
+ # Save the default pkgconfig path
+ if [[ ! -v DLANG_SAVE_PKG_CONFIG_PATH ]]; then
+ # Copy the logic from meson.eclass for setting PKG_CONFIG_PATH
+ export DLANG_SAVE_PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH:+:}/usr/share/pkgconfig"
+ fi
+ if [[ ! -v DLANG_SAVE_PKG_CONFIG_LIBDIR ]]; then
+ # either save the value or provide a sane default lest other eclasses get confused.
+ # e.g. meson.eclass will set PKG_CONFIG_LIBDIR using $(get_libdir) which won't
+ # work properly since we will overwrite $LIBDIR_$ABI
+ export DLANG_SAVE_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-/usr/$(get_libdir)/pkgconfig}"
+ fi
export ABI="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f1)"
export DC="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f2)"
export DC_VERSION="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f3)"
@@ -699,6 +710,13 @@ _dlang_use_build_vars() {
filter-ldflags -f{no-,}use-linker-plugin -f{no-,}lto -flto=*
fi
export LDFLAGS=`dlang_convert_ldflags`
+
+ # Add the compiler specific pkgconfig paths.
+ export PKG_CONFIG_PATH="${DLANG_SAVE_PKG_CONFIG_PATH}:/usr/$(get_libdir)/pkgconfig"
+ # Technically, this value will stay the same so it's enough to export it once
+ # but it's cleaner to keep these 2 variables close together.
+ export PKG_CONFIG_LIBDIR="${DLANG_SAVE_PKG_CONFIG_LIBDIR}"
+
"${@}"
}
next reply other threads:[~2023-12-17 11:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-17 11:58 Marco Leise [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-08 14:56 [gentoo-commits] repo/user/dlang:master commit in: eclass/ Horodniceanu Andrei
2024-08-30 7:58 Horodniceanu Andrei
2024-07-14 19:44 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-04-26 20:25 Horodniceanu Andrei
2024-04-22 20:03 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-02-20 17:54 Horodniceanu Andrei
2024-02-18 22:49 Horodniceanu Andrei
2024-02-18 22:49 Horodniceanu Andrei
2023-12-17 11:58 Marco Leise
2023-12-17 11:58 Marco Leise
2023-11-17 21:44 Horodniceanu Andrei
2023-11-17 21:44 Horodniceanu Andrei
2023-10-01 14:01 Horodniceanu Andrei
2023-09-28 4:56 Marco Leise
2023-09-28 4:56 Marco Leise
2023-09-28 4:56 Marco Leise
2023-09-04 19:18 Marco Leise
2023-08-15 2:32 Marco Leise
2023-07-22 14:13 Marco Leise
2023-07-22 14:13 Marco Leise
2023-07-22 11:46 Marco Leise
2022-07-23 12:24 Marco Leise
2020-08-15 1:50 Marco Leise
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1702245214.1bb2eb6ab240eec201a15cb78ed0fed2d7c6f9c3.mleise@gentoo \
--to=marco.leise@gmx.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox