[clementine] New upstream version Drop all upstreamed patches
Orcan Ogetbil
oget at fedoraproject.org
Thu Mar 31 03:06:35 UTC 2011
commit 30587e952b5a8c353ddcb21334eca2ada485c76e
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date: Wed Mar 30 23:06:25 2011 -0400
New upstream version
Drop all upstreamed patches
.gitignore | 1 +
clementine-gmock-system.patch | 98 +++++++++++++++++++++++++++++++++++
clementine-no-ubuntu-icons.patch | 44 ----------------
clementine-system-libechonest.patch | 40 --------------
clementine.spec | 67 +++++++++++++-----------
sources | 2 +-
6 files changed, 137 insertions(+), 115 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a545fbc..6d733d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ clementine-0.4.2.tar.gz
/clementine-0.5.2.tar.gz
/clementine-0.5.3.tar.gz
/clementine-0.6.tar.gz
+/clementine-0.7.tar.gz
diff --git a/clementine-gmock-system.patch b/clementine-gmock-system.patch
new file mode 100644
index 0000000..49bef39
--- /dev/null
+++ b/clementine-gmock-system.patch
@@ -0,0 +1,98 @@
+diff -rupN clementine-0.7.old/CMakeLists.txt clementine-0.7/CMakeLists.txt
+--- clementine-0.7.old/CMakeLists.txt 2011-03-19 15:13:18.000000000 -0400
++++ clementine-0.7/CMakeLists.txt 2011-03-28 21:56:39.000000000 -0400
+@@ -303,6 +303,18 @@ if(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHO
+ set(ECHONEST_LIBRARIES echonest)
+ endif(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHONEST_LIBRARIES)
+
++# Use system gmock if it's available
++# We need to look for both gmock and gtest
++find_path(GMOCK_INCLUDE_DIRS gmock/gmock.h)
++find_library(GMOCK_LIBRARIES gmock)
++if(GMOCK_INCLUDE_DIRS)
++ find_path(GTEST_INCLUDE_DIRS gtest/gtest.h)
++ find_library(GTEST_LIBRARIES gtest)
++ if(GTEST_INCLUDE_DIRS)
++ set(USE_SYSTEM_GMOCK 1)
++ set(GMOCK_LIBRARIES ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES})
++ endif(GTEST_INCLUDE_DIRS)
++endif(GMOCK_INCLUDE_DIRS)
+
+ # Subdirectories
+ add_subdirectory(src)
+diff -rupN clementine-0.7.old/tests/CMakeLists.txt clementine-0.7/tests/CMakeLists.txt
+--- clementine-0.7.old/tests/CMakeLists.txt 2011-03-13 16:01:24.000000000 -0400
++++ clementine-0.7/tests/CMakeLists.txt 2011-03-28 21:55:51.000000000 -0400
+@@ -1,8 +1,10 @@
+ cmake_minimum_required(VERSION 2.6)
+
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/include)
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/gtest/include)
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/gtest)
++if(NOT USE_SYSTEM_GMOCK)
++ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/include)
++ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/gtest/include)
++ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/gmock/gtest)
++endif(NOT USE_SYSTEM_GMOCK)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
+ include_directories(${QT_QTTEST_INCLUDE_DIR})
+@@ -15,6 +17,7 @@ if(HAVE_LIBLASTFM)
+ include_directories(${LASTFM_INCLUDE_DIRS})
+ endif(HAVE_LIBLASTFM)
+
++if(NOT USE_SYSTEM_GMOCK)
+ set(GTEST-SOURCES
+ ../3rdparty/gmock/gtest/src/gtest.cc
+ ../3rdparty/gmock/gtest/src/gtest-death-test.cc
+@@ -24,7 +27,6 @@ set(GTEST-SOURCES
+ ../3rdparty/gmock/gtest/src/gtest-typed-test.cc
+ )
+
+-add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
+ add_library(gtest STATIC EXCLUDE_FROM_ALL ${GTEST-SOURCES})
+
+ set(GMOCK-SOURCES
+@@ -36,7 +38,10 @@ set(GMOCK-SOURCES
+ ../3rdparty/gmock/src/gmock-spec-builders.cc)
+
+ add_library(gmock STATIC EXCLUDE_FROM_ALL ${GMOCK-SOURCES})
+-target_link_libraries(gmock gtest)
++set(GMOCK_LIBRARIES gmock gtest)
++endif(NOT USE_SYSTEM_GMOCK)
++
++add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
+
+ set(TESTUTILS-SOURCES
+ test_utils.cpp
+@@ -52,7 +57,7 @@ set(TESTUTILS-MOC-HEADERS
+ qt4_wrap_cpp(TESTUTILS-SOURCES-MOC ${TESTUTILS-MOC-HEADERS})
+
+ add_library(test_utils STATIC EXCLUDE_FROM_ALL ${TESTUTILS-SOURCES} ${TESTUTILS-SOURCES-MOC})
+-target_link_libraries(test_utils gmock ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY})
++target_link_libraries(test_utils ${GMOCK_LIBRARIES} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY})
+
+ add_custom_target(test
+ echo "Running tests"
+@@ -79,7 +84,7 @@ macro(add_test_file test_source gui_requ
+ EXCLUDE_FROM_ALL
+ ${test_source}
+ )
+- target_link_libraries(${TEST_NAME} gmock clementine_lib test_utils)
++ target_link_libraries(${TEST_NAME} ${GMOCK_LIBRARIES} clementine_lib test_utils)
+ set(GUI_REQUIRED ${gui_required})
+ if (GUI_REQUIRED)
+ target_link_libraries(${TEST_NAME} test_gui_main)
+diff -rupN clementine-0.7.old/tests/mock_playlistmanager.h clementine-0.7/tests/mock_playlistmanager.h
+--- clementine-0.7.old/tests/mock_playlistmanager.h 2011-03-10 17:05:56.000000000 -0500
++++ clementine-0.7/tests/mock_playlistmanager.h 2011-03-28 21:57:16.000000000 -0400
+@@ -73,6 +73,9 @@ public:
+ void EmitPlaylistManagerInitialized() {
+ emit PlaylistManagerInitialized();
+ }
++
++ void InvalidateDeletedSongs() {}
++
+ };
+
+ #endif // MOCK_PLAYLISTMANAGER_H
diff --git a/clementine.spec b/clementine.spec
index dd35b51..dc06e02 100644
--- a/clementine.spec
+++ b/clementine.spec
@@ -1,26 +1,23 @@
Name: clementine
-Version: 0.6
-Release: 3%{?dist}
+Version: 0.7
+Release: 1%{?dist}
Summary: A music player and library organizer
Group: Applications/Multimedia
License: GPLv3+ and GPLv2+
URL: http://code.google.com/p/clementine-player
Source0: http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
-# Use system echonest instead of the bundled copy
-# From upstream trunk:
-# http://code.google.com/p/clementine-player/source/detail?r=2440
-Patch0: clementine-system-libechonest.patch
-# Don't install Ubuntu icons on Fedora
-# From upstream trunk:
-# http://code.google.com/p/clementine-player/source/detail?r=2445
-Patch1: clementine-no-ubuntu-icons.patch
+# Use system gmock. Patch accepted by upstream
+# http://code.google.com/p/clementine-player/issues/detail?id=1653
+Patch0: clementine-gmock-system.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gettext
+BuildRequires: gmock-devel
BuildRequires: gstreamer-devel
BuildRequires: gtest-devel
BuildRequires: libechonest-devel
@@ -42,19 +39,21 @@ BuildRequires: qtsingleapplication-devel >= 2.6.1-2
BuildRequires: sqlite-devel
BuildRequires: taglib-devel
+BuildRequires(check): xorg-x11-server-Xvfb
+BuildRequires(check): xorg-x11-xauth
+
Requires: hicolor-icon-theme
Requires: libprojectM >= 2.0.1-7
Requires: qtsingleapplication >= 2.6.1-2
%description
-Clementine is a modern music player and library organizer.
-It is largely a port of Amarok 1.4, with some features rewritten to take
-advantage of Qt4.
+Clementine is a multiplatform music player. It is inspired by Amarok 1.4,
+focusing on a fast and easy-to-use interface for searching and playing your
+music.
%prep
%setup -q
-%patch0 -p1 -b .echonest
-%patch1 -p1 -b .no_ubuntu_icons
+%patch0 -p1 -b .gmock
# Remove all 3rdparty libraries exceph universalchardet
# as it is not available as a separate library.
@@ -62,25 +61,25 @@ mv 3rdparty/universalchardet/ .
rm -fr 3rdparty/*
mv universalchardet/ 3rdparty/
-
-# Don't build tests. They require gmock which is not yet available on Fedora
-# RHBZ #527402
-sed -i '/tests/d' CMakeLists.txt
-
+# Can't run all the unit tests
+# songloader requires internet connection
+# mpris1 requires a dbus session
+for test in mpris1 songloader; do
+ sed -i -e "/${test}_test/d" tests/CMakeLists.txt
+done
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
-%{cmake} \
- -DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \
- -DUSE_SYSTEM_PROJECTM=1 \
- -DUSE_SYSTEM_QXT=1 \
- -DSTATIC_SQLITE=0 \
- ..
-
-
-# Parallel build fails sometimes
-make VERBOSE=1
+ %{cmake} \
+ -DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \
+ -DUSE_SYSTEM_PROJECTM=1 \
+ -DUSE_SYSTEM_QXT=1 \
+ -DSTATIC_SQLITE=0 \
+ ..
+
+ # Parallel build fails sometimes
+ make VERBOSE=1
popd
%install
@@ -89,6 +88,10 @@ make install DESTDIR=%{buildroot} -C %{_target_platform}
%check
+pushd %{_target_platform}
+ # Run a fake X session since some tests check for X
+ xvfb-run -a -n 10 make test
+popd
desktop-file-validate \
%{buildroot}%{_datadir}/applications/%{name}.desktop
@@ -120,6 +123,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Wed Mar 30 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.7-1
+- New upstream version
+- Drop all upstreamed patches
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/sources b/sources
index b7b51fe..7ec9bbe 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7b7ee4c16f648a15eb2cff9ed2163e0e clementine-0.6.tar.gz
+d417d1e4b1d1c295ab93c574e073da28 clementine-0.7.tar.gz
More information about the scm-commits
mailing list