330549628a
- Remove full path from compiler to allow ccache override - This might break build if your package breaks $PATH content - Tested on KDE and it build and some misc apps too. If something fails it should be fixed per app basis OBS-URL: https://build.opensuse.org/request/show/289674 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=201
145 lines
4.2 KiB
RPMSpec
145 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package cmake
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: cmake
|
|
Version: 3.2.0~rc1
|
|
Release: 0
|
|
%define rversion 3.2.0-rc1
|
|
Summary: Cross-platform, open-source make system
|
|
License: BSD-3-Clause
|
|
Group: Development/Tools/Building
|
|
Url: http://www.cmake.org/
|
|
Source0: http://www.cmake.org/files/v3.2/%{name}-%{rversion}.tar.gz
|
|
Source1: cmake.macros
|
|
Source2: opensuse_rules.cmake
|
|
Patch2: cmake-fix-ruby-test.patch
|
|
# PATCH-FIX-UPSTREAM form.patch -- set the correct include path for the ncurses includes
|
|
Patch4: form.patch
|
|
# PATCH-FIX-UPSTREAM system-libs.patch -- allow choosing between bundled and system jsoncpp & form libs
|
|
Patch5: system-libs.patch
|
|
# PATCH-FIX-UPSTREAM cmake-fix-pie-binaries.patch -- new "file" is reporting PIE binaries a bit differently
|
|
# I sent this by email to cmake-developers.
|
|
Patch6: cmake-fix-pie-binaries.patch
|
|
BuildRequires: curl-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: zlib-devel
|
|
# this is commented as it would create dependancy cycle between jsoncpp and cmake
|
|
#if 0%{?suse_version} > 1320
|
|
#BuildRequires: pkgconfig(jsoncpp)
|
|
#endif
|
|
BuildRequires: pkgconfig(liblzma)
|
|
Requires: make
|
|
Recommends: cmake-mans
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} > 1110
|
|
BuildRequires: libarchive-devel >= 3.0.2
|
|
BuildRequires: libbz2-devel
|
|
%endif
|
|
|
|
%description
|
|
CMake is a cross-platform, open-source build system
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{rversion}
|
|
%patch2 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
|
|
%build
|
|
export CXXFLAGS="%{optflags}"
|
|
export CFLAGS="%{optflags}"
|
|
./configure \
|
|
--prefix=%{_prefix} \
|
|
--datadir=/share/%{name} \
|
|
--docdir=/share/doc/packages/%{name} \
|
|
--mandir=/share/man \
|
|
--system-libs \
|
|
%if 0%{?suse_version} <= 1110
|
|
--no-system-libarchive \
|
|
%endif
|
|
--no-system-jsoncpp \
|
|
--parallel=0%{jobs} \
|
|
--verbose \
|
|
--no-qt-gui
|
|
make VERBOSE=1 %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
|
find %{buildroot}%{_datadir}/cmake -type f -print0 | xargs -0 chmod 644
|
|
# rpm macros
|
|
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/rpm/macros.cmake
|
|
# buildrules
|
|
install -m644 %{SOURCE2} -D %{buildroot}%{_datadir}/cmake/Modules/opensuse_rules.cmake
|
|
sed -i \
|
|
-e 's:OPTFLAGS:%{optflags}:g' \
|
|
%{buildroot}%{_datadir}/cmake/Modules/opensuse_rules.cmake
|
|
|
|
%fdupes %{buildroot}%{_datadir}/cmake
|
|
|
|
%check
|
|
%if 0%{?suse_version} <= 1140
|
|
# http://public.kitware.com/Bug/view.php?id=13237
|
|
# 0013237: 25 - FindPackageTest (Failed)
|
|
# Our 11.4 and older have . in PATH, as a result check fails.
|
|
# Having '.' in PATH is not needed anyway, so remove it here.
|
|
oIFS=$IFS
|
|
IFS=:
|
|
NPATH=
|
|
for path in $PATH
|
|
do
|
|
if test "$path" = "."
|
|
then
|
|
continue
|
|
fi
|
|
if test -n "$NPATH"
|
|
then
|
|
NPATH="$NPATH:$path"
|
|
else
|
|
NPATH="$path"
|
|
fi
|
|
done
|
|
IFS=$oIFS
|
|
export PATH=$NPATH
|
|
%endif
|
|
# Excluded tests:
|
|
# TestUpload: uses internet connection
|
|
# SimpleInstall: seems to fail due to RPATH strictness
|
|
# if any other app installs then this test is bogus
|
|
./bin/ctest --force-new-ctest-process --output-on-failure %{?_smp_mflags} \
|
|
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2)"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config %{_sysconfdir}/rpm/macros.cmake
|
|
%{_bindir}/cpack
|
|
%{_bindir}/cmake
|
|
%{_bindir}/ctest
|
|
%{_bindir}/ccmake
|
|
%{_datadir}/cmake
|
|
%{_libdir}/cmake
|
|
%dir %{_datadir}/aclocal
|
|
%{_datadir}/aclocal/cmake.m4
|
|
%doc %{_docdir}/%{name}
|
|
|
|
%changelog
|