From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 22 05:30:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7EED0934 for ; Sat, 22 Jun 2013 05:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 673F51CE0 for ; Sat, 22 Jun 2013 05:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M5U093007179 for ; Sat, 22 Jun 2013 05:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5M5U00o007178; Sat, 22 Jun 2013 05:30:00 GMT (envelope-from gnats) Resent-Date: Sat, 22 Jun 2013 05:30:00 GMT Resent-Message-Id: <201306220530.r5M5U00o007178@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, TAKATSU Tomonari Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9AE3B52A for ; Sat, 22 Jun 2013 05:21:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7503B1CAC for ; Sat, 22 Jun 2013 05:21:14 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5M5LE3p064946 for ; Sat, 22 Jun 2013 05:21:14 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5M5LEkM064943; Sat, 22 Jun 2013 05:21:14 GMT (envelope-from nobody) Message-Id: <201306220521.r5M5LEkM064943@oldred.freebsd.org> Date: Sat, 22 Jun 2013 05:21:14 GMT From: TAKATSU Tomonari To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/179830: MK/bsd.ruby.mk: RUBY_PROVIDED does not returned correct result X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 05:30:00 -0000 >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: