Date: Sat, 22 Jun 2013 05:21:14 GMT From: TAKATSU Tomonari <tota@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/179830: MK/bsd.ruby.mk: RUBY_PROVIDED does not returned correct result Message-ID: <201306220521.r5M5LEkM064943@oldred.freebsd.org> Resent-Message-ID: <201306220530.r5M5U00o007178@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179830 >Category: ports >Synopsis: MK/bsd.ruby.mk: RUBY_PROVIDED does not returned correct result >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jun 22 05:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: TAKATSU Tomonari >Release: FreeBSD 9.1-RELEASE-p3 i386 >Organization: none (personal) >Environment: FreeBSD z210 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:11:52 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: RUBY_VERSION has consisted of RUBY_RELVERSION and RUBY_PATCHLEVEL since r181277. The value of RUBY_VERSION_CODE which is defined as RUBY_VERSION:S/.//g is influenced by the number of digits of RUBY_PATCHLEVEL For examples: In r312871 RUBY_RELVERSION is 1.9.3, RUBY_PATCHLEVEL is 385 -> RUBY_VERSION_CODE is 193385 RUBY_RELVERSION is 2.0.0, RUBY_PATCHLEVEL is 0 -> RUBY_VERSION_CODE is 2000 Consequently, RUBY_PROVIDED does not returned correct result if RUBY_REQUIRE is defined as Ruby >= 193 in RUBY_DEFAULT_VER=2.0 environment. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: bsd.ruby.mk =================================================================== --- bsd.ruby.mk (revision 321544) +++ bsd.ruby.mk (working copy) @@ -69,10 +69,15 @@ # # RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports # (default: ruby${RUBY_SUFFIX}-) -# RUBY_VERSION - Full version of ruby without preview/beta suffix in +# RUBY_RELVERSION - Full version of ruby without preview/beta suffix in # the form of `x.y.z' (see below for current value). -# RUBY_VERSION_CODE - Full integer version of ruby without preview/beta -# suffix in the form of `xyz'. +# RUBY_RELVERSION_CODE - Integer version of RUBY_RELVERSION in the form of +# `xyz'. +# RUBY_VERSION - Composite version of RUBY_RELVERSION and +# RUBY_PATCHLEVEL in the form of `x.y.z.p'. +# (default: ${RUBY_RELVERSION}.${RUBY_PATCHLEVEL}) +# RUBY_VERSION_CODE - Composite integer version of RUBY_VERSION in the form +# of `xyzp'. # RUBY_PORTVERSION - PORTVERSION for the standard ruby ports (ruby, # ruby-gdbm, etc.). # RUBY_PORTREVISION - PORTREVISION for the standard ruby ports. @@ -275,6 +280,7 @@ RUBY_WRKSRC?= ${WRKDIR}/${RUBY_DISTNAME} +RUBY_RELVERSION_CODE?= ${RUBY_RELVERSION:S/.//g} RUBY_VERSION_CODE?= ${RUBY_VERSION:S/.//g} RUBY_VER= ${RUBY_VERSION:C/([[:digit:]]+\.[[:digit:]]+).*/\1/} RUBY_SUFFIX= ${RUBY_VER:S/.//} @@ -362,7 +368,7 @@ .if exists(${RUBY}) RUBY_PROVIDED!= ${RUBY} -e '\ - Ruby = ${RUBY_VERSION_CODE}; \ + Ruby = ${RUBY_RELVERSION_CODE}; \ value = begin; ${RUBY_REQUIRE}; end and puts value' .else RUBY_PROVIDED= "should be" # the latest version is going to be installed >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306220521.r5M5LEkM064943>