Version: 0.19.0 Name: lfortran Release: 1%{?dist} Summary: A modern Fortran compiler License: BSD-3-Clause URL: https://www.github.com/lfortran/lfortran Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: binutils-devel BuildRequires: bison BuildRequires: cmake BuildRequires: fmt-devel BuildRequires: gcc-c++ BuildRequires: json-devel BuildRequires: libffi-devel BuildRequires: libunwind-devel BuildRequires: libuuid-devel BuildRequires: llvm15-devel BuildRequires: python3-devel BuildRequires: rapidjson-devel BuildRequires: re2c BuildRequires: zlib-devel BuildRequires: zlib-static # Needed for Jupyter kernel ###BuildRequires: xeus-devel ###BuildRequires: xtl-devel ## Not yet packaged ###BuildRequires: xeus-zmq-devel %description LFortran is a modern open-source (BSD licensed) interactive Fortran compiler. It can execute user's code interactively to allow exploratory work (much like Python, MATLAB or Julia) as well as compile to binaries with the goal to run user's code on modern architectures such as multi-core CPUs and GPUs. %package devel Summary: A modern Fortran compiler Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for LFortran %package static Summary: A modern Fortran compiler Requires: %{name}%{?_isa} = %{version}-%{release} %description static Statir runtime library for LFortran %prep %autosetup -n %{name}-%{version} %build echo %{version} > version sed -i 's|ci/version.sh|#ci/version.sh|g' build0.sh sed -i 's|python src|%{python3} src|g' build0.sh sed -i 's|share/lfortran/lib|%{_libdir}/lfortran/modules|g' src/runtime/CMakeLists.txt bash build0.sh %cmake -DCMAKE_PREFIX_PATH=%{_libdir}/llvm15/ \ -DWITH_LLVM=ON \ -DWITH_RUNTIME_LIBRARY=ON \ -DWITH_FMT=ON \ -DWITH_JSON=ON \ -DWITH_STACKTRACE=ON \ -DWITH_UNWIND=ON \ -DWITH_XEUS=OFF \ -DWITH_ZLIB=ON %cmake_build %install %cmake_install mkdir -p %{buildroot}%{_includedir}/lfortran/impure mv %{buildroot}%{_datadir}/lfortran/lib/impure/lfortran_intrinsics.h \ %{buildroot}%{_includedir}/lfortran/impure mv %{buildroot}%{_datadir}/lfortran/lib/*.a \ %{buildroot}%{_libdir} mv %{buildroot}%{_datadir}/lfortran/lib/*.so \ %{buildroot}%{_libdir} #mkdir %{buildroot}%{_libdir}/lfortran #mkdir %{buildroot}%{_libdir}/lfortran/modules #mv %{buildroot}%{_datadir}/lfortran/lib/*.mod \ # %{buildroot}%{_libdir}/lfortran/modules %check %ctest %files %doc README.md %license LICENSE %{_bindir}/lfortran %{_libdir}/liblfortran_runtime.so %dir %{_libdir}/lfortran %dir %{_libdir}/lfortran/modules %{_libdir}/lfortran/modules/*.mod %files devel %dir %{_includedir}/lfortran %dir %{_includedir}/lfortran/impure %{_includedir}/lfortran/impure/lfortran_intrinsics.h %files static %{_libdir}/liblfortran_runtime_static.a %changelog * Fri Aug 04 2023 Benson Muite - 0.19.0-1 - Initial packaging