SHA256
3
0
forked from pool/cmake

Accepting request 1082450 from devel:tools:building

OBS-URL: https://build.opensuse.org/request/show/1082450
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmake?expand=0&rev=232
This commit is contained in:
Dominique Leuenberger 2023-04-27 17:56:45 +00:00 committed by Git OBS Bridge
commit a7ac3fdf72
2 changed files with 35 additions and 2 deletions

View File

@ -1,9 +1,31 @@
-------------------------------------------------------------------
Fri Apr 21 19:24:16 UTC 2023 - Callum Farmer <gmbr3@opensuse.org>
- 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 <gmbr3@opensuse.org>
- macros: substitute exactly once otherwise some non default values
won't work
-------------------------------------------------------------------
Wed Apr 5 16:34:32 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 3.26.3:
* Fixes for VS (Intel Fortran) and Xcode (Swift)
-------------------------------------------------------------------
Sat Apr 1 14:14:02 UTC 2023 - Callum Farmer <gmbr3@opensuse.org>
- 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 <info@paolostivanin.com>

View File

@ -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}" \\\