%define major 9 %define libname %mklibname cling %major %define develname %mklibname cling -d %undefine __cmake3_in_source_build %global debug_package %{nil} %define llvm_version 9.0.1 Name: cling Version: 0.9 Release: %mkrel 8 Summary: The Interactive C++ Interpreter License: MIT URL: https://github.com/root-project/%{name} Source0: llvm.tar.gz Source1: cling.tar.gz Source2: clang.tar.gz Source3: get-sources.sh Patch0: llvm-gcc12.patch Patch1: cling-cmake.patch Group: Development/C++ BuildRequires: gcc-c++ BuildRequires: cmake3 BuildRequires: git Requires: %libname = %{version}-%{release} %description Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure. Cling realizes the read-eval-print loop (REPL) concept, in order to leverage rapid application development. Implemented as a small extension to LLVM and Clang, the interpreter reuses their strengths such as the praised concise and expressive compiler diagnostics. %package -n %libname Summary: Library for applications that use cling functionality Provides: cling-libs %description -n %libname Library for applications that use cling functionality. %package -n %develname Summary: Header files for build applications that use cling Requires: %libname = %{version}-%{release} Provides: cling-devel Provides: devel(libclingInterpreter) = %{version} Provides: devel(libclingMetaProcessor) = %{version} Provides: devel(libclingUtils) = %{version} %description -n %develname Header files for build applications that use cling. %prep %setup -q -n llvm %patch0 -p1 pushd tools tar xzf %{SOURCE2} tar xzf %{SOURCE1} popd %patch1 -p1 %build CXXFLAGS="%{build_cxxflags} -DLLVM_ENABLE_ABI_BREAKING_CHECKS" %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF \ -DCLING_EXPORTS= \ -DCLING_HAS_EXPORTS=ON \ -DLLVM_ABI_BREAKING_CHECKS=FORCE_ON \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 %endif %cmake_build %check %ctest %install %cmake_install # Create ldconfig configuration mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d echo %{_libdir}/%{name} > \ %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir} %{buildroot}%{_bindir}/* || true mkdir -p %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}%{_libexecdir}/%{name} cp ./build/%{_lib}/cmake/cling/ClingTargets.cmake %{buildroot}%{_libdir}/cmake/%{name} mv %{buildroot}%{_libdir}/lib* %{buildroot}%{_libdir}/%{name} mv %{buildroot}%{_libdir}/*Plugin.so %{buildroot}%{_libdir}/%{name} mv %{buildroot}%{_bindir}/* %{buildroot}%{_libexecdir}/%{name} mv %{buildroot}%{_includedir}/clang %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_includedir}/clang-c %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_includedir}/llvm %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_includedir}/llvm-c %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_libexecdir}/%{name}/%{name} %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} mv %{buildroot}%{_datadir}/opt-viewer %{buildroot}%{_datadir}/%{name} mv %{buildroot}%{_datadir}/scan-build %{buildroot}%{_datadir}/%{name} mv %{buildroot}%{_datadir}/scan-view %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_libexecdir}/lib ln -s ../../%{_lib}/clang %{buildroot}%{_libexecdir}/lib sed -i -e 's!/bin/!/libexec/cling/!g' -e 's!/%{_lib}/!/%{_lib}/cling/!g' \ %{buildroot}%{_libdir}/cmake/cling/clang/ClangTargets-release.cmake \ %{buildroot}%{_libdir}/cmake/cling/llvm/LLVMExports-release.cmake sed -i -e 's!'`pwd`'/build/%{_lib}/!%{_libdir}/%{name}/!g' \ %{buildroot}%{_libdir}/cmake/cling/ClingTargets.cmake %files %{_bindir}/cling %{_libexecdir}/*-analyzer %{_datadir}/clang %{_datadir}/cling %{_datadir}/man/man1/*.1* %files -n %libname %{_libdir}/%{name}/lib*.so.%{major}* %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/clang %{_libexecdir}/lib/clang %files -n %develname %{_libexecdir}/%{name}/ %{_libdir}/%{name}/lib*.so %{_libdir}/%{name}/*Plugin.so %{_includedir}/%{name}/ %{_libdir}/cmake/%{name}/ %changelog * Sat Dec 10 2022 papoteur <papoteur> 0.9-8.mga9 + Revision: 1920283 - add Provides needed by xeus-cling * Sat Jul 09 2022 joequant <joequant> 0.9-7.mga9 + Revision: 1868112 - update cling deps * Sat Jul 09 2022 joequant <joequant> 0.9-6.mga9 + Revision: 1868111 - rearrange devel * Fri Jul 08 2022 joequant <joequant> 0.9-5.mga9 + Revision: 1867996 - fix lib location * Thu Jul 07 2022 joequant <joequant> 0.9-4.mga9 + Revision: 1867961 - fix up compile * Wed Jul 06 2022 joequant <joequant> 0.9-3.mga9 + Revision: 1867841 - fix typo - fix dir structure - avoid conflict with llvm * Tue Jul 05 2022 joequant <joequant> 0.9-2.mga9 + Revision: 1867728 - fix lib copy - update file locations * Sun Jun 26 2022 joequant <joequant> 0.9-1.mga9 + Revision: 1866288 - imported package cling