SHA256
3
0
forked from pool/cmake

Accepting request 1146712 from devel:tools:building

OBS-URL: https://build.opensuse.org/request/show/1146712
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmake?expand=0&rev=246
This commit is contained in:
Ana Guerrero 2024-02-16 20:47:25 +00:00 committed by Git OBS Bridge
commit 695717b6f2
4 changed files with 50 additions and 12 deletions

10
cmake-zerojvm.patch Normal file
View File

@ -0,0 +1,10 @@
--- cmake-3.28.1/Modules/FindJNI.cmake 2024-02-14 13:10:42.173018608 +0100
+++ cmake-3.28.1/Modules/FindJNI.cmake 2024-02-14 17:43:00.956527142 +0100
@@ -344,6 +344,7 @@
"${dir}"
"${dir}/client"
"${dir}/server"
+ "${dir}/zero"
# IBM SDK, Java Technology Edition, specific paths
"${dir}/j9vm"
"${dir}/default"

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Wed Feb 14 16:46:22 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* cmake-zerojvm.patch
+ fix JVM detection on JDKs with ZERO virtual machine, like
java-21-openjdk for armv6l
-------------------------------------------------------------------
Fri Jan 19 15:26:23 UTC 2024 - Dirk Müller <dmueller@suse.com>
- fix incorrect requires on libuv1 on non-suse distributions
-------------------------------------------------------------------
Thu Jan 18 15:00:58 UTC 2024 - Ludwig Nussel <lnussel@suse.com>
- Revert "-Wl,--no-undefined" as it still breaks packages (boo#1218620)
-------------------------------------------------------------------
Wed Jan 17 19:54:04 UTC 2024 - Björn Bidar <bjorn.bidar@thaodan.de>
- macros: Set some more variables notable %{_docdir} so that GNUInstallDirs
works fully on openSUSE. Packages using CMAKE_INSTALL_DOCDIR fail otherwise.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 11 10:21:03 UTC 2024 - Michal Suchanek <msuchanek@suse.com> Thu Jan 11 10:21:03 UTC 2024 - Michal Suchanek <msuchanek@suse.com>

View File

@ -32,6 +32,9 @@
-DCMAKE_INSTALL_LIBDIR:PATH=%{__cmake_make_prefix_relative %{_libdir}} \\\ -DCMAKE_INSTALL_LIBDIR:PATH=%{__cmake_make_prefix_relative %{_libdir}} \\\
-DCMAKE_INSTALL_INCLUDEDIR:PATH=%{__cmake_make_prefix_relative %{_includedir}} \\\ -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{__cmake_make_prefix_relative %{_includedir}} \\\
-DCMAKE_INSTALL_DATAROOTDIR:PATH=%{__cmake_make_prefix_relative %{_datadir}} \\\ -DCMAKE_INSTALL_DATAROOTDIR:PATH=%{__cmake_make_prefix_relative %{_datadir}} \\\
-DCMAKE_INSTALL_DOCDIR:PATH=%{__cmake_make_prefix_relative %{_docdir}/%{name}} \\\
-DCMAKE_INSTALL_MANDIR:PATH=%{__cmake_make_prefix_relative %{_mandir}} \\\
-DCMAKE_INSTALL_INFODIR:PATH=%{__cmake_make_prefix_relative %{_infodir}} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
@ -40,9 +43,9 @@
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \\\
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}" \\\
-DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" \\\ -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" \\\
-DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\ -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now" \\\
-DCMAKE_MODULE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed" \\\ -DCMAKE_MODULE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed" \\\
-DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\ -DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now" \\\
%if "%{?_lib}" == "lib64" \ %if "%{?_lib}" == "lib64" \
-DLIB_SUFFIX=64 \\\ -DLIB_SUFFIX=64 \\\
%endif \ %endif \

View File

@ -1,7 +1,7 @@
# #
# spec file # spec file for package cmake
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -63,6 +63,7 @@ Source99: README.SUSE
Patch0: cmake-fix-ruby-test.patch Patch0: cmake-fix-ruby-test.patch
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice # Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
Patch1: feature-suse-python-interp-search-order.patch Patch1: feature-suse-python-interp-search-order.patch
Patch2: cmake-zerojvm.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
@ -76,15 +77,13 @@ BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib)
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
BuildRequires: pkgconfig(libuv) >= 1.28 BuildRequires: pkgconfig(libuv) >= 1.28
%endif
%if "%{flavor}" == ""
Requires: cmake-implementation = %{version}
%endif
%if %{with full}
# Needs a rebuild as libuv will otherwise abort the program with: # Needs a rebuild as libuv will otherwise abort the program with:
# fatal error: libuv version too new: running with libuv 1.X+1 when compiled with libuv 1.X will lead to libuv failures # fatal error: libuv version too new: running with libuv 1.X+1 when compiled with libuv 1.X will lead to libuv failures
%requires_eq libuv1 %requires_eq libuv1
%endif %endif
%if "%{flavor}" == ""
Requires: cmake-implementation = %{version}
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1500 %if 0%{?suse_version} && 0%{?suse_version} <= 1500
%define pyver 311 %define pyver 311
%else %else
@ -170,7 +169,9 @@ export CXXFLAGS="$CFLAGS"
%endif %endif
--parallel=0%{jobs} \ --parallel=0%{jobs} \
--verbose \ --verbose \
%if 0%{?suse_version} < 1550 %if 0%{?suse_version} > 1500
--system-libuv \
%else
--no-system-libuv \ --no-system-libuv \
%endif %endif
%if %{with qhelp} %if %{with qhelp}