From 6ad54b82250823fdde6e32f8bb8870de35b5a774 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Feb 10 2023 16:03:14 +0000 Subject: restore ld.so.conf.d to workaround mock issue (rhbz#2166028) --- diff --git a/ghc.spec b/ghc.spec index 780697d..a353a90 100644 --- a/ghc.spec +++ b/ghc.spec @@ -586,15 +586,10 @@ sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynl %endif %endif -%if %{defined _ghcdynlibdir} -%if "%_ghcdynlibdir" != "%_libdir" -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_ghcdynlibdir}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf -%endif -%else # https://bugzilla.redhat.com/show_bug.cgi?id=2166028 +%if "%{?_ghcdynlibdir}" != "%_libdir" mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf +echo "%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf %endif for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do chrpath -d $i @@ -815,9 +810,10 @@ make test %if %{defined ghclibdir} +%if "%{?_ghcdynlibdir}" != "%_libdir" %post base -p /sbin/ldconfig %postun base -p /sbin/ldconfig - +%endif %transfiletriggerin compiler -- %{ghcliblib}/package.conf.d %ghc_pkg_recache