SHA256
1
0
forked from pool/julia

- There should be a package libjulia19.

- CFLAGS and CXXFLAGS use %optflags.

OBS-URL: https://build.opensuse.org/package/show/science/julia?expand=0&rev=140
This commit is contained in:
Soc Virnyl Estela 2023-12-17 10:50:38 +00:00 committed by Git OBS Bridge
parent a460fccb88
commit 0eec3b1d56
2 changed files with 29 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Dec 17 10:46:54 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- There should be a package libjulia19.
- CFLAGS and CXXFLAGS use %optflags.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 13 00:36:26 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl> Wed Dec 13 00:36:26 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>

View File

@ -32,6 +32,7 @@
%define libjulia_sover_major 1 %define libjulia_sover_major 1
%define libjulia_sover_minor 9 %define libjulia_sover_minor 9
%define libname libjulia%{libjulia_sover_major}%{libjulia_sover_minor}
%if "@BUILD_FLAVOR@%{nil}" == "compat" %if "@BUILD_FLAVOR@%{nil}" == "compat"
%define compat_mode 1 %define compat_mode 1
%else %else
@ -147,6 +148,8 @@ ExclusiveArch: x86_64
%else %else
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
%endif %endif
# Julia requires this or it will break
Requires: %{name}-devel = %{version}
%description %description
Julia is a high-level, high-performance dynamic programming language for Julia is a high-level, high-performance dynamic programming language for
@ -162,11 +165,12 @@ to use julia, please install juliaup instead.
%package devel %package devel
Summary: Julia development, debugging and testing files Summary: Julia development, debugging and testing files
Version: %{version}
Group: Development/Languages/Other Group: Development/Languages/Other
Requires: %{name} = %{version} Requires: %{libname} = %{version}
%if 0%{?compat_mode} %if 0%{?compat_mode}
Conflicts: julia-devel Conflicts: julia-devel
Provides: julia-devel = %{version} Provides: julia-devel
%endif %endif
%description devel %description devel
@ -176,6 +180,13 @@ debugging version of Julia. This package is normally not needed when programming
in the Julia language, but rather for embedding Julia into external programs or in the Julia language, but rather for embedding Julia into external programs or
debugging Julia itself. debugging Julia itself.
%package -n %{libname}
Summary: Julia shared object libraries
Group: System/Libraries
%description -n %{libname}
Contains library files for interacting with Julia through C interfaces.
%prep %prep
%setup -q -n julia-%{version} %setup -q -n julia-%{version}
patch -p1 -i %{PATCH1} patch -p1 -i %{PATCH1}
@ -250,11 +261,8 @@ sed "s/ \$(build_prefix)\\/manifest\\/zlib//" -i deps/llvm.mk
export LDFLAGS="$LDFLAGS -latomic" export LDFLAGS="$LDFLAGS -latomic"
%endif %endif
# We need these compilation flags to avoid error when building MBEDTLS with export CFLAGS="%{optflags}"
# GCC-11. export CXXFLAGS="%{optflags}"
# Ref.: https://build.opensuse.org/package/show/security:tls/mbedtls
export CFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
export CXXFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib
pushd deps pushd deps
@ -327,11 +335,8 @@ fi
# make %{?_smp_mflags} test # make %{?_smp_mflags} test
%install %install
# We need these compilation flags to avoid error when building MBEDTLS with export CFLAGS="%{optflags}"
# GCC-11. export CXXFLAGS="%{optflags}"
# Ref.: https://build.opensuse.org/package/show/security:tls/mbedtls
export CFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
export CXXFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib
make install DESTDIR=%{buildroot} \ make install DESTDIR=%{buildroot} \
@ -434,7 +439,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives
if [ "x%{_lib}" != xlib ] ; then if [ "x%{_lib}" != xlib ] ; then
mkdir -p %{buildroot}%{_prefix}/lib mkdir -p %{buildroot}%{_prefix}/lib
ln -sf %{_libdir}/julia %{buildroot}%{_prefix}/lib/julia ln -sf %{_libdir}/julia %{buildroot}%{_prefix}/lib/julia
fi fi
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia
@ -452,6 +457,8 @@ fi
%post devel -p /sbin/ldconfig %post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig %postun devel -p /sbin/ldconfig
%post %{libname} -p /sbin/ldconfig
%postun %{libname} -p /sbin/ldconfig
%files %files
%doc CONTRIBUTING.md NEWS.md README.md %doc CONTRIBUTING.md NEWS.md README.md
@ -486,7 +493,9 @@ fi
%{_datadir}/julia/test/ %{_datadir}/julia/test/
%{_datadir}/julia/julia-config.jl %{_datadir}/julia/julia-config.jl
%{_includedir}/julia/ %{_includedir}/julia/
%{_libdir}/libjulia.so.%{libjulia_sover_major}
%{_libdir}/libjulia.so %{_libdir}/libjulia.so
%files -n %{libname}
%{_libdir}/libjulia.so.*
%changelog %changelog