From 04302c96f3a7cc7072f4a721da44c2966369dc3b Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 26 Dec 2021 15:00:14 +0100 Subject: [PATCH] ruby: update to 3.1.1. --- common/shlibs | 2 +- srcpkgs/ruby/template | 34 ++++++++++++---------------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/common/shlibs b/common/shlibs index d60e60a875..f26b9bab58 100644 --- a/common/shlibs +++ b/common/shlibs @@ -440,7 +440,7 @@ libKScreenLocker.so.5 kscreenlocker-5.8.4_1 libparted.so.2 libparted-3.1_1 libparted-fs-resize.so.0 libparted-3.1_1 libntfs-3g.so.89 ntfs-3g-2021.8.22_1 -libruby.so.3.0 ruby-3.0.2_1 +libruby.so.3.1 ruby-3.1.0_1 librw.so.0 rankwidth-0.9_1 libprocessui.so.9 libksysguard-5.18.90_1 libksignalplotter.so.9 libksysguard-5.18.90_1 diff --git a/srcpkgs/ruby/template b/srcpkgs/ruby/template index f9fb36a74d..85524a7796 100644 --- a/srcpkgs/ruby/template +++ b/srcpkgs/ruby/template @@ -1,12 +1,12 @@ # Template file for 'ruby' -_ruby_abiver=3.0.0 +_ruby_abiver=3.1.0 pkgname=ruby -version=3.0.3 +version=3.1.1 revision=1 build_style=gnu-configure configure_args="--enable-shared --disable-rpath - DOXYGEN=/usr/bin/doxygen DOT=/usr/bin/dot PKG_CONFIG=/usr/bin/pkg-config" + PKG_CONFIG=/usr/bin/pkg-config" make_build_args="all capi" hostmakedepends="pkg-config bison groff" makedepends="zlib-devel readline-devel libffi-devel openssl-devel @@ -16,7 +16,7 @@ homepage="http://www.ruby-lang.org/en/" maintainer="Leah Neukirchen " license="Ruby, BSD-2-Clause" distfiles="https://cache.ruby-lang.org/pub/ruby/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=88cc7f0f021f15c4cd62b1f922e3a401697f7943551fe45b1fdf4f2417a17a9c +checksum=7aefaa6b78b076515d272ec59c4616707a54fc9f2391239737d5f10af7a16caa case "$XBPS_TARGET_MACHINE" in *-musl) # Broken on the builders but successfully built locally @@ -48,6 +48,12 @@ if [ "$CROSS_BUILD" ]; then fi post_patch() { + # https://bugs.ruby-lang.org/issues/18373#note-8 + find .bundle -name extconf.rb -exec \ + sed -i \ + -e '/create_makefile/i \$arch_hdrdir = "$(hdrdir)/../.ext/include/$(arch)"' \ + -e '/create_makefile/i \$DLDFLAGS << " -L#{$top_srcdir}"' {} \; + [ "$XBPS_TARGET_LIBC" = "glibc" ] && return 0 echo "Patching out using binary gems for non-glibc..." @@ -55,29 +61,16 @@ post_patch() { } pre_configure() { - # this allows the test suite to pass without crashing - export CFLAGS+=" -fno-omit-frame-pointer -fno-strict-aliasing" - export CPPFLAGS+=" -fno-omit-frame-pointer -fno-strict-aliasing" - case "$XBPS_TARGET_MACHINE" in ppc64le*) ;; ppc*) # Random segfaults otherwise export CFLAGS+=" -Os" - export CPPFLAGS+=" -Os" ;; esac - - # force this to pass on systems with these as macros (musl) - export ac_cv_func_isnan=yes - export ac_cv_func_isinf=yes } pre_build() { - # Force getaddrinfo detection. - sed -e 's,\(checking_for("wide getaddrinfo") {try_\)run,\1link,' -i ext/socket/extconf.rb - # Hack for cross-builds. - touch ext/ripper/check # Set -fno-stack-protector for i686* or otherwise linking fails with # ...: undefined reference to '__stack_chk_fail_local' case "$XBPS_TARGET_MACHINE" in @@ -91,13 +84,10 @@ pre_build() { post_install() { # Remove references to the cross compiler if [ "$CROSS_BUILD" ]; then - sed -e "s,${XBPS_CROSS_TRIPLET}-,,g" -i ${DESTDIR}/usr/lib/ruby/${_ruby_abiver}/*/rbconfig.rb + vsed -e "s,${XBPS_CROSS_TRIPLET}-,,g" -i ${DESTDIR}/usr/lib/ruby/${_ruby_abiver}/*/rbconfig.rb fi # Replace reference to the install(1) wrapper - sed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \ - ${DESTDIR}/usr/lib/ruby/${_ruby_abiver}/*/rbconfig.rb - # Remove references to hardening -specs. - sed -e "s|\(-specs=.*hardened-ld\)||g" -e "s|\(-specs=.*hardened-cc1\)||g" -i \ + vsed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \ ${DESTDIR}/usr/lib/ruby/${_ruby_abiver}/*/rbconfig.rb vlicense COPYING }