Dropping Ruby 1.8/1.9.1 support (Was: [Gitorious] Activity: doudou pushed 1 commits to master...)

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <CAMYDobWRtfcoQrTW9ZpmVCvp2PBR=iSESwVnqLRua1WaBQ+cnw@mail.gmail.com>
Hi Sylvain,

Could you add a check in the typelib CMakelists.txt file that if an
older version of Ruby is detected, the cmake configuration step fails
?

I'm having the build server fail late in typelib during a bootstrap.sh
because it seems the bootstrapping still supports ruby 1.8, but
typelib doesn't.

Peter

On Fri, Oct 18, 2013 at 1:22 PM, Gitorious <[email protected]> wrote:
>
> Hello psoetens,
>
> One of your favorites has a new activity:
> ------------------------------------------------------------------------
> doudou pushed 1 commits to master
> master changed from 67584af to f7ec55f
>
> View the commit log at https://gitorious.org/orocos-toolchain/typelib/commits
>
> View the diff online: https://gitorious.org/orocos-toolchain/typelib/commit/67584af2c9b64b6391037cf4a1d36ddcfafffe03/diffs/f7ec55f9dde134b7e5506c0bfd11a4ef000c22d2
>
> Diff:
>
> commit f7ec55f9dde134b7e5506c0bfd11a4ef000c22d2
> Author: Sylvain Joyeux <[email protected]>
> Date:   Fri Oct 18 13:23:11 2013 +0200
>
>     ruby: remove support for 1.8 and 1.9.1
>
> diff --git a/bindings/ruby/ext/memory.cc b/bindings/ruby/ext/memory.cc
> index db57f18..cb3d710 100644
> --- a/bindings/ruby/ext/memory.cc
> +++ b/bindings/ruby/ext/memory.cc
> @@ -1,11 +1,6 @@
>  #include "typelib.hh"
>  #include <typelib/value_ops.hh>
>  #include <ruby.h>
> -#if !defined(RUBY_19) && !defined(RUBY_191)
> -extern "C" {
> -#include <st.h>
> -}
> -#endif
>
>  using namespace Typelib;
>  using namespace std;
> @@ -28,10 +23,6 @@ static int memory_table_compare(void* a, void* b)
>      return (a != b);
>  }
>
> -#if !defined(RUBY_19) && !defined(RUBY_191)
> -typedef long st_index_t;
> -#endif
> -
>  static st_index_t memory_table_hash(void* a)
>  {
>      /* Use the low-order bits as hash value, as they are the most likely to
> @@ -39,22 +30,10 @@ static st_index_t memory_table_hash(void* a)
>      return (st_index_t)a;
>  }
>
> -#if defined(RUBY_19)
>  static struct st_hash_type memory_table_type = {
>      (int (*)(...))memory_table_compare,
>      (st_index_t (*)(...))memory_table_hash
>  };
> -#elif defined(RUBY_191)
> -static struct st_hash_type memory_table_type = {
> -    (int (*)(...))memory_table_compare,
> -    (int (*)(...))memory_table_hash
> -};
> -#else
> -static struct st_hash_type memory_table_type = {
> -    (int (*)())memory_table_compare,
> -    (int (*)())memory_table_hash
> -};
> -#endif
>
>  struct MemoryTableEntry
>  {
> diff --git a/bindings/ruby/ext/metadata.cc b/bindings/ruby/ext/metadata.cc
> index c81d46c..b389b1f 100644
> --- a/bindings/ruby/ext/metadata.cc
> +++ b/bindings/ruby/ext/metadata.cc
> @@ -1,9 +1,5 @@
>  #include "typelib.hh"
> -#include <version.h>
> -
> -#if RUBY_VERSION_MINOR == 8
> -#define rb_str_new_cstr rb_str_new2
> -#endif
> +#include <ruby/version.h>
>
>  #include <typelib/typemodel.hh>
>
> diff --git a/cmake/RubyExtensions.cmake b/cmake/RubyExtensions.cmake
> index 3a6fdcd..615a08f 100644
> --- a/cmake/RubyExtensions.cmake
> +++ b/cmake/RubyExtensions.cmake
> @@ -23,8 +23,6 @@ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
>      EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RUBY_VERSION"
>         OUTPUT_VARIABLE RUBY_VERSION)
>      STRING(REPLACE "\n" "" RUBY_VERSION ${RUBY_VERSION})
> -    STRING(REGEX MATCH "^1\\.9" RUBY_19 ${RUBY_VERSION})
> -    STRING(REGEX MATCH "^1\\.9\\.1" RUBY_191 ${RUBY_VERSION})
>      message(STATUS "using Ruby version ${RUBY_VERSION}")
>
>      EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['CFLAGS']"
> @@ -36,14 +34,6 @@ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
>         GET_FILENAME_COMPONENT(rubylib_path ${ruby_path} PATH)
>         LINK_DIRECTORIES(${rubylib_path})
>
> -        if (RUBY_191)
> -            list(APPEND RUBY_INCLUDE_PATH "${ruby_path}/ruby")
> -            add_definitions(-DRUBY_191)
> -        elseif (RUBY_19)
> -            list(APPEND RUBY_INCLUDE_PATH "${ruby_path}/ruby")
> -            add_definitions(-DRUBY_19)
> -        endif()
> -
>         INCLUDE_DIRECTORIES(${RUBY_INCLUDE_PATH})
>         SET_SOURCE_FILES_PROPERTIES(${ARGN} PROPERTIES COMPILE_FLAGS "${RUBY_CFLAGS}")
>         ADD_LIBRARY(${target} MODULE ${ARGN})
>
>
> https://gitorious.org/orocos-toolchain
> ------------------------------------------------------------------------
>
> You are receiving this email because you have chosen to be notified by
> email whenever this favorite has new activity. You can manage your
> favorite subscriptions at https://gitorious.org/favorites
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.