commit: 5d266a65cbd7c05a6dc7d4bdfe8ff4166cec5439
Author: Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Wed Aug 13 18:45:27 2025 +0000
Commit: Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Wed Aug 13 18:45:27 2025 +0000
URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=5d266a65
dev-libs/gtkd: Warn users to call env-update when built with gdc
Portage isn't smart enough to call it itself because the .so files are
installed in /usr/lib/gcc/${CHOST}/${GCC_SLOT}. Without calling it it's
possible for ld not to find it at run time, with errors such as:
./a.out: error while loading shared libraries: libgtkd-3.so.0: cannot open
shared object file: No such file or directory
Bug: https://bugs.gentoo.org/961463
Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
dev-libs/gtkd/gtkd-3.10.0-r2.ebuild | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dev-libs/gtkd/gtkd-3.10.0-r2.ebuild
b/dev-libs/gtkd/gtkd-3.10.0-r2.ebuild
index c66dc21..71f5905 100644
--- a/dev-libs/gtkd/gtkd-3.10.0-r2.ebuild
+++ b/dev-libs/gtkd/gtkd-3.10.0-r2.ebuild
@@ -171,6 +171,21 @@ multilib_src_install_all() {
foreach_used_component install_headers
}
+pkg_postinst() {
+ local have_gdc=0 u
+ for u in ${USE}; do
+ [[ ${u} != dlang_targets_gdc* ]] && continue
+
+ have_gdc=1
+ break
+ done
+
+ if [[ ${have_gdc} = 1 ]]; then
+ ewarn "Please run env-update before you use this package."
+ ewarn "gdc may not find this library until you do."
+ fi
+}
+
foreach_used_component() {
for (( i = 0 ; i < ${#GTKD_LIB_NAMES[@]} ; i++ )); do
if [[ "${GTKD_LIB_NAMES[$i]}" == "gtkd" ]] || use
${GTKD_USE_FLAGS[$i]}; then