Move ldc internal headers to /usr/lib/ldc to avoid conflicting with gdc

This matches with what Debian does, and is what the gcc maintainers
suggest.

The idea is to have ldc internal headers (those that cannot be used by
gdc and cause conflicts) in /usr/lib/ldc/%{_target_platform}/include/d/,
and keep library header files (those that both ldc and gdc can use) in
/usr/include/d/.

https://bugzilla.redhat.com/show_bug.cgi?id=1781685
epel9
Kalev Lember 4 years ago
parent e4bba744df
commit 4150b47499

@ -0,0 +1,19 @@
Description: Fix ldc.conf to search in right paths
ldc (1:1.1.0-2) unstable; urgency=medium
.
* Multiarch enable
* Install includes separately to avoid clash with gdc (Closes: #827211)
Author: Konstantinos Margaritis <markos@debian.org>
Bug-Debian: https://bugs.debian.org/827211
--- a/ldc2_install.conf.in
+++ b/ldc2_install.conf.in
@@ -23,6 +23,7 @@
// default switches appended after all explicit command-line switches
post-switches = [
"-I@INCLUDE_INSTALL_DIR@",
+ "-I/usr/include/d",
];
// default directories to be searched for libraries when linking
lib-dirs = [

@ -36,6 +36,9 @@ Source1: https://github.com/ldc-developers/ldc/releases/download/v%{boots
%endif
Source3: macros.%{name}
# Make sure /usr/include/d is in the include search path
Patch0: ldc-include-path.patch
ExclusiveArch: %{ldc_arches}
%if ! 0%{?bootstrap_stage1}
@ -158,7 +161,7 @@ popd
%endif
%cmake -DMULTILIB:BOOL=OFF \
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
-DINCLUDE_INSTALL_DIR:PATH=%{_prefix}/lib/ldc/%{_target_platform}/include/d \
-DLLVM_CONFIG:PATH=llvm-config-%{?llvm_version:%{llvm_version}-}%{__isa_bits} \
%if 0%{?bootstrap_stage2}
-DD_COMPILER:PATH=`pwd`/build-bootstrap2/bin/ldmd2 \
@ -195,12 +198,15 @@ install -m0644 phobos.d.tags %{buildroot}/%{_datadir}/geany/tags/
%{_bindir}/ldc-profdata
%{_bindir}/ldc-prune-cache
%{_rpmconfigdir}/macros.d/macros.ldc
%dir %{_includedir}/d
%{_includedir}/d/core
%{_includedir}/d/etc
%{_includedir}/d/ldc
%{_includedir}/d/object.d
%{_includedir}/d/std
%dir %{_prefix}/lib/ldc
%dir %{_prefix}/lib/ldc/%{_target_platform}
%dir %{_prefix}/lib/ldc/%{_target_platform}/include
%dir %{_prefix}/lib/ldc/%{_target_platform}/include/d
%{_prefix}/lib/ldc/%{_target_platform}/include/d/core
%{_prefix}/lib/ldc/%{_target_platform}/include/d/etc
%{_prefix}/lib/ldc/%{_target_platform}/include/d/ldc
%{_prefix}/lib/ldc/%{_target_platform}/include/d/object.d
%{_prefix}/lib/ldc/%{_target_platform}/include/d/std
%{_libdir}/libdruntime-ldc-debug-shared.so
%{_libdir}/libdruntime-ldc-shared.so
%{_libdir}/libldc-jit-rt.a
@ -238,6 +244,7 @@ install -m0644 phobos.d.tags %{buildroot}/%{_datadir}/geany/tags/
* Fri Aug 21 2020 Kalev Lember <klember@redhat.com> - 1:1.23.0-1
- Update to 1.23.0
- Merge -devel subpackages into the main ldc package
- Move ldc internal headers to /usr/lib/ldc to avoid conflicting with gdc (#1781685)
* Fri Aug 21 2020 Kalev Lember <klember@redhat.com> - 1:1.20.1-5
- Explicitly build against llvm10 compat package

Loading…
Cancel
Save