summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2021-04-20 12:57:10 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2021-04-27 17:38:58 -0400
commit871fcc66a9f8c7d84a88d55ea074d5c2f4fa5b83 (patch)
treebb76b9ae856141db387c2b488f5d9361f3af0348
parent0273c7bdb6f8e3ddfaa8221ef0a99f6110e5bea8 (diff)
[ruby]: upgrade to v3.0.1
-rw-r--r--libre/ruby/PKGBUILD90
-rw-r--r--libre/ruby/add-json_pure.patch23
-rw-r--r--libre/ruby/json-libre.patch20
-rw-r--r--libre/ruby/ruby-add-json_pure.patch28
-rw-r--r--libre/ruby/ruby-remove-json-ext.patch (renamed from libre/ruby/remove-json-ext.patch)57
5 files changed, 117 insertions, 101 deletions
diff --git a/libre/ruby/PKGBUILD b/libre/ruby/PKGBUILD
index a296f17fe..65d0aa375 100644
--- a/libre/ruby/PKGBUILD
+++ b/libre/ruby/PKGBUILD
@@ -1,47 +1,46 @@
-# Contributor (Arch): Thomas Dziedzic <gostrc@gmail.com>
-# Contributor (Arch): Allan McRae <allan@archlinux.org>
-# Contributor (Arch): John Proctor <jproctor@prium.net>
-# Contributor (Arch): Jeramy Rutley <jrutley@gmail.com>
-
+# Contributor (arch): Thomas Dziedzic <gostrc@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: John Proctor <jproctor@prium.net>
+# Contributor: Jeramy Rutley <jrutley@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Daniel Milewski <niitotantei@riseup.net>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Luke Shumaker <lukeshu@parabola.nu>
# Contributor: fauno <fauno@parabola.nu>
-# Rationale for inclusion in [libre]: Problematic license of
-# generator.c in bundled json extension.
-#
-# https://labs.parabola.nu/issues/674
-# https://bugs.ruby-lang.org/issues/11844
-# https://github.com/flori/json/issues/277
+# parabola changes and rationale:
+# - Problematic license of generator.c in bundled json extension.
+# https://labs.parabola.nu/issues/674
+# https://bugs.ruby-lang.org/issues/11844
+# https://github.com/flori/json/issues/277
pkgname=(ruby ruby-docs)
-pkgver=2.7.1
-_jsonver=2.3.0
+pkgver=3.0.1
+_json_ver=2.5.1
pkgrel=1
pkgrel+=.parabola1
-_srcrel=1 # increment this to rebuild the sourceball without bumping pkgver
arch=(x86_64)
arch+=(i686 armv7h)
url='https://www.ruby-lang.org/en/'
-license=(BSD2 custom)
+license=(BSD custom)
+license=(${license[*]/BSD/BSD2})
+depends=(libxcrypt)
makedepends=(gdbm openssl libffi doxygen graphviz libyaml ttf-dejavu tk)
options=(!emptydirs)
-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=('79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31'
- '0cda44a77212748d9513e61314dfbc7c0cf82beebcc56eb8b043e4ada698bc475502100389b80fa5c9090341fd1c6d2841fc5c9332e520f1c8dd1084ca505379'
- 'cce1402a062ab5a065e7554ae23189cb9c8de0acc27a4c96db5a90a52cfce37fde8d128e95b997e6df05d327d2279a8368276820dfad8b744747ea619ad187ab'
- '9ff8a2ec9fdecd05fd506ed6f977dcd483e47611dc6bbe6c4622100a2071c0f6c7b3f813a94b73bebb9f0ed7fe9f6257289cdf971030ad525a3c8a0d065b09c2'
- '582017bd0f98878c0ac6f4625854422662d83ae6274a34762082a720052023780dceb17694b1f4e18d9a0dcbb525990341176eac31040aa63099a8b3a8d52071')
+source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz)
+source+=(json-${_json_ver}.tar.gz::https://github.com/flori/json/archive/v${_json_ver}.tar.gz
+ json-libre.patch
+ ruby-remove-json-ext.patch
+ ruby-add-json_pure.patch)
+sha512sums=('97d2e883656060846b304368d9d836e2f3ef39859c36171c9398a0573818e4ed75bfd7460f901a9553f7f53518c505327a66e74f83704a881469f5ac61fe13d7')
+sha512sums+=('4df7ec9b86692376e89c2019c2c1ab3ae9af28fb4742864acc6f985c0551fc10795742cc1124d6435e820617c00d4c5f4aa6c83b21d2fff43ed05cd9d0a89087'
+ '21c387c2d04545a95560142fefffdc504fe5e683ac102df7acb933d8fb2e221ca83ccb69bec1deaf1c6fee1eac391fefdfa6825180d36171190f1a56ef358eae'
+ 'bf31b3187436db4c66724d2460cca381e2740bfecda3ce8273882de737f08f9df0b10d74c04e9c47c0b3e0875787c79078ef7a71b645772c9ab478a9e059142a'
+ '3acc5b3af3972d906627440a8accbe29ae1459546e9d08172ff2f4acb9c6474da24d1d5d45529b528b0b1ea0b4f97d8afd5964f68346e2f0ed1d8f476b23ac45')
prepare() {
- cd "$srcdir/json-${_jsonver}"
+ cd "$srcdir/json-${_json_ver}"
# Modify 'json' so that it doesn't try to load (non-free!) 'json/ext'
msg "applying json-libre.patch"
@@ -50,24 +49,21 @@ prepare() {
# Now remove the json ext from the ruby sources
cd "$srcdir/ruby-${pkgver}"
- msg "applying remove-json-ext.patch"
+ msg "applying ruby-remove-json-ext.patch"
rm -r ext/json test/json
- patch -p1 -i ../remove-json-ext.patch
+ patch -p1 -i ../ruby-remove-json-ext.patch
- # and insert the json_pure lib instead
- msg "applying add-json_pure.patch"
- 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 ../add-json_pure.patch
+ # Insert the json_pure lib instead
+ msg "applying ruby-add-json_pure.patch"
+ cp -r ../json-${_json_ver}/lib/* -t lib/
+ cp ../json-${_json_ver}/json_pure.gemspec -t lib/json/
+ cp -rT ../json-${_json_ver}/tests test/json
+ sed -i "s|s\.version =.*|s.version = '${_json_ver}'|" lib/json/json_pure.gemspec
+ patch -p1 -i ../ruby-add-json_pure.patch
- # Clean up the original json sources
+ # Delete original json sources
cd "$srcdir"
- rm -rf "json-${_jsonver}"
-
- cd ruby-${pkgver}
- # remove bundled gems, we are going to ship them as separate packages
- rm -rf gems/
+ rm -rf "json-${_json_ver}"
}
build() {
@@ -117,12 +113,12 @@ package_ruby() {
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
rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rdoc,rdoc.rb}
rm "${pkgdir}"/usr/bin/{rdoc,ri}
rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/rdoc-*.gemspec
+ rm "${pkgdir}"/usr/share/man/man1/ri.1
# remove irb as it is a separate package now
rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{irb,irb.rb}
@@ -130,8 +126,14 @@ package_ruby() {
rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/irb-*.gemspec
rm "${pkgdir}"/usr/share/man/man1/irb.1
+ # remove other binaries that are shipped as separate packages
+ rm "${pkgdir}"/usr/bin/{rake,rbs,typeprof,erb,racc}
+ rm "${pkgdir}"/usr/share/man/man1/erb.1
+
# remove all bundled gems to avoid conflicts with ruby-* Arch packages
rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/*
+ rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/*.gemspec
+ rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/cache/*.gem
}
package_ruby-docs() {
@@ -143,8 +145,4 @@ package_ruby-docs() {
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/LICENSE"
install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby-docs/BSDL"
-
- # sometimes it installs ruby/capi/doxygen_objdb_XXXXXXX.tmp;
- # otherwise /usr/share/doc is empty
- rm -rf "$pkgdir/usr/share/doc"
}
diff --git a/libre/ruby/add-json_pure.patch b/libre/ruby/add-json_pure.patch
deleted file mode 100644
index 5529cc58c..000000000
--- a/libre/ruby/add-json_pure.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
-index 268293a..8063bbf 100644
---- a/doc/maintainers.rdoc
-+++ b/doc/maintainers.rdoc
-@@ -310,6 +310,9 @@ Zachary Scott (zzak)
- Nobuyuki Nakada (nobu)
- https://github.com/ruby/io-console
- https://rubygems.org/gems/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
-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-libre.patch b/libre/ruby/json-libre.patch
index 04eced89d..36d99caff 100644
--- a/libre/ruby/json-libre.patch
+++ b/libre/ruby/json-libre.patch
@@ -1,6 +1,8 @@
---- 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 @@
+diff --git a/lib/json.rb b/lib/json.rb
+index aeb9774..3bd94ec 100644
+--- a/lib/json.rb
++++ b/lib/json.rb
+@@ -575,9 +575,5 @@ require 'json/common'
module JSON
require 'json/version'
@@ -11,18 +13,20 @@
- 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
+diff --git a/tests/test_helper.rb b/tests/test_helper.rb
+index 446c020..4c15af6 100644
+--- a/tests/test_helper.rb
++++ b/tests/test_helper.rb
@@ -1,14 +1,5 @@
-case ENV['JSON']
-when 'pure'
-- $:.unshift 'lib'
+- $:.unshift File.join(__dir__, '../lib')
- require 'json/pure'
-when 'ext'
-- $:.unshift 'ext', 'lib'
+- $:.unshift File.join(__dir__, '../ext'), File.join(__dir__, '../lib')
- require 'json/ext'
-else
-- $:.unshift 'ext', 'lib'
+- $:.unshift File.join(__dir__, '../ext'), File.join(__dir__, '../lib')
- require 'json'
-end
+$:.unshift 'lib'
diff --git a/libre/ruby/ruby-add-json_pure.patch b/libre/ruby/ruby-add-json_pure.patch
new file mode 100644
index 000000000..b1004aa8c
--- /dev/null
+++ b/libre/ruby/ruby-add-json_pure.patch
@@ -0,0 +1,28 @@
+diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
+index 93bad87..17ff882 100644
+--- a/doc/maintainers.rdoc
++++ b/doc/maintainers.rdoc
+@@ -352,6 +352,9 @@ Yukihiro Matsumoto (matz)
+ NARUSE, Yui (naruse)
+ https://github.com/ruby/nkf
+ https://rubygems.org/gems/nkf
++[ext/json]
++ NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt)
++ https://github.com/flori/json
+ [ext/openssl]
+ Kazuki Yamaguchi (rhe)
+ https://github.com/ruby/openssl
+diff --git a/ext/.document b/ext/.document
+index 5e5bce3..7b370b1 100644
+--- a/ext/.document
++++ b/ext/.document
+@@ -1,5 +1,9 @@
+ # Add files to this as they become documented
+
+++*.rb
+++add/*.rb
+++pure/*.rb
++
+ bigdecimal/bigdecimal.c
+ bigdecimal/lib
+ cgi/escape/escape.c
diff --git a/libre/ruby/remove-json-ext.patch b/libre/ruby/ruby-remove-json-ext.patch
index f7111f6fd..55fe438a8 100644
--- a/libre/ruby/remove-json-ext.patch
+++ b/libre/ruby/ruby-remove-json-ext.patch
@@ -1,17 +1,26 @@
diff --git a/LEGAL b/LEGAL
-index 565c4c9..0a7cc0f 100644
+index 2a7964e..1aef2a7 100644
--- a/LEGAL
+++ b/LEGAL
-@@ -657,31 +657,6 @@ ext/digest/sha2/sha2.h::
+@@ -451,7 +451,7 @@ mentioned below.
+
+ >>>
+ A C-program for MT19937, with initialization improved 2002/2/10.::
+- Coded by Takuji Nishimura and Makoto Matsumoto.
++ Coded by Takuji Nishimura and Makoto Matsumoto.
+ This is a faster version by taking Shawn Cokus's optimization,
+ Matthe Bellew's simplification, Isaku Wada's real version.
+
+@@ -688,31 +688,6 @@ mentioned below.
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
--ext/json/generator/generator.c::
+-[ext/json/generator/generator.c]
-
- The file contains the following copyright notice.
-
- >>>
-- Copyright 2001-2004 Unicode, Inc.
+- Copyright 2001-2004:: Unicode, Inc.
-
- Disclaimer::
-
@@ -31,14 +40,14 @@ index 565c4c9..0a7cc0f 100644
- 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::
+ [ext/nkf/nkf-utf8/config.h]
+ [ext/nkf/nkf-utf8/nkf.c]
+ [ext/nkf/nkf-utf8/utf8tbl.c]
diff --git a/common.mk b/common.mk
-index 3706aeb..9bf5627 100644
+index 594c165..b909160 100644
--- a/common.mk
+++ b/common.mk
-@@ -1026,8 +1026,7 @@ srcs-ext: $(EXT_SRCS)
+@@ -1051,8 +1051,7 @@ srcs-ext: $(EXT_SRCS)
realclean-srcs-ext::
$(Q)$(RM) $(EXT_SRCS)
@@ -48,9 +57,9 @@ index 3706aeb..9bf5627 100644
$(empty)
srcs-extra: $(EXTRA_SRCS)
-@@ -1140,11 +1139,6 @@ $(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/p
+@@ -1166,11 +1165,6 @@ $(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/p
Q=$(Q) ECHO=$(ECHO) RM="$(RM)" BISON=$(YACC) top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \
- RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
+ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)" LANG=C
-$(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl $(srcdir)/ext/json/parser/prereq.mk
- $(ECHO) generating $@
@@ -61,36 +70,36 @@ index 3706aeb..9bf5627 100644
$(ECHO) generating $@
$(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(mflags) \
diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
-index 98de9f2..268293a 100644
+index 64510b2..93bad87 100644
--- a/doc/maintainers.rdoc
+++ b/doc/maintainers.rdoc
-@@ -310,10 +310,6 @@ Zachary Scott (zzak)
+@@ -348,10 +348,6 @@ Yukihiro Matsumoto (matz)
Nobuyuki Nakada (nobu)
- https://github.com/ruby/io-console
- https://rubygems.org/gems/io-console
+ https://github.com/ruby/io-wait
+ https://rubygems.org/gems/io-wait
-[ext/json]
- NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt)
- https://github.com/flori/json
- https://rubygems.org/gems/json
- [ext/openssl]
- Kazuki Yamaguchi (rhe)
- https://github.com/ruby/openssl
+ [ext/nkf]
+ NARUSE, Yui (naruse)
+ https://github.com/ruby/nkf
diff --git a/ext/.document b/ext/.document
-index 6a49157..97e5120 100644
+index aeb40c6..5e5bce3 100644
--- a/ext/.document
+++ b/ext/.document
-@@ -27,9 +27,6 @@ gdbm/gdbm.c
- io/console/console.c
+@@ -36,9 +36,6 @@ io/console/console.c
+ io/console/lib
io/nonblock/nonblock.c
io/wait/wait.c
-json/generator/generator.c
-json/lib
-json/parser/parser.c
+ monitor/lib
+ monitor/monitor.c
nkf/lib
- nkf/nkf.c
- objspace/objspace.c
diff --git a/ext/Setup b/ext/Setup
-index ac79c86..e1b8d40 100644
+index 0376e2f..400642a 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -20,9 +20,6 @@