Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK)) by mollari.NetBSD.org (Postfix) with ESMTPS id CD1087A16F for ; Fri, 14 Apr 2017 21:35:36 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 7366984DBE; Fri, 14 Apr 2017 21:35:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0588384DAF for ; Fri, 14 Apr 2017 21:35:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id X2ASTDJZhm5A for ; Fri, 14 Apr 2017 21:35:35 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 2573E84CDE for ; Fri, 14 Apr 2017 21:35:35 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 204F0FBE4; Fri, 14 Apr 2017 21:35:35 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1492205735220380" MIME-Version: 1.0 Date: Fri, 14 Apr 2017 21:35:35 +0000 From: "Min Sik Kim" Subject: CVS commit: pkgsrc/devel/ruby-eet To: pkgsrc-changes@NetBSD.org Reply-To: minskim@netbsd.org X-Mailer: log_accum Message-Id: <20170414213535.204F0FBE4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1492205735220380 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: minskim Date: Fri Apr 14 21:35:35 UTC 2017 Modified Files: pkgsrc/devel/ruby-eet: Makefile PLIST distinfo pkgsrc/devel/ruby-eet/patches: patch-Rakefile patch-rake_extensiontask.rb Added Files: pkgsrc/devel/ruby-eet/patches: patch-ext_ext.c patch-rake_configuretask.rb Log Message: Make ruby-eet build with ruby-2.x This no longer builds with ruby-1.8.x, which will be removed soon. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 pkgsrc/devel/ruby-eet/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/devel/ruby-eet/PLIST cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/ruby-eet/distinfo cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/ruby-eet/patches/patch-Rakefile \ pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb cvs rdiff -u -r0 -r1.1 pkgsrc/devel/ruby-eet/patches/patch-ext_ext.c \ pkgsrc/devel/ruby-eet/patches/patch-rake_configuretask.rb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1492205735220380 Content-Disposition: inline Content-Length: 10098 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/devel/ruby-eet/Makefile diff -u pkgsrc/devel/ruby-eet/Makefile:1.16 pkgsrc/devel/ruby-eet/Makefile:1.17 --- pkgsrc/devel/ruby-eet/Makefile:1.16 Thu Sep 8 15:19:16 2016 +++ pkgsrc/devel/ruby-eet/Makefile Fri Apr 14 21:35:34 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2016/09/08 15:19:16 joerg Exp $ +# $NetBSD: Makefile,v 1.17 2017/04/14 21:35:34 minskim Exp $ DISTNAME= ruby-eet-0.1.4 PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME:S/ruby-//} @@ -11,8 +11,6 @@ HOMEPAGE= http://code-monkey.de/pages/ru COMMENT= Ruby module to read and write EET files LICENSE= mit -RUBY_VERSIONS_ACCEPTED= 18 - RUBY_RDOC_REQD= 2.0.0 USE_RAKE= YES USE_TOOLS+= pkg-config Index: pkgsrc/devel/ruby-eet/PLIST diff -u pkgsrc/devel/ruby-eet/PLIST:1.1.1.1 pkgsrc/devel/ruby-eet/PLIST:1.2 --- pkgsrc/devel/ruby-eet/PLIST:1.1.1.1 Sun Oct 26 06:12:29 2008 +++ pkgsrc/devel/ruby-eet/PLIST Fri Apr 14 21:35:34 2017 @@ -1,3 +1,3 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2008/10/26 06:12:29 minskim Exp $ +@comment $NetBSD: PLIST,v 1.2 2017/04/14 21:35:34 minskim Exp $ ${RUBY_SITELIB}/eet.rb -${RUBY_SITEARCHLIB}/eet_ext.${RUBY_DLEXT} +${RUBY_SITEARCHLIB}/eet_ext.so Index: pkgsrc/devel/ruby-eet/distinfo diff -u pkgsrc/devel/ruby-eet/distinfo:1.4 pkgsrc/devel/ruby-eet/distinfo:1.5 --- pkgsrc/devel/ruby-eet/distinfo:1.4 Tue Nov 3 03:29:22 2015 +++ pkgsrc/devel/ruby-eet/distinfo Fri Apr 14 21:35:34 2017 @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.4 2015/11/03 03:29:22 agc Exp $ +$NetBSD: distinfo,v 1.5 2017/04/14 21:35:34 minskim Exp $ SHA1 (ruby-eet-0.1.4.tar.gz) = 16e1824179b019f48a554388aadf5168521cad51 RMD160 (ruby-eet-0.1.4.tar.gz) = 10521754510e8f8bd00372031d663c0ebdae41c2 SHA512 (ruby-eet-0.1.4.tar.gz) = 0f6cac9e981a8cc0c1614111e4d7aa9f3f80e2080aed3fa0cbc6ac7aa689ba95e854b53859ebb7ff9904f9b9b94916e0e86f1a1c47d15c00e86d0493ede9e2f5 Size (ruby-eet-0.1.4.tar.gz) = 19972 bytes -SHA1 (patch-Rakefile) = 5991edede98deb936702f775ec38b9e3a7ca68eb -SHA1 (patch-rake_extensiontask.rb) = 89ab3da8bcbf2e1ec5a8ca4f9047ec19698f4392 +SHA1 (patch-Rakefile) = 2b9ccd581f75ce04d03889ffd58ad4072a8a6fd7 +SHA1 (patch-ext_ext.c) = 5bb8a156415b960e369d1f3cf637f07dbaed3c3c +SHA1 (patch-rake_configuretask.rb) = 04b836c314954cee4b1ced214fbd5eafca6b77a9 +SHA1 (patch-rake_extensiontask.rb) = d6b15569753b2475a833a7b33ef8344b48696650 Index: pkgsrc/devel/ruby-eet/patches/patch-Rakefile diff -u pkgsrc/devel/ruby-eet/patches/patch-Rakefile:1.1 pkgsrc/devel/ruby-eet/patches/patch-Rakefile:1.2 --- pkgsrc/devel/ruby-eet/patches/patch-Rakefile:1.1 Thu Mar 7 17:00:44 2013 +++ pkgsrc/devel/ruby-eet/patches/patch-Rakefile Fri Apr 14 21:35:34 2017 @@ -1,10 +1,10 @@ -$NetBSD: patch-Rakefile,v 1.1 2013/03/07 17:00:44 taca Exp $ +$NetBSD: patch-Rakefile,v 1.2 2017/04/14 21:35:34 minskim Exp $ * Require modern task rule from rdoc. --- Rakefile.orig 2007-03-23 11:32:09.000000000 +0000 +++ Rakefile -@@ -1,7 +1,7 @@ +@@ -1,13 +1,13 @@ require "rbconfig" require "rake/clean" require "rake/testtask" @@ -13,3 +13,35 @@ $NetBSD: patch-Rakefile,v 1.1 2013/03/07 require "rake/packagetask" require "rake/contrib/compositepublisher" require "rake/contrib/sshpublisher" + +-require "rake/configuretask" +-require "rake/extensiontask" ++require_relative "rake/configuretask" ++require_relative "rake/extensiontask" + + PKG_NAME = "ruby-eet" + PKG_VERSION = File.read("lib/eet.rb"). +@@ -43,6 +43,9 @@ task :pre_ext => [:configure] do + + cflags = [ + ext.env[:cflags], ++ "-I#{RbConfig::CONFIG["rubyhdrdir"]}", ++ "-I#{RbConfig::CONFIG["rubyhdrdir"]}/ruby", ++ "-I#{RbConfig::CONFIG["rubyhdrdir"]}/#{RbConfig::CONFIG["arch"]}", + config.eet.cflags + ] + +@@ -52,11 +55,11 @@ end + task :install => [:ext] do |t| + destdir = ENV["DESTDIR"] || "" + +- ddir = destdir + Config::CONFIG["sitearchdir"] ++ ddir = destdir + RbConfig::CONFIG["sitearchdir"] + FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir) + FileUtils::Verbose.install(ext.lib_name, ddir, :mode => 0755) + +- ddir = destdir + Config::CONFIG["sitelibdir"] ++ ddir = destdir + RbConfig::CONFIG["sitelibdir"] + FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir) + FileUtils::Verbose.install("lib/eet.rb", ddir, :mode => 0644) + end Index: pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb diff -u pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb:1.1 pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb:1.2 --- pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb:1.1 Fri Aug 12 16:29:04 2011 +++ pkgsrc/devel/ruby-eet/patches/patch-rake_extensiontask.rb Fri Apr 14 21:35:34 2017 @@ -1,15 +1,34 @@ -$NetBSD: patch-rake_extensiontask.rb,v 1.1 2011/08/12 16:29:04 taca Exp $ +$NetBSD: patch-rake_extensiontask.rb,v 1.2 2017/04/14 21:35:34 minskim Exp $ * Add proper compiler flags. --- rake/extensiontask.rb.orig 2007-03-23 11:05:12.000000000 +0000 +++ rake/extensiontask.rb -@@ -98,7 +98,7 @@ module Rake +@@ -98,15 +98,15 @@ module Rake def define_rules for ext in env[:c_exts] Rake::Task.create_rule '.'+env[:objext] => '.'+ext do |r| - sh_cmd :cc, :cflags, :cppflags, {'-D' => :defines}, {'-I' => :includedirs}, {'-I' => :topdir}, +- '-c', '-o', r.name, r.sources + sh_cmd :cc, :cflags, :ccdlflags, :cppflags, {'-D' => :defines}, {'-I' => :includedirs}, {'-I' => :topdir}, - '-c', '-o', r.name, r.sources ++ '-c', '-o', r.name, r.sources.join(' ') end end + + for ext in env[:cpp_exts] + Rake::Task.create_rule '.'+env[:objext] => '.'+ext do |r| + sh_cmd :cxx, :cxxflags, :cppflags, {'-D' => :defines}, {'-I' => :includedirs}, {'-I' => :topdir}, +- '-o', r.name, '-c', r.sources ++ '-o', r.name, '-c', r.sources.join(' ') + end + end + end +@@ -121,7 +121,7 @@ module Rake + @@DefaultEnv = e + end + +- Config::CONFIG.merge(ENV).each { |k, v| @@DefaultEnv[k.downcase.to_sym] = v } ++ RbConfig::CONFIG.merge(ENV).each { |k, v| @@DefaultEnv[k.downcase.to_sym] = v } + @@DefaultEnv = { + :cxx => 'c++', + :cxxflags => '', Added files: Index: pkgsrc/devel/ruby-eet/patches/patch-ext_ext.c diff -u /dev/null pkgsrc/devel/ruby-eet/patches/patch-ext_ext.c:1.1 --- /dev/null Fri Apr 14 21:35:35 2017 +++ pkgsrc/devel/ruby-eet/patches/patch-ext_ext.c Fri Apr 14 21:35:34 2017 @@ -0,0 +1,95 @@ +$NetBSD: patch-ext_ext.c,v 1.1 2017/04/14 21:35:34 minskim Exp $ + +--- ext/ext.c.orig 2007-03-23 11:21:39.000000000 +0000 ++++ ext/ext.c +@@ -334,7 +334,7 @@ c_write (int argc, VALUE *argv, VALUE se + cbuf = StringValuePtr (buf); + + n = eet_write (*ef, ckey, +- cbuf, RSTRING (buf)->len, ++ cbuf, RSTRING_LENINT(buf), + comp == Qtrue); + if (!n) + rb_raise (rb_eIOError, "couldn't write to file"); +@@ -445,7 +445,7 @@ c_write_image (int argc, VALUE *argv, VA + quality = FIX2INT (tmp); + } + +- if (!RSTRING (buf)->len) ++ if (!RSTRING_LEN(buf)) + return INT2FIX (0); + + n = eet_data_image_write (*ef, ckey, cbuf, +@@ -472,8 +472,8 @@ chunk_init (VALUE self, VALUE tag, VALUE + /* libeet uses a signed 32bit integer to store the + * chunk size, so make sure we don't overflow it + */ +- tag_len = RSTRING (tag)->len; +- data_len = RSTRING (data)->len; ++ tag_len = RSTRING_LEN(tag); ++ data_len = RSTRING_LEN(data); + tmp = tag_len + 1 + data_len; + + if (tmp < tag_len || tmp < data_len || tmp < 1 || tmp >= 2147483647L) +@@ -499,26 +499,25 @@ chunk_to_s (VALUE self) + tmp = rb_ivar_get (self, id_data); + data = RSTRING (tmp); + +- buf_len = 9 + tag->len + data->len; ++ buf_len = 9 + RSTRING_LENINT(tag) + RSTRING_LENINT(data); + ret = rb_str_buf_new (buf_len); + +- buf = (unsigned char *) RSTRING (ret)->ptr; +- RSTRING (ret)->len = buf_len; ++ buf = (unsigned char *) RSTRING_PTR(ret); + + memcpy (buf, "CHnK", 4); + buf += 4; + +- size = tag->len + data->len + 1; ++ size = RSTRING_LENINT(tag) + RSTRING_LENINT(data) + 1; + size = BSWAP32 (size); + memcpy (buf, &size, 4); + buf += 4; + +- memcpy (buf, tag->ptr, tag->len); +- buf += tag->len; ++ memcpy (buf, RSTRING_PTR(tag), RSTRING_LEN(tag)); ++ buf += RSTRING_LEN(tag); + + *buf++ = 0; + +- memcpy (buf, data->ptr, data->len); ++ memcpy (buf, RSTRING_PTR(data), RSTRING_LEN(data)); + + return ret; + } +@@ -561,13 +560,13 @@ c_to_eet (VALUE self) + props = rb_funcall (self, id_to_eet_properties, 0); + + if (rb_obj_is_kind_of (props, rb_cHash) == Qfalse || +- !RHASH (props)->tbl->num_entries) ++ !RHASH_TBL(props)->num_entries) + rb_raise (ePropError, "invalid EET properties"); + + name = rb_funcall (self, id_to_eet_name, 0); + StringValue (name); + +- if (!RSTRING (name)->len || ++ if (!RSTRING_LEN(name) || + rb_funcall (name, id_include, 1, INT2FIX (0))) + rb_raise (eNameError, "invalid EET name"); + +@@ -578,9 +577,9 @@ c_to_eet (VALUE self) + #else + keys = RARRAY (rb_funcall (props, id_keys, 0)); + +- for (i = 0; i < keys->len; i++) +- for_each_prop (keys->ptr[i], +- rb_hash_aref (props, keys->ptr[i]), ++ for (i = 0; i < RARRAY_LENINT(keys); i++) ++ for_each_prop (RARRAY_PTR(keys)[i], ++ rb_hash_aref (props, RARRAY_PTR(keys)[i]), + stream); + #endif + Index: pkgsrc/devel/ruby-eet/patches/patch-rake_configuretask.rb diff -u /dev/null pkgsrc/devel/ruby-eet/patches/patch-rake_configuretask.rb:1.1 --- /dev/null Fri Apr 14 21:35:35 2017 +++ pkgsrc/devel/ruby-eet/patches/patch-rake_configuretask.rb Fri Apr 14 21:35:34 2017 @@ -0,0 +1,13 @@ +$NetBSD: patch-rake_configuretask.rb,v 1.1 2017/04/14 21:35:34 minskim Exp $ + +--- rake/configuretask.rb.orig 2007-03-23 11:05:12.000000000 +0000 ++++ rake/configuretask.rb +@@ -244,7 +244,7 @@ module Rake + + cc = ENV["CC"] || "cc" + flags = (ENV["CFLAGS"] || "").dup +- flags << " -I" + Config::CONFIG["archdir"] ++ flags << " -I" + RbConfig::CONFIG["includedir"] + + unless @opts[:try_link] + flags << " -c" --_----------=_1492205735220380--