From d4737f4ba44bca9f80208b6f9a96b77f3a04cd25 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Thu, 7 Nov 2024 16:01:56 +0800 Subject: [PATCH] adopt to new cmake macro --- dyninst.spec | 25 +++++++++++++++++++------ dyninst.yaml | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index 7b4b3ca..1429854 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,6 +1,6 @@ Name: dyninst -License: LGPLv2+ -Release: 6 +License: LGPL-2.1-or-later +Release: 7 Version: 12.3.0 Summary: An API for Run-time Code Generation ExclusiveArch: x86_64 aarch64 @@ -74,17 +74,27 @@ export CFLAGS CXXFLAGS LDFLAGS -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_SKIP_RPATH:BOOL=YES \ - . -%make_build +%cmake_build -make DESTDIR=../install install +# Hack to install dyninst nearby, so the testsuite can use it +DESTDIR="../install" %__cmake --install "%{__cmake_builddir}" find ../install -name '*.cmake' -execdir \ sed -i -e 's!%{_prefix}!../install&!' '{}' '+' sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake +cd ../%{testsuite_base} +# testsuite build sometimes encounters dependency issues with -jN +%define _smp_mflags -j1 +%cmake \ + -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \ + -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ + -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_SKIP_RPATH:BOOL=YES +%cmake_build + %install cd %{dyninst_base} -%make_install +%cmake_install mkdir -p %{buildroot}/etc/ld.so.conf.d echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf @@ -125,6 +135,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf %changelog +* Thu Nov 07 2024 Funda Wang - 12.3.0-7 +- adopt to new cmake macro + * Tue Aug 20 2024 Chunchun Yang - 12.3.0-6 - Replaced declaration of subpackage with the 'package_help' macro. diff --git a/dyninst.yaml b/dyninst.yaml index 43af000..ea3be23 100644 --- a/dyninst.yaml +++ b/dyninst.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: dyninst/dyninst tag_prefix: ^v -seperator: . +separator: . -- Gitee