summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/ruby/PKGBUILD33
-rw-r--r--libre/ruby/remove-nonfree-json-references.patch (renamed from libre/ruby/libre.patch)81
-rw-r--r--libre/ruby/remove-nonfree-ruby-references.patch81
3 files changed, 102 insertions, 93 deletions
diff --git a/libre/ruby/PKGBUILD b/libre/ruby/PKGBUILD
index d9a5b6890..41230a1a0 100644
--- a/libre/ruby/PKGBUILD
+++ b/libre/ruby/PKGBUILD
@@ -6,7 +6,7 @@
# Maintainer: André Silva <emulatorman@parabola.nu>
pkgname=(ruby ruby-docs)
-pkgver=2.2.2
+pkgver=2.2.3
_jsonver=1.8.1
pkgrel=1.parabola1
arch=(i686 x86_64)
@@ -15,27 +15,36 @@ license=(BSD custom)
makedepends=(gdbm openssl libffi doxygen graphviz libyaml ttf-dejavu tk)
options=(!emptydirs)
mksource=(http://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz
- https://github.com/flori/json/archive/v${_jsonver}.tar.gz
- json-${_jsonver}.gem
- libre.patch)
+ https://github.com/flori/json/archive/v${_jsonver}.tar.gz)
source=(https://repo.parabola.nu/other/ruby-libre/ruby-libre-${pkgver}.tar.xz
+ json-${_jsonver}.gem
+ remove-nonfree-json-references.patch
+ remove-nonfree-ruby-references.patch
gemrc)
-mksha1sums=('58cfec8db9b51ad1ff3bd2b9065da087913a6268'
- '043ed2df4b0ce2174c9c020ffcb4ec31f9fde560'
- '2cd288d00c5211e4c9d9338080b30af65cbb143a'
- '5595b4eeb67ac5f63d13630932b44bf2a8ed9197')
-sha1sums=('194cabc318c0ed63042059c5f60376f254c5b626'
+mksha1sums=('cff5421e3a7f6dbe72009ef44164d4b9e6d1801f'
+ '043ed2df4b0ce2174c9c020ffcb4ec31f9fde560')
+sha1sums=('36c5a0b8179179b91ee185796519a841dfa4b9be'
+ '2cd288d00c5211e4c9d9338080b30af65cbb143a'
+ '0ba1010a271e6fcc1734f7382b99963f46133ea5'
+ '57b7f137daf2e925739e8c1d1471b13b9bfa8bbd'
'dc536754c8fac2c3d82965c5a708cd8f79562d98')
mksource() {
rm -rv ruby-${pkgver}/ext/json
rm -rv ruby-${pkgver}/test/json
-
rm -rv json-${_jsonver}/ext
+}
+
+prepare() {
+ cd ruby-${pkgver}
+
+ install -D -m644 ${srcdir}/json-${_jsonver}.gem gems
+
+ patch -Np1 -i ${srcdir}/remove-nonfree-ruby-references.patch
- cp -v json-${_jsonver}.gem ruby-${pkgver}/gems
+ cd ${srcdir}/json-${_jsonver}
- patch -Np0 -i libre.patch
+ patch -Np1 -i ${srcdir}/remove-nonfree-json-references.patch
}
build() {
diff --git a/libre/ruby/libre.patch b/libre/ruby/remove-nonfree-json-references.patch
index ea530d38d..4fb5dd1e2 100644
--- a/libre/ruby/libre.patch
+++ b/libre/ruby/remove-nonfree-json-references.patch
@@ -236,84 +236,3 @@ diff -Nur json-1.8.1.orig/lib/json.rb json-1.8.1/lib/json.rb
- end
+ require 'json/pure'
end
-diff -Nur ruby-2.2.2.orig/common.mk ruby-2.2.2/common.mk
---- ruby-2.2.2.orig/common.mk 2015-03-22 00:39:38.000000000 -0300
-+++ ruby-2.2.2/common.mk 2015-04-14 15:33:02.058396283 -0300
-@@ -15,7 +15,7 @@
-
- RUBYLIB = $(PATH_SEPARATOR)
- RUBYOPT = -
--RUN_OPTS = --disable-gems
-+RUN_OPTS = --disable-gems -I$(srcdir)/../json-1.8.1/lib
-
- SPEC_GIT_BASE = git://github.com/ruby
- MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
-@@ -728,8 +728,6 @@
-
- srcs-ext: $(EXT_SRCS)
-
--srcs-extra: $(srcdir)/ext/json/parser/parser.c
--
- LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb
-
- srcs-lib: $(LIB_SRCS)
-@@ -816,11 +814,6 @@
- top_srcdir=../.. srcdir=. \
- RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
-
--$(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl
-- $(ECHO) generating $@
-- $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(MFLAGS) \
-- Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. BASERUBY="$(BASERUBY)"
--
- $(srcdir)/ext/rbconfig/sizeof/sizes.c: $(srcdir)/ext/rbconfig/sizeof/depend \
- $(srcdir)/tool/generic_erb.rb $(srcdir)/template/sizes.c.tmpl $(srcdir)/configure.in
- $(ECHO) generating $@
-diff -Nur ruby-2.2.2.orig/defs/default_gems ruby-2.2.2/defs/default_gems
---- ruby-2.2.2.orig/defs/default_gems 2014-07-15 00:43:04.000000000 -0300
-+++ ruby-2.2.2/defs/default_gems 2015-04-14 15:33:02.058396283 -0300
-@@ -1,4 +1,3 @@
- # gem base directory versioning file [executable files under bin]
- rake lib/rake lib/rake.rb [rake]
- rdoc lib/rdoc lib/rdoc.rb [rdoc ri]
--json ext/json ext/json/lib/json/version.rb
-diff -Nur ruby-2.2.2.orig/ext/.document ruby-2.2.2/ext/.document
---- ruby-2.2.2.orig/ext/.document 2014-08-02 11:55:36.000000000 -0300
-+++ ruby-2.2.2/ext/.document 2015-04-14 15:33:02.058396283 -0300
-@@ -35,9 +35,6 @@
- io/nonblock/nonblock.c
- io/wait/lib
- io/wait/wait.c
--json/ext/generator/generator.c
--json/ext/parser/parser.c
--json/lib
- mathn/complex/complex.c
- mathn/rational/rational.c
- nkf/lib
-diff -Nur ruby-2.2.2.orig/gems/bundled_gems ruby-2.2.2/gems/bundled_gems
---- ruby-2.2.2.orig/gems/bundled_gems 2014-12-12 11:00:15.000000000 -0200
-+++ ruby-2.2.2/gems/bundled_gems 2015-04-14 15:33:02.058396283 -0300
-@@ -1,3 +1,4 @@
- power_assert 0.2.2
- test-unit 3.0.8
- minitest 5.4.3
-+json 1.8.1
-diff -Nur ruby-2.2.2.orig/test/ruby/test_module.rb ruby-2.2.2/test/ruby/test_module.rb
---- ruby-2.2.2.orig/test/ruby/test_module.rb 2015-04-12 12:41:32.000000000 -0300
-+++ ruby-2.2.2/test/ruby/test_module.rb 2015-04-14 15:33:02.058396283 -0300
-@@ -202,7 +202,6 @@
-
- ancestors = Object.ancestors
- mixins = ancestors - [Object, Kernel, BasicObject]
-- mixins << JSON::Ext::Generator::GeneratorMethods::String if defined?(JSON::Ext::Generator::GeneratorMethods::String)
- assert_equal([Object, Kernel, BasicObject], ancestors - mixins)
- assert_equal([String, Comparable, Object, Kernel, BasicObject], String.ancestors - mixins)
- end
-@@ -436,7 +435,6 @@
- assert_equal([Mixin], User.included_modules)
-
- mixins = Object.included_modules - [Kernel]
-- mixins << JSON::Ext::Generator::GeneratorMethods::String if defined?(JSON::Ext::Generator::GeneratorMethods::String)
- assert_equal([Kernel], Object.included_modules - mixins)
- assert_equal([Comparable, Kernel], String.included_modules - mixins)
- end
diff --git a/libre/ruby/remove-nonfree-ruby-references.patch b/libre/ruby/remove-nonfree-ruby-references.patch
new file mode 100644
index 000000000..77966827c
--- /dev/null
+++ b/libre/ruby/remove-nonfree-ruby-references.patch
@@ -0,0 +1,81 @@
+diff -Nur ruby-2.2.3.orig/common.mk ruby-2.2.3/common.mk
+--- ruby-2.2.3.orig/common.mk 2015-08-15 15:10:16.000000000 -0300
++++ ruby-2.2.3/common.mk 2015-08-20 01:58:55.065621626 -0300
+@@ -15,7 +15,7 @@
+
+ RUBYLIB = $(PATH_SEPARATOR)
+ RUBYOPT = -
+-RUN_OPTS = --disable-gems
++RUN_OPTS = --disable-gems -I$(srcdir)/../json-1.8.1/lib
+
+ SPEC_GIT_BASE = git://github.com/ruby
+ MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
+@@ -729,8 +729,6 @@
+
+ srcs-ext: $(EXT_SRCS)
+
+-srcs-extra: $(srcdir)/ext/json/parser/parser.c
+-
+ LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb
+
+ srcs-lib: $(LIB_SRCS)
+@@ -817,11 +815,6 @@
+ top_srcdir=../.. srcdir=. \
+ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
+
+-$(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl
+- $(ECHO) generating $@
+- $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(MFLAGS) \
+- Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. BASERUBY="$(BASERUBY)"
+-
+ $(srcdir)/ext/rbconfig/sizeof/sizes.c: $(srcdir)/ext/rbconfig/sizeof/depend \
+ $(srcdir)/tool/generic_erb.rb $(srcdir)/template/sizes.c.tmpl $(srcdir)/configure.in
+ $(ECHO) generating $@
+diff -Nur ruby-2.2.3.orig/defs/default_gems ruby-2.2.3/defs/default_gems
+--- ruby-2.2.3.orig/defs/default_gems 2014-07-15 00:43:04.000000000 -0300
++++ ruby-2.2.3/defs/default_gems 2015-08-20 01:58:55.065621626 -0300
+@@ -1,4 +1,3 @@
+ # gem base directory versioning file [executable files under bin]
+ rake lib/rake lib/rake.rb [rake]
+ rdoc lib/rdoc lib/rdoc.rb [rdoc ri]
+-json ext/json ext/json/lib/json/version.rb
+diff -Nur ruby-2.2.3.orig/ext/.document ruby-2.2.3/ext/.document
+--- ruby-2.2.3.orig/ext/.document 2014-08-02 11:55:36.000000000 -0300
++++ ruby-2.2.3/ext/.document 2015-08-20 01:58:55.065621626 -0300
+@@ -35,9 +35,6 @@
+ io/nonblock/nonblock.c
+ io/wait/lib
+ io/wait/wait.c
+-json/ext/generator/generator.c
+-json/ext/parser/parser.c
+-json/lib
+ mathn/complex/complex.c
+ mathn/rational/rational.c
+ nkf/lib
+diff -Nur ruby-2.2.3.orig/gems/bundled_gems ruby-2.2.3/gems/bundled_gems
+--- ruby-2.2.3.orig/gems/bundled_gems 2014-12-12 11:00:15.000000000 -0200
++++ ruby-2.2.3/gems/bundled_gems 2015-08-20 01:58:55.065621626 -0300
+@@ -1,3 +1,4 @@
+ power_assert 0.2.2
+ test-unit 3.0.8
+ minitest 5.4.3
++json 1.8.1
+diff -Nur ruby-2.2.3.orig/test/ruby/test_module.rb ruby-2.2.3/test/ruby/test_module.rb
+--- ruby-2.2.3.orig/test/ruby/test_module.rb 2015-04-12 12:41:32.000000000 -0300
++++ ruby-2.2.3/test/ruby/test_module.rb 2015-08-20 01:58:55.065621626 -0300
+@@ -202,7 +202,6 @@
+
+ ancestors = Object.ancestors
+ mixins = ancestors - [Object, Kernel, BasicObject]
+- mixins << JSON::Ext::Generator::GeneratorMethods::String if defined?(JSON::Ext::Generator::GeneratorMethods::String)
+ assert_equal([Object, Kernel, BasicObject], ancestors - mixins)
+ assert_equal([String, Comparable, Object, Kernel, BasicObject], String.ancestors - mixins)
+ end
+@@ -436,7 +435,6 @@
+ assert_equal([Mixin], User.included_modules)
+
+ mixins = Object.included_modules - [Kernel]
+- mixins << JSON::Ext::Generator::GeneratorMethods::String if defined?(JSON::Ext::Generator::GeneratorMethods::String)
+ assert_equal([Kernel], Object.included_modules - mixins)
+ assert_equal([Comparable, Kernel], String.included_modules - mixins)
+ end