From bbc9c7d7f172f0dda2b9e2bab3a437bd28e4f88e0dd190900eb56046329a5569 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 21 Apr 2023 12:32:35 +0000 Subject: [PATCH] Accepting request 1080965 from home:gmbr3:Active - macros: substitute exactly once otherwise some non default values won't work OBS-URL: https://build.opensuse.org/request/show/1080965 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=527 --- cmake.changes | 6 ++++++ cmake.macros | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake.changes b/cmake.changes index 1ef7f4c..dd3dc6b 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 20 19:52:52 UTC 2023 - Callum Farmer + +- macros: substitute exactly once otherwise some non default values + won't work + ------------------------------------------------------------------- Wed Apr 5 16:34:32 UTC 2023 - Andreas Stieger diff --git a/cmake.macros b/cmake.macros index 377d701..9cd25be 100644 --- a/cmake.macros +++ b/cmake.macros @@ -7,8 +7,8 @@ %__builder %__make %__sourcedir . -%__cmake_make_prefix_relative() %{lua:print((string.gsub((rpm.expand("%1")), ((rpm.expand("%{_prefix}")) .. "/"), "")))} -%__cmake_make_root_relative() %{lua:print((string.gsub((rpm.expand("%1")), "/", "")))} +%__cmake_make_prefix_relative() %{lua:print((string.gsub((rpm.expand("%1")), ((rpm.expand("%{_prefix}")) .. "/"), "", 1)))} +%__cmake_make_root_relative() %{lua:print((string.gsub((rpm.expand("%1")), "/", "", 1)))} %cmake \ find %__sourcedir -type f -name CMakeLists.txt \\\