From owner-freebsd-ports@FreeBSD.ORG Tue Oct 22 23:20:21 2013 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED55522C for ; Tue, 22 Oct 2013 23:20:21 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF0152FE5 for ; Tue, 22 Oct 2013 23:20:21 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id r9MNJtYs078148; Tue, 22 Oct 2013 16:19:59 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201310222319.r9MNJtYs078148@gw.catspoiler.org> Date: Tue, 22 Oct 2013 16:19:55 -0700 (PDT) From: Don Lewis Subject: Re: [math/scilab] configuration failure by error in version check of hdf5 To: 1wkmmr@gmail.com In-Reply-To: <5255451C.4050108@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: ports@FreeBSD.org, iwaki@eng.niigata-u.ac.jp 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: Tue, 22 Oct 2013 23:20:22 -0000 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); }