From 770cbc65cf9e47a4579ad6c843ce94fb1601b75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 7 Aug 2025 13:12:21 +0700 Subject: [PATCH] build-style/gem: allow multiple version of gem --- common/build-style/gem.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/build-style/gem.sh b/common/build-style/gem.sh index 779e94eec35..0f4dd2296b0 100644 --- a/common/build-style/gem.sh +++ b/common/build-style/gem.sh @@ -3,11 +3,12 @@ # do_install() { : ${gem_cmd:=gem} + : ${gemname:=${pkgname#ruby-}} local _GEMDIR _INSTDIR _GEMDIR=$($gem_cmd env gemdir) - _INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${pkgname#ruby-}-${version} + _INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${gemname}-${version} $gem_cmd install \ --local \ @@ -16,7 +17,7 @@ do_install() { --ignore-dependencies \ --no-document \ --verbose \ - ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname#ruby-}-${version}.gem + ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${gemname}-${version}.gem # Remove cache rm -rf ${DESTDIR}/${_GEMDIR}/cache @@ -64,5 +65,5 @@ do_install() { # Ignore the ~> operator, replace it with >= sed 's|~>|>=|g' \ - -i ${DESTDIR}/${_GEMDIR}/specifications/${pkgname#ruby-}-${version}.gemspec + -i ${DESTDIR}/${_GEMDIR}/specifications/${gemname}-${version}.gemspec }