Accepting request 518976 from home:plater

fix build against cmake-3.9.0

OBS-URL: https://build.opensuse.org/request/show/518976
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/rosegarden?expand=0&rev=75
This commit is contained in:
Dave Plater 2017-08-28 05:12:56 +00:00 committed by Git OBS Bridge
parent 91e5bf8421
commit e17f510e40
3 changed files with 25 additions and 3 deletions

View File

@ -1,8 +1,9 @@
-------------------------------------------------------------------
Sat Aug 26 15:31:47 UTC 2017 - davejplater@gmail.com
- Work around a possible cmake-3.9.0 bug by building a dependency
prior to the main build.
- Work around cmake-3.9.0 bug with upstream patch svnheader.patch
- See https://sourceforge.net/p/rosegarden/bugs/1552/ and
https://gitlab.kitware.com/cmake/cmake/issues/17222.
-------------------------------------------------------------------
Fri Apr 21 16:32:14 UTC 2017 - davejplater@gmail.com

View File

@ -29,6 +29,8 @@ Source2: %{name}.1
Patch1: rosegarden-10.10-filepaths.patch
# PATCH-FIX-OPENSUSE ledest@gmail.com fix bashisms in scripts
Patch2: rosegarden-14.02-fix-bashisms.patch
# PATCH-FIX-UPSTREAM see header - Fix cmake-3.9.0 build failure
Patch3: svnheader.patch
BuildRequires: alsa-devel
BuildRequires: cmake >= 2.8.12
BuildRequires: dssi-devel
@ -84,6 +86,7 @@ See the changelog for details.
%setup -q
%patch1
%patch2
%patch3 -p1
# When we build svn we need to execute bootstrap.sh
#sh bootstrap.sh
@ -99,7 +102,7 @@ export CXXFLAGS="$CFLAGS"
-DUSE_QT5:BOOL=ON \
-DCMAKE_INSTALL_LOCALEDIR:PATH=%{_datadir}/locale/
make svnheader
#make svnheader
make %{?_smp_mflags}
%install

18
svnheader.patch Normal file
View File

@ -0,0 +1,18 @@
Description: fix svnversion.h dependency to permit parallel building
With CMake 3.9.1 and parallel building enabled, the incorrect specification
of the output filename when creating svnversion.h can lead to a race condition
such that the package fails to build.
Author: Stuart Prescott <stuart@debian.org>
Bug: https://sourceforge.net/p/rosegarden/bugs/1552/
Bug-Debian: https://bugs.debian.org/871213
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -810,7 +810,7 @@
add_custom_target(svnheader ALL DEPENDS svn_header) # svn_header never gets created, it's just a unique string
# creates svnheader.h using cmake script
-add_custom_command(OUTPUT svn_header ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h
+add_custom_command(OUTPUT svn_header ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/buildkey.cmake)