From owner-freebsd-ports@FreeBSD.ORG Thu Oct 24 16:56:39 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5350FF04; Thu, 24 Oct 2013 16:56:39 +0000 (UTC) (envelope-from makc@freebsd.org) Received: from mail.issp.ac.ru (mail.issp.ac.ru [77.236.34.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0E362B4E; Thu, 24 Oct 2013 16:56:38 +0000 (UTC) Received: from mercury.ph.man.ac.uk [130.88.75.175:40261] (HELO/EHLO mercury.ph.man.ac.uk, authenticated with LOGIN) by mail.issp.ac.ru with ESMTP/inet id r9OGu648087027 (using TLSv1/SSLv3, with cipher DHE-RSA-AES256-SHA (256 bits), verified NO) Thu, 24 Oct 2013 20:56:08 +0400 (MSK) From: Max Brazhnikov To: Mamoru Iwaki <1wkmmr@gmail.com>, iwaki@eng.niigata-u.ac.jp Subject: Re: [math/scilab] configuration failure by error in version check of hdf5 Date: Thu, 24 Oct 2013 16:56:10 +0000 Message-ID: <1758816.IXgHBXGsBd@mercury.ph.man.ac.uk> User-Agent: KMail/4.11 (FreeBSD/9.2-STABLE; KDE/4.11.0; amd64; ; ) In-Reply-To: <526907E1.6010207@gmail.com> References: <201310222319.r9MNJtYs078148@gw.catspoiler.org> <4269055.QsbE8oRuxU@mercury.ph.man.ac.uk> <526907E1.6010207@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="ISO-8859-1" Cc: Don Lewis , freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 16:56:39 -0000 On Thu, 24 Oct 2013 20:43:29 +0900 Mamoru Iwaki wrote: > (2013/10/23 22:10), Max Brazhnikov wrote: > > On Tue, 22 Oct 2013 16:19:55 -0700 Don Lewis wrote: > >> On 9 Oct, Mamoru Iwaki wrote: > >>> Hi, > >>> > >>> Re: math/scilab (Revision 327746) > >>> > >>> I have failed to configure this port in compilation stage these days. > >>> It is caused by an error in version check code for hdf5. Because the > >>> code writen in Java uses String.compareTo() for numeric comparision, > >>> "1.8.10" is not recognized as a newer one than "1.8.4". > >>> Could somebody correct this easy bug? > >> > >> Scilab 5.4.1 is out now, so the port should probably be updated. This > >> version of scilab removed the version check for hdf5. > >> > >> This is the patch that I'm using with the current port. Just drop it in > >> the files directory, run "make clean", and then rebuild. > >> > >> --- configure.orig 2013-10-09 00:04:19.000000000 -0700 > >> +++ configure 2013-10-09 10:41:39.000000000 -0700 > >> @@ -12226,14 +12226,15 @@ > >> > >> public class conftest { > >> public static void main(String[] argv) { > >> - String minVersion="1.8.4"; > >> + int minVersion=10804; > >> int[] vers = new int[3]; > >> try { H5.H5get_libversion(vers); } > >> catch (Throwable ex) {System.exit(-1);} > >> String ver = vers[0] + "."+ vers[1] +"."+vers[2]; > >> + int Version = 10000*vers[0] + 100*vers[1] + vers[2]; > >> > >> System.out.println(ver); > >> - if (minVersion.compareTo(ver) > 0) { > >> + if (minVersion > Version) { > >> System.exit(-1); > >> } > > > > I've committed this patch, thanks! > > > > Max > > > > Thanks, but the committed patch looks different from Don's original > patch. Unfortunately, the committed patch still causes version check > error in configuration stage, and the patch does not work as expected. > We can find two very similar conftest codes around there. The original > patch fixed the bug around line 12226 as above, howver the comitted one > did around line 12281. I think the conftest around line 12226 (or both > conftests around lines 12226 and ass81) should be corrected. The > attached patch could be a candidate to correct both conftests. Done, thanks! Any volunteer for maintaining the port? Max