diff --git a/julia.spec b/julia.spec index c17f67a..7a622c6 100644 --- a/julia.spec +++ b/julia.spec @@ -9,7 +9,7 @@ Name: julia Version: 0.4.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: High-level, high-performance dynamic language for technical computing Group: Development/Languages # Julia itself is MIT, with a few LGPLv2+ and GPLv2+ files @@ -48,27 +48,14 @@ BuildRequires: perl BuildRequires: suitesparse-devel BuildRequires: utf8proc-devel >= 1.3 BuildRequires: zlib-devel -# Dependencies loaded at run time by Julia code -# and thus not detected by find-requires -Requires: arpack -Requires: dSFMT -Requires: fftw >= 3.3.2 # Needed for package management until the switch to libgit2 Requires: git -Requires: gmp >= 5.0 Requires: julia-common = %{version}-%{release} -Requires: libgit2 >= 0.21 -Requires: mpfr >= 3.0 %if 0%{?__isa_bits} == 64 Requires: openblas-threads64_ %else Requires: openblas-threads %endif -%ifarch %{ix86} x86_64 -Requires: openlibm >= 0.4 -%endif -Requires: openspecfun >= 0.4 -Requires: pcre2 # Currently, Julia does not work properly architectures other than x86 # https://bugzilla.redhat.com/show_bug.cgi?id=1158024 # https://bugzilla.redhat.com/show_bug.cgi?id=1158026 @@ -178,6 +165,28 @@ make %{commonopts} -C test %install make %commonopts DESTDIR=%{buildroot} install +# Julia currently needs the unversioned .so files: +# https://github.com/JuliaLang/julia/issues/6742 +# By creating symlinks to versioned libraries, we hardcode a dependency +# on the specific SOVERSION so that any breaking update in one of the +# dependencies can be detected (just as what happens with the C linker). +# Automatic dependency detection is smart enough to add Requires as needed. +pushd %{buildroot}%{_libdir}/julia + ln -s $(realpath %{_libdir}/libarpack.so) libarpack.so + ln -s $(realpath %{_libdir}/libcholmod.so) libcholmod.so + ln -s $(realpath %{_libdir}/libdSFMT.so) libdSFMT.so + ln -s $(realpath %{_libdir}/libgit2.so) libgit2.so + ln -s $(realpath %{_libdir}/libfftw3.so) libfftw3.so + ln -s $(realpath %{_libdir}/libgmp.so) libgmp.so + ln -s $(realpath %{_libdir}/libmpfr.so) libmpfr.so +%ifarch %{ix86} x86_64 + ln -s $(realpath %{_libdir}/libopenlibm.so) libopenlibm.so +%endif + ln -s $(realpath %{_libdir}/libopenspecfun.so) libopenspecfun.so + ln -s $(realpath %{_libdir}/libpcre2.so) libpcre2.so + ln -s $(realpath %{_libdir}/libumfpack.so) libumfpack.so +popd + cp -p CONTRIBUTING.md LICENSE.md NEWS.md README.md %{buildroot}%{_docdir}/julia/ pushd %{buildroot}%{_prefix}/share/man/man1/ @@ -249,36 +258,12 @@ desktop-file-validate %{buildroot}%{_datarootdir}/applications/%{name}.desktop %post /sbin/ldconfig -# Julia currently needs the unversioned .so files: -# https://github.com/JuliaLang/julia/issues/6742 -ln -sf %{_libdir}/libarpack.so.2 %{_libdir}/julia/libarpack.so -ln -sf %{_libdir}/libcholmod.so.3 %{_libdir}/julia/libcholmod.so -ln -sf %{_libdir}/libdSFMT.so.2 %{_libdir}/julia/libdSFMT.so -ln -sf %{_libdir}/libgit2.so.23 %{_libdir}/julia/libgit2.so -ln -sf %{_libdir}/libfftw3_threads.so.3 %{_libdir}/julia/libfftw3_threads.so -ln -sf %{_libdir}/libgmp.so.10 %{_libdir}/julia/libgmp.so -ln -sf %{_libdir}/libmpfr.so.4 %{_libdir}/julia/libmpfr.so -ln -sf %{_libdir}/libopenlibm.so.1 %{_libdir}/julia/libopenlibm.so -ln -sf %{_libdir}/libopenspecfun.so.1 %{_libdir}/julia/libopenspecfun.so -ln -sf %{_libdir}/libpcre2-8.so.0 %{_libdir}/julia/libpcre2-8.so -ln -sf %{_libdir}/libumfpack.so.5 %{_libdir}/julia/libumfpack.so /bin/touch --no-create %{_datarootdir}/icons/hicolor &>/dev/null || : exit 0 %postun /sbin/ldconfig if [ $1 -eq 0 ] ; then - rm -f %{_libdir}/julia/libarpack.so - rm -f %{_libdir}/julia/libcholmod.so - rm -f %{_libdir}/julia/libdSFMT.so - rm -f %{_libdir}/julia/libgit2.so - rm -f %{_libdir}/julia/libfftw3_threads.so - rm -f %{_libdir}/julia/libgmp.so - rm -f %{_libdir}/julia/libmpfr.so - rm -f %{_libdir}/julia/libopenlibm.so - rm -f %{_libdir}/julia/libopenspecfun.so - rm -f %{_libdir}/julia/libpcre2-8.so - rm -f %{_libdir}/julia/libumfpack.so /bin/touch --no-create %{_datarootdir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datarootdir}/icons/hicolor &>/dev/null || : fi @@ -288,6 +273,10 @@ exit 0 /usr/bin/gtk-update-icon-cache %{_datarootdir}/icons/hicolor &>/dev/null || : %changelog +* Tue Mar 1 2016 Milan Bouchet-Valat - 0.4.3-5 +- Automate generation of library symlinks, and include them in the package instead of + in %%post so that dependencies on specific library versions are detected. + * Fri Feb 26 2016 Suvayu Ali - 0.4.3-4 - Fix broken symlinks in libdir