This is a hack to make it possible to switch EPEL package builds over
from llvm 14 to 15.
RHEL doesn't ship a compat version of llvm 14 and we need to make both
versions available at the same time somehow in order to build ldc with
itself and switch over to llvm 15 that's the default in RHEL 9.2.
The canonical way to do it would be to add a llvm14 compat package, but
in this case it's only needed to be able to perform a package rebuild in
koji (we don't need to make it available to end users) and it's not
worth adding the compat package only for that.
Pulling in geany as a build dep makes the buildroot huge as it has to
pull in all the graphical libraries for supporting geany.
Also, I strongly suspect nobody uses this. geany users are probably used
to generating the tags themselves for the things that they need. The
only packages currently in Fedora that ship geany tags are ldc and gtkd,
and nothing else.
For reasons I don't understand, without static libs present the
ldc bootstrap sequence fails on EPEL 8 with an ldc segfault when
compiling object files for the shared runtime.
Use binaries from ldc-1.8.0-1.fc29, llvm4.0-4.0.1-6.fc29 and
libffi-3.1-18.fc29 builds to re-bootstrap ldc on the ppc64le
architecture.
Bootstrap Exception: https://pagure.io/packaging-committee/issue/1209
Instead, use -wi (treat warnings as informational) for distro builds so
that new warnings don't break package builds.
While at this, also sync _d_optflags with Debian's DFLAGS and drop
unused _d_libdir definition.
ltsmaster doesn't support recent LLVM versions so we can't really use it
any more. If we need to bring up a new arch in the future we'll likely
need to use cross-compiling instead.
Starting with F35, rpmbuild now fails the build if standard RPATH is
detected (https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild).
This commit drops the previous chrpath hack and instead patches ldc to
drop rpath from ldc2.conf, which should prevent the rpath from being set
in the first place.