diff --git a/cmake.changes b/cmake.changes index 186f5ce..0fae358 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,9 +1,31 @@ +------------------------------------------------------------------- +Fri Apr 21 19:24:16 UTC 2023 - Callum Farmer + +- macros: Re-add old setup on top of new - some applications still + use the old version + +------------------------------------------------------------------- +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 - update to 3.26.3: * Fixes for VS (Intel Fortran) and Xcode (Swift) +------------------------------------------------------------------- +Sat Apr 1 14:14:02 UTC 2023 - Callum Farmer + +- macros: Convert to GNUInstallDirs + * some of the old values such as SYSCONF_INSTALL_PATH aren't + used anymore + * RUNSTATEDIR and SHAREDSTATEDIR weren't set and the defaults + are different to us + * SHAREDSTATEDIR isn't under /usr so isn't relative + ------------------------------------------------------------------- Thu Mar 30 14:02:27 UTC 2023 - Paolo Stivanin diff --git a/cmake.macros b/cmake.macros index 3bf4da2..a1e312b 100644 --- a/cmake.macros +++ b/cmake.macros @@ -7,6 +7,9 @@ %__builder %__make %__sourcedir . +%__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 \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ @@ -19,12 +22,20 @@ -GNinja \\\ %endif \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ + -DCMAKE_INSTALL_BINDIR:PATH=%{__cmake_make_prefix_relative %{_bindir}} \\\ + -DCMAKE_INSTALL_SBINDIR:PATH=%{__cmake_make_prefix_relative %{_sbindir}} \\\ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{__cmake_make_prefix_relative %{_libexecdir}} \\\ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{__cmake_make_root_relative %{_sysconfdir}} \\\ + -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \\\ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{__cmake_make_root_relative %{_localstatedir}} \\\ + -DCMAKE_INSTALL_RUNSTATEDIR:PATH=%{__cmake_make_root_relative %{_rundir}} \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{__cmake_make_prefix_relative %{_libdir}} \\\ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{__cmake_make_prefix_relative %{_includedir}} \\\ + -DCMAKE_INSTALL_DATAROOTDIR:PATH=%{__cmake_make_prefix_relative %{_datadir}} \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ - -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ - -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \\\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}" \\\