From 2d73595dd2b2dc25d2c9a975dfff6262df9c2d26 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 6 Feb 2019 04:30:35 -0500 Subject: [ruby]: upgrade to v2.6 --- libre/ruby/PKGBUILD | 61 +++++++++++--------- libre/ruby/add-json_pure.patch | 22 ++++++++ libre/ruby/json-2.1.0-libre.patch | 32 ----------- libre/ruby/json-libre.patch | 32 +++++++++++ libre/ruby/remove-json-ext.patch | 94 +++++++++++++++++++++++++++++++ libre/ruby/ruby-2.5-add-json_pure.patch | 22 -------- libre/ruby/ruby-2.5-remove-json-ext.patch | 91 ------------------------------ 7 files changed, 183 insertions(+), 171 deletions(-) create mode 100644 libre/ruby/add-json_pure.patch delete mode 100644 libre/ruby/json-2.1.0-libre.patch create mode 100644 libre/ruby/json-libre.patch create mode 100644 libre/ruby/remove-json-ext.patch delete mode 100644 libre/ruby/ruby-2.5-add-json_pure.patch delete mode 100644 libre/ruby/ruby-2.5-remove-json-ext.patch (limited to 'libre') diff --git a/libre/ruby/PKGBUILD b/libre/ruby/PKGBUILD index 989d87d3d..70d5c95e8 100644 --- a/libre/ruby/PKGBUILD +++ b/libre/ruby/PKGBUILD @@ -16,8 +16,9 @@ # https://bugs.ruby-lang.org/issues/11844 # https://github.com/flori/json/issues/277 + pkgname=(ruby ruby-docs) -pkgver=2.5.3 +pkgver=2.6.1 _jsonver=2.1.0 pkgrel=1 pkgrel+=.par1 @@ -28,46 +29,41 @@ url='http://www.ruby-lang.org/en/' license=(BSD2 custom) makedepends=(gdbm openssl libffi doxygen graphviz libyaml ttf-dejavu tk) options=(!emptydirs) -source=(https://repo.parabola.nu/other/ruby-libre/ruby-${pkgver}-libre${_srcrel}.tar.gz) -sha512sums=('5dee091aef9cbaa0f61296112a8ad19bf490579f7978023983fc31d2f2e009b2a2e6bd703a6684d0249fa8f56c37985a6a42563ccc9958b0553173ed76771a31') - -mkdepends=('ruby') # for 'gem build' -mksource=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz - ruby-2.5-remove-json-ext.patch - ruby-2.5-add-json_pure.patch - json-${_jsonver}.tar.gz::https://github.com/flori/json/archive/v${_jsonver}.tar.gz - json-${_jsonver}-libre.patch) -mksha512sums=('6dcae0e8d0bacdb2cbde636e2030596308b5af53f2eb85d3adccb67b02e6f8f9751e8117d12f8484829fdd9d995f6e327f701d9b433bcf94f1f59d13a1fd7518' - 'dbfd2517e87571e25fea832f50535e76c07972e15f48050ad7b08b04993c566ae7b5e8b1dd0e3cd65eb6161290026eaa71ff4528e98a92e37983066b4929cfb1' - '303172561a4ba54515fddfd9ea7e0c833e550b0ae5e9f331956f178f8c5e20aa0e3c4036251ddfd04312769ef7d71d83fde0afe64f6fa8e9052ca5a294c62927' - '6019cc26a0919e4d39ae0bf737b51cd9a474c74a55d25f6931ac04d61826bb810d063190a80a29810e57d7457d1a247acd82fd78de2c4c01acb7d73ee9fde603' - '582017bd0f98878c0ac6f4625854422662d83ae6274a34762082a720052023780dceb17694b1f4e18d9a0dcbb525990341176eac31040aa63099a8b3a8d52071') - -mksource() { +source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz + json-${_jsonver}.tar.gz::https://github.com/flori/json/archive/v${_jsonver}.tar.gz + remove-json-ext.patch + add-json_pure.patch + json-libre.patch) +sha512sums=('fb36289a955f0596c683cdadf1e4a9a9fd35222b1e1c6160c2e7cd82e5befd40a7aa4361e55f7a8f83c06ee899ec493821c7db34a60c4ac3bca0e874d33ef1a9' + '6019cc26a0919e4d39ae0bf737b51cd9a474c74a55d25f6931ac04d61826bb810d063190a80a29810e57d7457d1a247acd82fd78de2c4c01acb7d73ee9fde603' + '412dff58c77f6cbc598bf49fb09cb416ad88635e9213acc60a1d103e5d093b2d80260c41e07fbc0634047c655756f5bdd8b2f5e59ae8e4b992b598b251b4c3e9' + '303172561a4ba54515fddfd9ea7e0c833e550b0ae5e9f331956f178f8c5e20aa0e3c4036251ddfd04312769ef7d71d83fde0afe64f6fa8e9052ca5a294c62927' + '582017bd0f98878c0ac6f4625854422662d83ae6274a34762082a720052023780dceb17694b1f4e18d9a0dcbb525990341176eac31040aa63099a8b3a8d52071') + + +prepare() { # Start with the vanilla version of json cd "$srcdir/json-${_jsonver}" # Modify it so that 'json' doesn't try to load (non-free!) 'json/ext' rm -rf -- json.gemspec ext lib/json/ext* - patch -p1 -i ../json-${_jsonver}-libre.patch + patch -p1 -i ../json-libre.patch # Now modify the ruby sources to include the json_pure lib instead # of the json ext cd "$srcdir/ruby-${pkgver}" # remove the json ext rm -rv ext/json test/json - patch -p1 -i ../ruby-${pkgver}-remove-json-ext.patch + patch -p1 -i ../remove-json-ext.patch # and insert the json_pure lib cp -r ../json-${_jsonver}/lib/* -t lib/ cp ../json-${_jsonver}/json_pure.gemspec -t lib/json/ cp -rT ../json-${_jsonver}/tests test/json - patch -p1 -i ../ruby-${pkgver}-add-json_pure.patch + patch -p1 -i ../add-json_pure.patch # Clean up the original json sources cd "$srcdir" rm -rf "json-${_jsonver}" -} -prepare() { cd ruby-${pkgver} # remove bundled gems, we are going to ship them as separate packages rm -rf gems/ @@ -112,16 +108,29 @@ package_ruby() { rubyver=${pkgver:0:3}.0 - # remove rubygems as it shipped in a separate package + # remove rubygems as it shipped as a separate package rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rubygems,rubygems.rb} rm "${pkgdir}"/usr/bin/gem + # remove bundler as it shipped as a separate package + rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{bundler,bundler.rb} + rm "${pkgdir}"/usr/bin/{bundle,bundler} + rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/bundler-*.gemspec + rm "${pkgdir}"/usr/share/man/man1/{bundle,bundle-*}.1 + # remove bundled rdoc gem - # we are doing it here instead of prepare() because rdoc used doring Ruby build process - rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/rdoc/ + rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rdoc,rdoc.rb} rm "${pkgdir}"/usr/bin/{rdoc,ri} - rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/* rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/rdoc-*.gemspec + + # remove irb as it is a separate package now + rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{irb,irb.rb} + rm "${pkgdir}"/usr/bin/irb + rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/irb-*.gemspec + rm "${pkgdir}"/usr/share/man/man1/irb.1 + + # remove all bundled gems to avoid conflicts with ruby-* Arch packages + rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/* } package_ruby-docs() { diff --git a/libre/ruby/add-json_pure.patch b/libre/ruby/add-json_pure.patch new file mode 100644 index 000000000..5630451ea --- /dev/null +++ b/libre/ruby/add-json_pure.patch @@ -0,0 +1,22 @@ +diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc +index ec6a6b7134..11a1079e57 100644 +--- a/doc/maintainers.rdoc ++++ b/doc/maintainers.rdoc +@@ -72,6 +72,8 @@ Zachary Scott (zzak) + Akinori MUSHA (knu) + [lib/irb.rb, lib/irb/*] + Keiju ISHITSUKA (keiju) ++[lib/json] ++ NARUSE, Yui (naruse) + [lib/logger.rb] + Naotoshi Seo (sonots) + [lib/mathn.rb] +diff --git a/lib/json/.document b/lib/json/.document +new file mode 100644 +index 0000000000..7ae6b614de +--- /dev/null ++++ b/lib/json/.document +@@ -0,0 +1,3 @@ ++*.rb ++add/*.rb ++pure/*.rb diff --git a/libre/ruby/json-2.1.0-libre.patch b/libre/ruby/json-2.1.0-libre.patch deleted file mode 100644 index 04eced89d..000000000 --- a/libre/ruby/json-2.1.0-libre.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/lib/json.rb 2017-04-18 04:16:28.000000000 -0500 -+++ b/lib/json.rb 2018-01-07 12:54:09.516275320 -0500 -@@ -55,9 +55,5 @@ - module JSON - require 'json/version' - -- begin -- require 'json/ext' -- rescue LoadError -- require 'json/pure' -- end -+ require 'json/pure' - end ---- a/tests/test_helper.rb 2017-04-18 04:16:28.000000000 -0500 -+++ b/tests/test_helper.rb 2018-01-07 12:55:21.359687486 -0500 -@@ -1,14 +1,5 @@ --case ENV['JSON'] --when 'pure' -- $:.unshift 'lib' -- require 'json/pure' --when 'ext' -- $:.unshift 'ext', 'lib' -- require 'json/ext' --else -- $:.unshift 'ext', 'lib' -- require 'json' --end -+$:.unshift 'lib' -+require 'json' - - require 'test/unit' - begin diff --git a/libre/ruby/json-libre.patch b/libre/ruby/json-libre.patch new file mode 100644 index 000000000..04eced89d --- /dev/null +++ b/libre/ruby/json-libre.patch @@ -0,0 +1,32 @@ +--- a/lib/json.rb 2017-04-18 04:16:28.000000000 -0500 ++++ b/lib/json.rb 2018-01-07 12:54:09.516275320 -0500 +@@ -55,9 +55,5 @@ + module JSON + require 'json/version' + +- begin +- require 'json/ext' +- rescue LoadError +- require 'json/pure' +- end ++ require 'json/pure' + end +--- a/tests/test_helper.rb 2017-04-18 04:16:28.000000000 -0500 ++++ b/tests/test_helper.rb 2018-01-07 12:55:21.359687486 -0500 +@@ -1,14 +1,5 @@ +-case ENV['JSON'] +-when 'pure' +- $:.unshift 'lib' +- require 'json/pure' +-when 'ext' +- $:.unshift 'ext', 'lib' +- require 'json/ext' +-else +- $:.unshift 'ext', 'lib' +- require 'json' +-end ++$:.unshift 'lib' ++require 'json' + + require 'test/unit' + begin diff --git a/libre/ruby/remove-json-ext.patch b/libre/ruby/remove-json-ext.patch new file mode 100644 index 000000000..ba168311a --- /dev/null +++ b/libre/ruby/remove-json-ext.patch @@ -0,0 +1,94 @@ +--- a/LEGAL ++++ b/LEGAL +@@ -657,31 +657,6 @@ ext/digest/sha2/sha2.h:: + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +-ext/json/generator/generator.c:: +- +- The file contains the following copyright notice. +- +- >>> +- Copyright 2001-2004 Unicode, Inc. +- +- Disclaimer:: +- +- This source code is provided as is by Unicode, Inc. No claims are +- made as to fitness for any particular purpose. No warranties of any +- kind are expressed or implied. The recipient agrees to determine +- applicability of information provided. If this file has been +- purchased on magnetic or optical media from Unicode, Inc., the +- sole remedy for any claim will be exchange of defective media +- within 90 days of receipt. +- +- Limitations on Rights to Redistribute This Code:: +- +- Unicode, Inc. hereby grants the right to freely use the information +- supplied in this file in the creation of products supporting the +- Unicode Standard, and to make copies of this file in any form +- for internal or external distribution as long as this notice +- remains attached. +- + ext/nkf/nkf-utf8/config.h:: + ext/nkf/nkf-utf8/nkf.c:: + ext/nkf/nkf-utf8/utf8tbl.c:: +--- a/common.mk ++++ b/common.mk +@@ -989,8 +989,7 @@ srcs-ext: $(EXT_SRCS) + realclean-srcs-ext:: + $(Q)$(RM) $(EXT_SRCS) + +-EXTRA_SRCS = $(srcdir)/ext/json/parser/parser.c \ +- $(srcdir)/ext/date/zonetab.h \ ++EXTRA_SRCS = $(srcdir)/ext/date/zonetab.h \ + $(empty) + + srcs-extra: $(EXTRA_SRCS) +@@ -1006,11 +1005,6 @@ + Q=$(Q) ECHO=$(ECHO) RM="$(RM)" top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \ + 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/date/zonetab.h: $(srcdir)/ext/date/zonetab.list + $(ECHO) generating $@ + $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(mflags) \ +--- a/doc/maintainers.rdoc 2017-12-22 18:08:05.000000000 -0500 ++++ b/doc/maintainers.rdoc 2018-01-07 09:57:59.999596681 -0500 +@@ -253,9 +253,6 @@ + [ext/io/console] + Nobuyuki Nakada (nobu) + https://github.com/ruby/io-console +-[ext/json] +- NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt) +- https://github.com/flori/json + [ext/openssl] + Kazuki Yamaguchi (rhe) + https://github.com/ruby/openssl +--- a/ext/.document 2017-09-03 08:31:34.000000000 -0500 ++++ b/ext/.document 2018-01-07 09:58:54.180475610 -0500 +@@ -27,9 +27,6 @@ + io/console/console.c + io/nonblock/nonblock.c + io/wait/wait.c +-json/generator/generator.c +-json/lib +-json/parser/parser.c + nkf/lib + nkf/nkf.c + objspace/objspace.c +--- a/ext/Setup 2017-04-20 03:21:24.000000000 -0500 ++++ b/ext/Setup 2018-01-07 10:06:52.168822642 -0500 +@@ -20,9 +20,6 @@ + #io/console + #io/nonblock + #io/wait +-#json +-#json/generator +-#json/parser + #nkf + #objspace + #openssl diff --git a/libre/ruby/ruby-2.5-add-json_pure.patch b/libre/ruby/ruby-2.5-add-json_pure.patch deleted file mode 100644 index 5630451ea..000000000 --- a/libre/ruby/ruby-2.5-add-json_pure.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc -index ec6a6b7134..11a1079e57 100644 ---- a/doc/maintainers.rdoc -+++ b/doc/maintainers.rdoc -@@ -72,6 +72,8 @@ Zachary Scott (zzak) - Akinori MUSHA (knu) - [lib/irb.rb, lib/irb/*] - Keiju ISHITSUKA (keiju) -+[lib/json] -+ NARUSE, Yui (naruse) - [lib/logger.rb] - Naotoshi Seo (sonots) - [lib/mathn.rb] -diff --git a/lib/json/.document b/lib/json/.document -new file mode 100644 -index 0000000000..7ae6b614de ---- /dev/null -+++ b/lib/json/.document -@@ -0,0 +1,3 @@ -+*.rb -+add/*.rb -+pure/*.rb diff --git a/libre/ruby/ruby-2.5-remove-json-ext.patch b/libre/ruby/ruby-2.5-remove-json-ext.patch deleted file mode 100644 index 507f8283a..000000000 --- a/libre/ruby/ruby-2.5-remove-json-ext.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/LEGAL 2017-12-22 18:08:05.000000000 -0500 -+++ b/LEGAL 2018-01-07 09:52:56.660004692 -0500 -@@ -625,28 +625,6 @@ - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - --ext/json/generator/generator.c: -- -- Copyright 2001-2004 Unicode, Inc. -- -- Disclaimer -- -- This source code is provided as is by Unicode, Inc. No claims are -- made as to fitness for any particular purpose. No warranties of any -- kind are expressed or implied. The recipient agrees to determine -- applicability of information provided. If this file has been -- purchased on magnetic or optical media from Unicode, Inc., the -- sole remedy for any claim will be exchange of defective media -- within 90 days of receipt. -- -- Limitations on Rights to Redistribute This Code -- -- Unicode, Inc. hereby grants the right to freely use the information -- supplied in this file in the creation of products supporting the -- Unicode Standard, and to make copies of this file in any form -- for internal or external distribution as long as this notice -- remains attached. -- - ext/nkf/nkf-utf8/config.h: - ext/nkf/nkf-utf8/nkf.c: - ext/nkf/nkf-utf8/utf8tbl.c: ---- a/common.mk 2017-12-22 18:08:05.000000000 -0500 -+++ b/common.mk 2018-01-07 09:56:46.206272867 -0500 -@@ -903,8 +903,7 @@ - - srcs-ext: $(EXT_SRCS) - --srcs-extra: $(srcdir)/ext/json/parser/parser.c \ -- $(srcdir)/ext/date/zonetab.h \ -+srcs-extra: $(srcdir)/ext/date/zonetab.h \ - $(empty) - - LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb -@@ -1006,11 +1005,6 @@ - Q=$(Q) ECHO=$(ECHO) RM="$(RM)" top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \ - 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/date/zonetab.h: $(srcdir)/ext/date/zonetab.list - $(ECHO) generating $@ - $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(mflags) \ ---- a/doc/maintainers.rdoc 2017-12-22 18:08:05.000000000 -0500 -+++ b/doc/maintainers.rdoc 2018-01-07 09:57:59.999596681 -0500 -@@ -253,9 +253,6 @@ - [ext/io/console] - Nobuyuki Nakada (nobu) - https://github.com/ruby/io-console --[ext/json] -- NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt) -- https://github.com/flori/json - [ext/openssl] - Kazuki Yamaguchi (rhe) - https://github.com/ruby/openssl ---- a/ext/.document 2017-09-03 08:31:34.000000000 -0500 -+++ b/ext/.document 2018-01-07 09:58:54.180475610 -0500 -@@ -27,9 +27,6 @@ - io/console/console.c - io/nonblock/nonblock.c - io/wait/wait.c --json/generator/generator.c --json/lib --json/parser/parser.c - nkf/lib - nkf/nkf.c - objspace/objspace.c ---- a/ext/Setup 2017-04-20 03:21:24.000000000 -0500 -+++ b/ext/Setup 2018-01-07 10:06:52.168822642 -0500 -@@ -20,9 +20,6 @@ - #io/console - #io/nonblock - #io/wait --#json --#json/generator --#json/parser - #nkf - #objspace - #openssl -- cgit v1.2.3