summaryrefslogtreecommitdiffstats
path: root/redhat/applications
diff options
context:
space:
mode:
authorFrancois Andriot <[email protected]>2012-05-05 11:04:09 +0200
committerFrancois Andriot <[email protected]>2012-05-05 11:04:09 +0200
commit706fd716a8e95939805368ecfe920201442262f5 (patch)
treefd9dae84a405e1d3c67835a496eefaf89f147e5e /redhat/applications
parentc1d66637a385bd9aa41e8e8e8be5cdf89d12e953 (diff)
downloadtde-packaging-706fd716a8e95939805368ecfe920201442262f5.tar.gz
tde-packaging-706fd716a8e95939805368ecfe920201442262f5.zip
RHEL/Fedora: fix amarok for GCC 4.7
Diffstat (limited to 'redhat/applications')
-rw-r--r--redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch138
-rw-r--r--redhat/applications/amarok/amarok-3.5.13-fix_gcc47_compilation.patch11
-rw-r--r--redhat/applications/amarok/amarok-3.5.13-fix_inotify_support.patch37
-rw-r--r--redhat/applications/amarok/trinity-amarok.spec51
4 files changed, 226 insertions, 11 deletions
diff --git a/redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch b/redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch
new file mode 100644
index 000000000..c18b57d57
--- /dev/null
+++ b/redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch
@@ -0,0 +1,138 @@
+--- amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt.ORI 2012-05-01 11:32:31.604163233 +0200
++++ amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt 2012-05-01 11:32:39.764016446 +0200
+@@ -16,6 +16,7 @@
+
+ include_directories(
+ ${RUBY_INCLUDE_DIR}
++ ${RUBY_ARCH_INCLUDE_DIR}
+ )
+
+ ##### other data ################################
+--- amarok/amarok/src/mediadevice/daap/ConfigureChecks.cmake.ruby 2011-05-03 07:45:53.000000000 +0200
++++ amarok/amarok/src/mediadevice/daap/ConfigureChecks.cmake 2012-05-01 17:12:11.980323997 +0200
+@@ -32,8 +32,33 @@
+ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
+ endif( )
+
++execute_process(
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MAJOR'] )"
++ OUTPUT_VARIABLE RUBY_MAJOR_VERSION
++ RESULT_VARIABLE _result
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++if( _result )
++ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
++endif( )
++
++execute_process(
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MINOR'] )"
++ OUTPUT_VARIABLE RUBY_MINOR_VERSION
++ RESULT_VARIABLE _result
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++if( _result )
++ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
++endif( )
++
+ if( RUBY_INCLUDE_DIR AND RUBY_LDFLAGS )
+ message( STATUS "Found RUBY: ${RUBY_EXECUTABLE}" )
+ message( STATUS " RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}" )
+ message( STATUS " RUBY_LDFLAGS: ${RUBY_LDFLAGS}" )
++ message( STATUS " RUBY_MAJOR_VERSION: ${RUBY_MAJOR_VERSION}")
++ message( STATUS " RUBY_MINOR_VERSION: ${RUBY_MINOR_VERSION}")
+ endif( )
++
++if ( "${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" VERSION_LESS "1.9" )
++ message( STATUS " You have an old version of Ruby ! (<1.9)")
++ set ( HAVE_OLD_RUBY 1 CACHE INTERNAL "" )
++endif( )
+--- amarok/config.h.cmake.ORI 2012-05-01 17:12:53.044914450 +0200
++++ amarok/config.h.cmake 2012-05-01 17:13:08.307133030 +0200
+@@ -16,3 +16,5 @@
+
+ #cmakedefine TAGLIB_15 1
+ #cmakedefine HAVE_QGLWIDGET 1
++
++#cmakedefine HAVE_OLD_RUBY @HAVE_OLD_RUBY@
+--- amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt.ORI 2012-05-01 18:34:12.577433198 +0200
++++ amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt 2012-05-01 18:34:23.840269058 +0200
+@@ -15,6 +15,7 @@
+ )
+
+ include_directories(
++ ${CMAKE_BINARY_DIR}
+ ${RUBY_INCLUDE_DIR}
+ ${RUBY_ARCH_INCLUDE_DIR}
+ )
+--- amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c.ruby 2011-09-19 06:40:11.000000000 +0200
++++ amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c 2012-05-01 16:25:32.486067476 +0200
+@@ -2,6 +2,7 @@
+ * Copyright (c) 2005 Zed A. Shaw
+ * You can redistribute it and/or modify it under the same terms as Ruby.
+ */
++#include "config.h"
+ #include "ruby.h"
+ #include "ext_help.h"
+ #include <assert.h>
+@@ -74,7 +75,11 @@
+ f = rb_str_dup(global_http_prefix);
+ f = rb_str_buf_cat(f, field, flen);
+
++#ifdef HAVE_OLD_RUBY
+ for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
++#else
++ for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
++#endif
+ if(*ch == '-') {
+ *ch = '_';
+ } else {
+@@ -157,12 +162,25 @@
+
+ rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value);
+ if((temp = rb_hash_aref(req, global_http_host)) != Qnil) {
++#ifdef HAVE_OLD_RUBY
+ colon = strchr(RSTRING(temp)->ptr, ':');
++#else
++ colon = strchr(RSTRING_PTR(temp), ':');
++#endif
+ if(colon != NULL) {
++#ifdef HAVE_OLD_RUBY
+ rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
++#else
++ rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING_PTR(temp)));
++#endif
+ rb_hash_aset(req, global_server_port,
++#ifdef HAVE_OLD_RUBY
+ rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
+ RSTRING(temp)->len));
++#else
++ rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
++ RSTRING_LEN(temp)));
++#endif
+ } else {
+ rb_hash_aset(req, global_server_name, temp);
+ rb_hash_aset(req, global_server_port, global_port_80);
+@@ -281,8 +299,13 @@
+ DATA_GET(self, http_parser, http);
+
+ from = FIX2INT(start);
++#ifdef HAVE_OLD_RUBY
+ dptr = RSTRING(data)->ptr;
+ dlen = RSTRING(data)->len;
++#else
++ dptr = RSTRING_PTR(data);
++ dlen = RSTRING_LEN(data);
++#endif
+
+ if(from >= dlen) {
+ rb_raise(eHttpParserError, "Requested start is after data buffer end.");
+@@ -512,7 +535,11 @@
+ if(pref_len == 1 && uri_str[0] == '/') {
+ rb_ary_push(result, uri);
+ } else {
++#ifdef HAVE_OLD_RUBY
+ rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
++#else
++ rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING_LEN(uri)));
++#endif
+ }
+
+ rb_ary_push(result, (VALUE)handler);
diff --git a/redhat/applications/amarok/amarok-3.5.13-fix_gcc47_compilation.patch b/redhat/applications/amarok/amarok-3.5.13-fix_gcc47_compilation.patch
new file mode 100644
index 000000000..79cfb5940
--- /dev/null
+++ b/redhat/applications/amarok/amarok-3.5.13-fix_gcc47_compilation.patch
@@ -0,0 +1,11 @@
+--- amarok/amarok/src/mediadevice/mtp/mtpmediadevice.cpp.ORI 2012-05-01 11:44:16.868838499 +0200
++++ amarok/amarok/src/mediadevice/mtp/mtpmediadevice.cpp 2012-05-01 11:44:27.427731738 +0200
+@@ -24,6 +24,8 @@
+
+ #define DEBUG_PREFIX "MtpMediaDevice"
+
++#include <stdlib.h>
++
+ #include <config.h>
+ #include "mtpmediadevice.h"
+
diff --git a/redhat/applications/amarok/amarok-3.5.13-fix_inotify_support.patch b/redhat/applications/amarok/amarok-3.5.13-fix_inotify_support.patch
new file mode 100644
index 000000000..46798b363
--- /dev/null
+++ b/redhat/applications/amarok/amarok-3.5.13-fix_inotify_support.patch
@@ -0,0 +1,37 @@
+commit 899586da27ae7a85cea8637849a964a88f3df8b2
+Author: Timothy Pearson <[email protected]>
+Date: 1326222183 -0600
+
+ Fix inotify detection
+
+diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
+index 0e14311..090c73b 100644
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -21,7 +21,25 @@ check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )
+
+ check_include_file( stdint.h HAVE_STDINT_H )
+ check_include_file( systems.h HAVE_SYSTEMS_H )
+-check_include_file( linux/inotify.h HAVE_INOTIFY )
++
++##### check for inotify ###########################
++
++# if( WITH_INOTIFY )
++ check_include_file( "inotify.h" INOTIFY_FOUND )
++ check_include_file( "sys/inotify.h" INOTIFY_SYS_FOUND )
++ if( NOT INOTIFY_FOUND )
++ if( NOT INOTIFY_SYS_FOUND )
++ message(FATAL_ERROR "\ninotify support was requested, but inotify was not found on your system" )
++ endif( NOT INOTIFY_SYS_FOUND )
++ endif( NOT INOTIFY_FOUND )
++ if( INOTIFY_FOUND )
++ set( HAVE_INOTIFY 1 )
++ endif( INOTIFY_FOUND )
++ if( INOTIFY_SYS_FOUND )
++ set( HAVE_INOTIFY 1 )
++ set( HAVE_SYS_INOTIFY 1 )
++ endif( INOTIFY_SYS_FOUND )
++# endif( )
+
+ check_function_exists( statvfs HAVE_STATVFS )
+
diff --git a/redhat/applications/amarok/trinity-amarok.spec b/redhat/applications/amarok/trinity-amarok.spec
index 1dfa40e1d..c70828000 100644
--- a/redhat/applications/amarok/trinity-amarok.spec
+++ b/redhat/applications/amarok/trinity-amarok.spec
@@ -1,12 +1,12 @@
# Basic package informations
%define kdecomp amarok
%define version 1.4.10
-%define release 5
+%define release 6
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
-%define _docdir %{_prefix}/share/doc
+%define _docdir %{_datadir}/doc
%endif
# TDE 3.5.13 specific building variables
@@ -15,6 +15,9 @@ BuildRequires: cmake >= 2.8
%define tde_includedir %{_includedir}/kde
%define tde_libdir %{_libdir}/trinity
+# Ruby 1.9 includes are located in strance directories ... (taken from ruby 1.9 spec file)
+%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/')
+
Name: trinity-%{kdecomp}
Summary: Media player
@@ -38,12 +41,20 @@ Patch3: amarok-3.5.13-taglib_include.patch
Patch4: amarok-3.5.13-enable_riokarma.patch
Patch5: amarok-3.5.13-enable_akode.patch
+Patch6: amarok-3.5.13-adds_ruby_1.9_support.patch
+Patch7: amarok-3.5.13-fix_gcc47_compilation.patch
+
+# [amarok] Fix inotify detection [Commit #899586da]
+Patch11: amarok-3.5.13-fix_inotify_support.patch
+
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
BuildRequires: esound-devel
BuildRequires: gettext
+BuildRequires: tqtinterface-devel
BuildRequires: trinity-kdelibs-devel
BuildRequires: trinity-kdebase-devel
+BuildRequires: pcre-devel
BuildRequires: taglib-devel
BuildRequires: libifp-devel
# Ipod
@@ -67,19 +78,15 @@ BuildRequires: libusb-devel
BuildRequires: libvisual-devel
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
-BuildRequires: ruby-devel ruby
BuildRequires: SDL-devel
BuildRequires: taglib-devel
BuildRequires: sqlite-devel
-BuildRequires: libkarma-devel karma-sharp
+BuildRequires: trinity-libkarma-devel karma-sharp
# not used anymore, in favor of libvisual ? -- Rex
#%{?fedora:BuildRequires: xmms-devel}
BuildRequires: dbus-devel
BuildRequires: dbus-tqt-devel
-BuildRequires: akode-devel
-
-# For dir ownership and some default plugins (lyrics), -ruby subpkg? -- Rex
-Requires: ruby
+BuildRequires: trinity-akode-devel
# To open the selected browser, works with Patch2
Requires: xdg-utils
@@ -114,6 +121,17 @@ Amarok is a multimedia player with:
- nice GUI, integrates into the KDE look, but with a unique touch
+%package ruby
+Summary: %{name} Ruby support
+Group: Applications/Multimedia
+BuildRequires: ruby-devel ruby
+Requires: %{name} = %{version}-%{release}
+# For dir ownership and some default plugins (lyrics)
+Requires: ruby
+%description ruby
+%{summary}.
+
+
%package konqueror
Summary: Amarok konqueror (service menus, sidebar) support
Group: Applications/Multimedia
@@ -140,6 +158,10 @@ use any of xmms' visualisation plugins with Amarok.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1 -b .ruby
+%patch7 -p1
+
+%patch11 -p1 -b .inotify
%build
@@ -163,7 +185,8 @@ cd build
-DWITH_RIOKARMA=ON \
-DWITH_DAAP=ON \
-DBUILD_ALL=ON \
- -DQT_LIBRARY_DIRS=${QTLIB} \
+ -DQT_LIBRARY_DIRS="${QTLIB}" \
+ -DRUBY_ARCH_INCLUDE_DIR="%{_usr}/include/%{_normalized_cpu}-%{_target_os}" \
..
%__make %{?_smp_mflags}
@@ -234,8 +257,6 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%{_datadir}/services/amarokpcast.protocol
# -libs ? -- Rex
%{_libdir}/libamarok.*
-# -ruby ? -- Rex
-%{_libdir}/ruby_lib/*
# DAAP
%{_bindir}/amarok_daapserver.rb
%{tde_libdir}/libamarok_daap-mediadevice.*
@@ -283,6 +304,9 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%{_datadir}/services/amarok_aKode-engine.desktop
%{tde_libdir}/libamarok_aKode-engine.*
+%files ruby
+%defattr(-,root,root,-)
+%{_libdir}/ruby_lib/*
%files konqueror
@@ -297,6 +321,11 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%changelog
+* Mon Apr 29 2012 Francois Andriot <[email protected]> - 1.4.10-6
+- Rebuilt for Fedora 17
+- Fix compilation with GCC 4.7
+- Fix inotify detection [Commit #899586da]
+
* Mon Mar 19 2012 Francois Andriot <[email protected]> - 1.4.10-5
- Replaces BR "libgpod" with "trinity-libgpod" for EL5