Date: Wed, 23 Oct 2013 13:39:14 +0900 From: Mamoru Iwaki <1wkmmr@gmail.com> To: Don Lewis <truckman@FreeBSD.org> Cc: ports@FreeBSD.org Subject: Re: [math/scilab] configuration failure by error in version check of hdf5 Message-ID: <526752F2.1010100@gmail.com> In-Reply-To: <201310222319.r9MNJtYs078148@gw.catspoiler.org> References: <201310222319.r9MNJtYs078148@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thank you for your investigation. The patch you proposed solved the problem, at least for me. Now, the patch should be included until newer version appears in the port, I think. Cheers (2013/10/23 8:19), 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); > } > > -- ----- Mamoru Iwaki Japan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?526752F2.1010100>