summaryrefslogtreecommitdiffstats
path: root/redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2012-05-07 01:06:08 +0200
committerFrancois Andriot <francois.andriot@free.fr>2012-05-07 01:06:08 +0200
commit9750a057f2f36c5b88a5bc53c0a051b605dac061 (patch)
tree4f205d3ed4ecf8d2df665b566674d12372363c7f /redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch
parent6bb431be79e8f75c26bbf0f81749fa7738965f65 (diff)
downloadtde-packaging-9750a057f2f36c5b88a5bc53c0a051b605dac061.tar.gz
tde-packaging-9750a057f2f36c5b88a5bc53c0a051b605dac061.zip
RHEL/Fedora: massive updates for Fedora 17 (TDE 3.5.13 entire build)
Diffstat (limited to 'redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch')
-rw-r--r--redhat/applications/amarok/amarok-3.5.13-adds_ruby_1.9_support.patch155
1 files changed, 105 insertions, 50 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
index c18b57d57..b7fec06cc 100644
--- 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
@@ -1,69 +1,88 @@
---- 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}
- )
+diff -urN amarok/amarok/src/mediadevice/daap/ConfigureChecks.cmake amarok.new/amarok/src/mediadevice/daap/ConfigureChecks.cmake
+--- amarok/amarok/src/mediadevice/daap/ConfigureChecks.cmake 2012-04-13 01:59:24.000000000 -0500
++++ amarok.new/amarok/src/mediadevice/daap/ConfigureChecks.cmake 2012-05-06 15:18:36.000000000 -0500
+@@ -14,15 +14,51 @@
+ tde_message_fatal( "ruby is required, but was not found on your system" )
+ endif( )
- ##### 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 @@
++# In ruby 1.9.x, ruby.h is located in a different location than previous releases.
+ execute_process(
+- COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['archdir'] )"
+- OUTPUT_VARIABLE RUBY_INCLUDE_DIR
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MAJOR'] )"
++ OUTPUT_VARIABLE RUBY_VERSION_MAJOR
+ 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['MAJOR'] )"
-+ OUTPUT_VARIABLE RUBY_MAJOR_VERSION
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MINOR'] )"
++ OUTPUT_VARIABLE RUBY_VERSION_MINOR
+ RESULT_VARIABLE _result
-+ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ OUTPUT_STRIP_TRAILING_WHITESPACE )
+if( _result )
+ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
+endif( )
-+
++set( RUBY_VERSION ${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR} )
++if ( "${RUBY_VERSION}" GREATER "18" )
++ execute_process(
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['rubyhdrdir'] )"
++ OUTPUT_VARIABLE RUBY_INCLUDE_DIR
++ RESULT_VARIABLE _result
++ OUTPUT_STRIP_TRAILING_WHITESPACE )
++ if( _result )
++ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
++ endif( )
++else( )
++ execute_process(
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['archdir'] )"
++ OUTPUT_VARIABLE RUBY_INCLUDE_DIR
++ RESULT_VARIABLE _result
++ OUTPUT_STRIP_TRAILING_WHITESPACE )
++ if( _result )
++ tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
++ endif( )
++endif( )
+execute_process(
-+ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MINOR'] )"
-+ OUTPUT_VARIABLE RUBY_MINOR_VERSION
++ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['arch'] )"
++ OUTPUT_VARIABLE RUBY_ARCH
+ RESULT_VARIABLE _result
-+ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ 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 )
+ execute_process(
+ COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['LIBRUBYARG_SHARED'] )"
+ OUTPUT_VARIABLE RUBY_LDFLAGS
+@@ -36,4 +72,11 @@
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 " RUBY_VERSION_MAJOR: ${RUBY_VERSION_MAJOR}")
++ message( STATUS " RUBY_VERSION_MINOR: ${RUBY_VERSION_MINOR}")
++ message( STATUS " RUBY_ARCH: ${RUBY_ARCH}")
++endif( )
++if ( "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}" VERSION_LESS "19" )
+ 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 @@
+ endif( )
+diff -urN amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt amarok.new/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt
+--- amarok/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt 2012-04-13 01:59:24.000000000 -0500
++++ amarok.new/amarok/src/mediadevice/daap/mongrel/http11/CMakeLists.txt 2012-05-06 15:19:57.000000000 -0500
+@@ -15,6 +15,8 @@
)
include_directories(
+ ${CMAKE_BINARY_DIR}
++ ${RUBY_INCLUDE_DIR}/${RUBY_ARCH}
${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
+
+diff -urN amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c amarok.new/amarok/src/mediadevice/daap/mongrel/http11/http11.c
+--- amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c 2012-04-13 03:04:44.000000000 -0500
++++ amarok.new/amarok/src/mediadevice/daap/mongrel/http11/http11.c 2012-05-06 15:13:20.000000000 -0500
@@ -2,6 +2,7 @@
* Copyright (c) 2005 Zed A. Shaw
* You can redistribute it and/or modify it under the same terms as Ruby.
@@ -76,8 +95,9 @@
f = rb_str_dup(global_http_prefix);
f = rb_str_buf_cat(f, field, flen);
+- for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
+#ifdef HAVE_OLD_RUBY
- for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
++ 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
@@ -88,21 +108,25 @@
rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value);
if((temp = rb_hash_aref(req, global_http_host)) != Qnil) {
+- colon = strchr(RSTRING(temp)->ptr, ':');
+#ifdef HAVE_OLD_RUBY
- colon = strchr(RSTRING(temp)->ptr, ':');
++ colon = strchr(RSTRING(temp)->ptr, ':');
+#else
+ colon = strchr(RSTRING_PTR(temp), ':');
+#endif
if(colon != NULL) {
+- rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
+#ifdef HAVE_OLD_RUBY
- rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
++ 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,
+- rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
+- RSTRING(temp)->len));
+#ifdef HAVE_OLD_RUBY
- rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
- RSTRING(temp)->len));
++ 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)));
@@ -114,9 +138,11 @@
DATA_GET(self, http_parser, http);
from = FIX2INT(start);
+- dptr = RSTRING(data)->ptr;
+- dlen = RSTRING(data)->len;
+#ifdef HAVE_OLD_RUBY
- dptr = RSTRING(data)->ptr;
- dlen = RSTRING(data)->len;
++ dptr = RSTRING(data)->ptr;
++ dlen = RSTRING(data)->len;
+#else
+ dptr = RSTRING_PTR(data);
+ dlen = RSTRING_LEN(data);
@@ -128,11 +154,40 @@
if(pref_len == 1 && uri_str[0] == '/') {
rb_ary_push(result, uri);
} else {
+- rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
+#ifdef HAVE_OLD_RUBY
- rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
++ 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 -urN amarok/config.h.cmake amarok.new/config.h.cmake
+--- amarok/config.h.cmake 2012-04-13 01:59:26.000000000 -0500
++++ amarok.new/config.h.cmake 2012-05-06 15:02:40.000000000 -0500
+@@ -16,3 +16,4 @@
+
+ #cmakedefine TAGLIB_15 1
+ #cmakedefine HAVE_QGLWIDGET 1
++#cmakedefine HAVE_OLD_RUBY @HAVE_OLD_RUBY@
+\ No newline at end of file
+diff -urN amarok/configure.in amarok.new/configure.in
+--- amarok/configure.in 2012-04-13 01:59:26.000000000 -0500
++++ amarok.new/configure.in 2012-05-06 14:53:40.000000000 -0500
+@@ -1162,7 +1162,14 @@
+
+ AC_PATH_PROG(RUBY, ruby, no)
+
+-ruby_includes=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["archdir"] )'`]
++if test -n "$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
++ # Ruby 1.9
++ ruby_includes=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
++else
++ # not Ruby 1.9
++ ruby_includes=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["archdir"] )'`]
++fi
++
+ ruby_ldflags=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["LIBRUBYARG_SHARED"] )'`]
+
+ AC_SUBST(ruby_includes)