debian/0000755000000000000000000000000012265763130007173 5ustar debian/rules0000755000000000000000000000070111772544237010260 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby debian/watch0000644000000000000000000000015111635725532010225 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/RubyInline .*/RubyInline-(.*).tar.gz debian/source/0000755000000000000000000000000011635725532010477 5ustar debian/source/format0000644000000000000000000000001411635725532011705 0ustar 3.0 (quilt) debian/ruby-inline.docs0000644000000000000000000000004011635725532012300 0ustar README.txt debian/README.Debian debian/ruby-test-files.yaml0000644000000000000000000000002612265762115013115 0ustar - test/test_inline.rb debian/README.Debian0000644000000000000000000000341611635725532011244 0ustar RubyInline is a Ruby module that allows for easily embedding and on-the-fly compiling C code in Ruby modules. Although it will work right away on most typical situations, there are a couple of catches you should keep in mind: - To minimize startup times, the inlined C code is cached. This means, any user who calls this module in his Ruby code will get a directory called ".ruby_inline" on his home directory. Inside this directory, Inline will store the C code to be compiled and the compiled objects. The directory can be safely purged, as it will be regenerated as needed. - You can set up the environment variable INLINEDIR to specify a different directory, i.e., to cope with the cases where the current user has no rights to write on his own directory (which is often the case when using this module for Web-facing application servers). You can safely point it to a randomized temporary directory, as in: $ su - nobody -c 'export INLINEDIR=$(mktemp -d); \ ruby_inline_using_application; \ rm -rf $INLINEDIR' Of course, you would replace the call to Ruby to the startup for your application. There will be a slight time penalty upon initialization, as this will compile anew the code each time it is started, but will allow you to work with users unable to work in their home directories. - It might also be a good idea, specially on slower systems, to set INLINEDIR to a fixed location, i.e. to create user-owned /var/lib/inline/$(whoami) directories. This would avoid the recompilation penalty - You should just remember to purge the directory should you stop using this module. Of course, for most use cases, the default .ruby_inline directory will serve you well. -- Gunnar Wolf , Mon, 22 Sep 2008 18:16:12 -0500 debian/copyright0000644000000000000000000000442012160614523011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RubyInline Source: http://www.zenspider.com/ZSS/Products/RubyInline/ Files: * Copyright: Copyright (c) 2001-2006 Ryan Davis , Zen Spider Software License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: debian/* Copyright: 2006 Patrick Ringl 2009 Tobias Grimm 2011 Gunnar Wolf License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/control0000644000000000000000000000245212265762727010614 0ustar Source: ruby-inline Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Patrick Ringl , Paul van Tilburg , Gunnar Wolf Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-minitest, rake, ruby-zentest Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-inline.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-inline.git;a=summary Homepage: http://www.zenspider.com/ZSS/Products/RubyInline/ XS-Ruby-Versions: all Package: ruby-inline Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby2.0-dev, ruby1.9.1-dev, rake Recommends: gcc | c-compiler Description: Ruby library for embedding C/++ external module code Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it. . You can even write extra builders that will allow you to write inlined code in any language. Use Inline::C as a template and look at Module#inline for the required API. debian/patches/0000755000000000000000000000000012265765046010632 5ustar debian/patches/ruby2.0-multiarch0000644000000000000000000000150712265764547013754 0ustar Author: Christian Hofstaedtler Description: use proper multiarch location for Ruby 2.0 Last-Update: 2014-01-15 Index: ruby-inline/lib/inline.rb =================================================================== --- ruby-inline.orig/lib/inline.rb 2014-01-15 18:19:01.959718169 +0100 +++ ruby-inline/lib/inline.rb 2014-01-15 18:19:11.483673062 +0100 @@ -595,6 +595,7 @@ VALUE #{method}_equals(VALUE value) { (RbConfig::CONFIG['LDFLAGS'] if sane), '-I', hdrdir, config_hdrdir, + (['-I', RbConfig::CONFIG['rubyarchhdrdir']] if RUBY_VERSION >= '2'), '-I', RbConfig::CONFIG['includedir'], ("-L#{RbConfig::CONFIG['libdir']}" if sane), (['-o', so_name.inspect] if sane), debian/patches/inline_mapping_instead_of_zentest_mapping0000644000000000000000000000550712265762115021231 0ustar Author: Gunnar Wolf Forwarded: Not-needed Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658889 Last-Update: 2012-02-06 Applied-upstream: no Description: Replaced ZenTestMapping usage with custom implementation This avoids pulling in a series of build-dependencies while allowing us to run the test suite Index: ruby-inline/lib/inline.rb =================================================================== --- ruby-inline.orig/lib/inline.rb 2014-01-15 23:29:03.227042905 +0100 +++ ruby-inline/lib/inline.rb 2014-01-15 23:29:05.000000000 +0100 @@ -52,7 +52,7 @@ require "digest/md5" require 'fileutils' #require 'rubygems' -require 'zentest_mapping' +require 'inline_method_name_mapping' $TESTING = false unless defined? $TESTING @@ -165,7 +165,7 @@ module Inline class C - include ZenTestMapping + include MethodNameMapping MAGIC_ARITY_THRESHOLD = 15 MAGIC_ARITY = -1 @@ -259,7 +259,7 @@ module Inline signature = parse_signature(src, !expand_types) function_name = signature['name'] method_name = options[:method_name] - method_name ||= test_to_normal function_name + method_name ||= to_ruby function_name return_type = signature['return'] arity = options[:arity] || signature['arity'] Index: ruby-inline/lib/inline_method_name_mapping.rb =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ ruby-inline/lib/inline_method_name_mapping.rb 2014-01-15 23:30:02.314633885 +0100 @@ -0,0 +1,48 @@ +module MethodNameMapping + @@method_map = { + 'bang' => '!', + 'percent' => '%', + 'and' => '&', + 'times' => '*', + 'times2' => '**', + 'plus' => '+', + 'minus' => '-', + 'div' => '/', + 'lt' => '<', + 'lte' => '<=', + 'spaceship' => '<=>', + 'lt2' => '<<', + 'equals2' => '==', + 'equals3' => '===', + 'equalstilde' => '=~', + 'gt' => '>', + 'ge' => '>=', + 'gt2' => '>>', + 'unary_plus' => '+@', + 'unary_minus' => '-@', + 'index' => '[]', + 'index_equals' => '[]=', + 'carat' => '^', + 'or' => '|', + 'tilde' => '~', + } + + @@mapped_re = @@method_map.values.map {|s| Regexp.escape(s)}.join("|") + + def to_ruby(name) + name = name.to_s.dup + is_class_method = name.sub!(/^class_/, '') + + if @@method_map.has_key?(name) + name=@@method_map[name] + elsif name.sub!(/_equals(_.*)?$/, '=') + elsif name.sub!(/_bang(_.*)?$/, '!') + elsif name.sub!(/_eh(_.*)?$/, '?') + elsif name =~ /(.*?)_/ and @@method_map.has_key? $1 + name = @@method_map[$1] + end + name = 'self.' + name if is_class_method + + return name + end +end debian/patches/series0000644000000000000000000000017612265762115012045 0ustar dont_require_rubygems fix_ruby_path inline_mapping_instead_of_zentest_mapping fix-tests-in-debian-build-env ruby2.0-multiarch debian/patches/fix-tests-in-debian-build-env0000644000000000000000000000121212265764377016214 0ustar Description: fix test in Debian build environment Author: Christian Hofstaedtler Last-Update: 2014-01-15 Index: ruby-inline/test/test_inline.rb =================================================================== --- ruby-inline.orig/test/test_inline.rb 2014-01-15 18:01:00.136727299 +0100 +++ ruby-inline/test/test_inline.rb 2014-01-15 18:01:00.192727046 +0100 @@ -14,7 +14,7 @@ File.umask(0) require 'pathname' -$inline_path = './lib/inline.rb' +$inline_path = './debian/ruby-inline/usr/lib/ruby/vendor_ruby/inline.rb' $test_inline_path = './test/test_inline.rb' class InlineTestCase < MiniTest::Unit::TestCase debian/patches/fix_ruby_path0000644000000000000000000000120412265765046013415 0ustar Author: Gunnar Wolf Forwarded: Not-needed Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658889 Last-Update: 2012-02-06 Applied-upstream: no Description: Use the correct location for the Ruby interpreter Following Debian Ruby policy. Index: ruby-inline/lib/inline.rb =================================================================== --- ruby-inline.orig/lib/inline.rb 2012-02-06 13:10:31.000000000 -0600 +++ ruby-inline/lib/inline.rb 2012-02-06 13:10:44.000000000 -0600 @@ -1,4 +1,4 @@ -#!/usr/local/bin/ruby -w +#!/usr/bin/ruby -w ## # Ruby Inline is a framework for writing ruby extensions in foreign debian/patches/dont_require_rubygems0000644000000000000000000000567012265765027015201 0ustar Author: Gunnar Wolf Forwarded: Not-needed Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658889 Last-Update: 2012-02-06 Applied-upstream: no Description: Calls to Rubygems not allowed within the Debian archive This module still had some RubyGems calls - This patch replaces them with the proper location, according to the Debian Ruby policy Index: ruby-inline/lib/inline.rb =================================================================== --- ruby-inline.orig/lib/inline.rb 2013-10-01 12:23:41.000000000 -0500 +++ ruby-inline/lib/inline.rb 2013-10-01 12:28:05.000000000 -0500 @@ -50,7 +50,7 @@ require "rbconfig" require "digest/md5" require 'fileutils' -require 'rubygems' +#require 'rubygems' require 'zentest_mapping' @@ -71,11 +71,13 @@ RUBINIUS = defined? RUBY_ENGINE DEV_NULL = (WINDOZE ? 'nul' : '/dev/null') GEM = 'gem' - RAKE = if RUBINIUS then - File.join(Gem.bindir, 'rake') - else - "#{Gem.ruby} -S rake" - end + # RAKE = if RUBINIUS then + # File.join(Gem.bindir, 'rake') + # else + # "#{Gem.ruby} -S rake" + # end + require 'rbconfig' + RAKE = '%s -S rake' % File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"]) warn "RubyInline v #{VERSION}" if $DEBUG @@ -133,7 +135,18 @@ def self.directory unless defined? @@directory then - version = "#{Gem.ruby_engine}-#{RbConfig::CONFIG['ruby_version']}" + # This version requires Rubygems - Work around it + # version = "#{Gem.ruby_engine}-#{RbConfig::CONFIG['ruby_version']}" + engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' + rubyver = case RUBY_VERSION + when /^1\.9/ + '1.9.1' + when /^1\.8/ + '1.8' + else + RUBY_VERSION + end + version = "#{engine}-#{rubyver}" @@directory = File.join(self.rootdir, ".ruby_inline", version) end Index: ruby-inline/test/test_inline.rb =================================================================== --- ruby-inline.orig/test/test_inline.rb 2013-10-01 12:23:41.000000000 -0500 +++ ruby-inline/test/test_inline.rb 2013-10-01 12:23:41.000000000 -0500 @@ -71,7 +71,18 @@ end def test_directory - version = "#{Gem.ruby_engine}-#{RbConfig::CONFIG['ruby_version']}" + # This version requires Rubygems - Work around it + # version = "#{Gem.ruby_engine}-#{RbConfig::CONFIG['ruby_version']}" + engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' + rubyver = case RUBY_VERSION + when /^1\.9/ + '1.9.1' + when /^1\.8/ + '1.8' + else + RUBY_VERSION + end + version = "#{engine}-#{rubyver}" inlinedir = File.join(@rootdir, ".ruby_inline", version) assert_equal(inlinedir, Inline.directory) end debian/compat0000644000000000000000000000000211635725532010375 0ustar 7 debian/local-options0000644000000000000000000000002012265762115011673 0ustar unapply-patches debian/changelog0000644000000000000000000001262612265763130011054 0ustar ruby-inline (3.12.2-2) unstable; urgency=medium * Team upload * Drop Recommends: rubygems -- Cédric Boutillier Thu, 16 Jan 2014 15:01:03 +0100 ruby-inline (3.12.2-1) unstable; urgency=medium * Team upload. [ Cédric Boutillier ] * debian/control: remove obsolete DM-Upload-Allowed flag * use canonical URI in Vcs-* fields * debian/copyright: use DEP5 copyright-format/1.0 official URL as Format [ Gunnar Wolf ] * New upstream release * Run the tests as part of the build process; add build-dependency on ruby-zentest [ Christian Hofstaedtler ] * Fix build on Ruby 2.0 * Bump Standards-Version to 3.9.5 (no changes) * Depend on current rubyX.Y-dev packages * Remove transitional packages -- Christian Hofstaedtler Wed, 15 Jan 2014 23:40:01 +0100 ruby-inline (3.11.2-2) unstable; urgency=low * Bumped gem2deb build-dependency to >= 0.3.0~. * debian/rules, debian/ruby-test-files.yaml: removed all tests for now. -- Paul van Tilburg Tue, 26 Jun 2012 23:28:53 +0200 ruby-inline (3.11.2-1) unstable; urgency=low * New upstream release * Standards-version 3.9.2→3.9.3 -- Gunnar Wolf Thu, 08 Mar 2012 17:31:43 -0600 ruby-inline (3.11.1-1) unstable; urgency=low * New upstream release * Fixed Vcs-Browser and Vcs-Git fields, which had a component mistaken. Thanks to Laurent Bigonville for noticing! * Once again, purged remanent calls to RubyGems (Closes: #658889) * Added DEP3 headers to existing patches -- Gunnar Wolf Mon, 06 Feb 2012 13:25:59 -0600 ruby-inline (3.11.0-1) unstable; urgency=low * New upstream release -- Gunnar Wolf Mon, 23 Jan 2012 12:18:10 -0600 ruby-inline (3.10.1-1) unstable; urgency=low * New upstream release * Repackaged using the gem2deb infrastructure * Now works also with Ruby 1.9.1! -- Gunnar Wolf Thu, 15 Sep 2011 11:51:15 -0500 libinline-ruby (3.8.4-1) unstable; urgency=low * New upstream release. * debian/control: bumped standards-version to 3.8.4; no changes required. * debian/README.Debian: - Added to explain inline caching and some issues, copied from libimage-science-ruby, courtesy of Gunnar Wolf (closes: #499859). * debian/libinline-ruby{1.8,}.examples: moved the examples to the libinline-ruby package. -- Paul van Tilburg Sun, 14 Feb 2010 13:38:20 +0100 libinline-ruby (3.8.3-3) unstable; urgency=low * Removed remaining unnecessary Gem usage (Closes: #557534) * Add myself to Uploaders * Run unit tests at build time * Replaced ZenTestMapping usage with custom implementation of the method name mapping * Install History.txt as upstream changelog * Recommends: gcc | c-compiler -- Tobias Grimm Sun, 06 Dec 2009 10:52:59 +0100 libinline-ruby (3.8.3-2) unstable; urgency=low * Add myself to Uploaders * add README.source * Debian Policy 3.8.3 * don't require rubygems (Closes: #543165, #543061) * switch to patchsys-quilt.mk -- Ryan Niebur Sun, 23 Aug 2009 12:07:52 -0700 libinline-ruby (3.8.3-1) unstable; urgency=low [ Paul van Tilburg ] * debian/control: - Bumped standards version to 3.8.1; no changes required. * debian/patches: - Dropped 00-fix-shebang: upstream removed the binary in question. [ Gunnar Wolf ] * New upstream release. * Changed section to Ruby as per ftp-masters' request * Added myself as an uploader * Standards-version → 3.8.2 (no changes needed) * Added #{misc:Depends} to the binary packages * Resurrected 00-fix-shebang.patch, as several files still point to /usr/local/bin/ruby (even to ruby17!) -- Gunnar Wolf Wed, 12 Aug 2009 16:43:43 -0500 libinline-ruby (3.6.7-1) unstable; urgency=low * New upstream release. -- Paul van Tilburg Mon, 31 Mar 2008 23:08:26 +0200 libinline-ruby (3.6.6-1) unstable; urgency=low * New upstream release. * Added homepage and Vcs-* headers to debian/control. * Bumped standards version to 3.7.3; no changes required. -- Paul van Tilburg Fri, 07 Mar 2008 20:47:46 +0100 libinline-ruby (3.6.4-1) unstable; urgency=low * New upstream release. * Remove debian/patches/01fixheader.patch since we no longer need to remove shebangs for libs. * Added debian/patches/00-fix-shebang.patch since we need to fix the /usr/local/bin call in bin/inline_package. -- Paul van Tilburg Sun, 07 Oct 2007 12:44:20 +0200 libinline-ruby (3.6.2-2) unstable; urgency=low * Adapted debian/control, debian/rules, and removed debian/control.in to drop the Uploaders rule. * Updated the description, libinline-ruby is not part of the libruby-extras bundle! -- Paul van Tilburg Wed, 18 Apr 2007 23:44:35 +0200 libinline-ruby (3.6.2-1) unstable; urgency=low * New upstream release -- Patrick Ringl Tue, 7 Nov 2006 13:58:07 +0100 libinline-ruby (3.5.0-2) unstable; urgency=low * Fixed the watch-file. -- Paul van Tilburg Tue, 12 Sep 2006 22:07:58 +0200 libinline-ruby (3.5.0-1) unstable; urgency=low [ Patrick Ringl ] * Initial release. [ Paul van Tilburg ] * Added the uploaders rule from ruby-pkg-tools since the package falls under team maintenance. -- Paul van Tilburg Fri, 25 Aug 2006 11:14:19 +0200 debian/helloworld_example.rb0000755000000000000000000000027111635725532013415 0ustar #!/usr/bin/ruby -w require 'inline' class Hello inline do |builder| builder.include "" builder.c 'void hello() { puts("hello world"); }' end end Hello.new.hello debian/ruby-inline.examples0000644000000000000000000000006711635725532013177 0ustar debian/helloworld_example.rb tutorial demo example*.rb