aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Horodniceanu <a.horodniceanu@proton.me>2024-06-01 07:27:48 +0300
committerAndrei Horodniceanu <a.horodniceanu@proton.me>2024-06-01 19:54:01 +0300
commit82a9bfa278c2d1b2828a59ae59f7a4e096c63ef4 (patch)
tree43eeb3a1fb3ddfba57068c6b808fa98e00727ffc
parentx11-terms/tilix: backport upstream fixes (diff)
downloaddlang-82a9bfa278c2d1b2828a59ae59f7a4e096c63ef4.tar.gz
dlang-82a9bfa278c2d1b2828a59ae59f7a4e096c63ef4.tar.bz2
dlang-82a9bfa278c2d1b2828a59ae59f7a4e096c63ef4.zip
x11-terms/tilix: let meson handle LDFLAGS for dmd and ldc2
Meson is too eager to transform the already transformed by the eclass LDFLAGS from gcc-style (-Wl, prefixed) to dmd-style (-L prefixed). This leads to flags receiving a double prefix. Specifically -Wl,-z,pack-relative-relocs is transformed by the eclass into -L-z -Lpack-relative-relocs which meson then transforms into -L-z -L=-Lpack-relative-relocs making it ignore the flag and swallow the next one. If meson is given the raw LDFLAGS it will transform them properly. Additionally, don't specify DCFLAGS in the linker arguments, meson will add them by default anyway. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
-rw-r--r--x11-terms/tilix/tilix-1.9.6-r2.ebuild16
1 files changed, 15 insertions, 1 deletions
diff --git a/x11-terms/tilix/tilix-1.9.6-r2.ebuild b/x11-terms/tilix/tilix-1.9.6-r2.ebuild
index 5707050..d1d66cc 100644
--- a/x11-terms/tilix/tilix-1.9.6-r2.ebuild
+++ b/x11-terms/tilix/tilix-1.9.6-r2.ebuild
@@ -50,7 +50,21 @@ BDEPEND="
"
src_configure() {
- DFLAGS="${DCFLAGS}" meson_src_configure -Dd_link_args="${DCFLAGS} ${DLANG_LDFLAGS}"
+ # meson is very strict in how he expects the linker flags. It
+ # modifies our flags from:
+ # -Lz -Lpack-relative-relocs
+ # to:
+ # -Lz -L=-Lpack-relative-relocs
+ #
+ # Note that specyfing -L=z -L=pack-relative-relocs is still not enough
+ # as meson modifies the second argument again.
+ #
+ # This only works so long as the eclass doesn't add any extra flags
+ # for dmd or ldc (it does for gdc).
+ local largs
+ [[ ${EDC} != gdc* ]] && largs="${LDFLAGS}" || largs="${DLANG_LDFLAGS}"
+
+ DFLAGS="${DCFLAGS}" meson_src_configure -Dd_link_args="${largs}"
}
pkg_postinst() {