Guest User

Untitled

a guest
Apr 28th, 2011
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PKGBUILD:
  2.  
  3. # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
  4. # Maintainer: (epsilom) Xavier Corredor <xavier.corredor.llano (a) gmail.com>
  5.  
  6. pkgname=vis5d+
  7. pkgver=1.2.1
  8. pkgrel=4
  9. pkgdesc="A system for interactive visualization of large 5-D gridded data sets"
  10. url="http://vis5d.sourceforge.net/"
  11. license=("GPL")
  12. arch=('i686' 'x86_64')
  13. depends=('netcdf' 'xorg-server' 'mesa')
  14. source=("http://downloads.sourceforge.net/vis5d/$pkgname-$pkgver.tar.bz2" "patch
  15. ")
  16. md5sums=('15a8b09ba8ae57b753e724d0825e40c1'
  17. 'f35aa4d904b83617a6020bbbd74eb254')
  18.  
  19. build() {
  20. cd $startdir/src/$pkgname-$pkgver
  21. patch -Np1 -i ../../patch
  22. FC=gfortran F77=gfortran CFLAGS="$CFLAGS -fno-range-check" \
  23. FFLAGS="$FFLAGS -fno-range-check" \
  24. ./configure --prefix=/usr --with-netcdf=/usr/lib/ --with-x #--with-mixkit=/usr
  25. /lib
  26. make || return 1
  27. make DESTDIR=$startdir/pkg install
  28. }
  29. EOF
  30.  
  31. patch:
  32. diff -Naur vis5d+-1.2.1//src/misc.c vis5d+-1.2.1_new//src/misc.c
  33. --- vis5d+-1.2.1//src/misc.c 2001-11-07 06:53:12.000000000 -0500
  34. +++ vis5d+-1.2.1_new//src/misc.c 2010-10-16 23:26:10.000000000 -0500
  35. @@ -144,10 +144,10 @@
  36.  
  37.  
  38.  
  39. -/*** round ************************************************************
  40. +/*** roundv5d ************************************************************
  41. Round off x to a 'nice' value.
  42. **********************************************************************/
  43. -float round( float x )
  44. +float roundv5d( float x )
  45. {
  46. float base, fudge;
  47. int temp;
  48. @@ -273,7 +273,7 @@
  49. ctx->Variable[var]->HSliceRequest->Interval = 0.0;
  50. }
  51. else {
  52. - ctx->Variable[var]->HSliceRequest->Interval = round( (ctx->Variable[var]-
  53. >MaxVal - ctx->Variable[var]->MinVal)
  54. + ctx->Variable[var]->HSliceRequest->Interval = roundv5d( (ctx->Variable[va
  55. r]->MaxVal - ctx->Variable[var]->MinVal)
  56. / 10.0 );
  57. }
  58.  
  59. @@ -309,7 +309,7 @@
  60. ctx->Variable[var]->VSliceRequest->Interval = 0.0;
  61. }
  62. else {
  63. - ctx->Variable[var]->VSliceRequest->Interval = round( (ctx->Variable[var]-
  64. >MaxVal - ctx->Variable[var]->MinVal)
  65. + ctx->Variable[var]->VSliceRequest->Interval = roundv5d( (ctx->Variable[va
  66. r]->MaxVal - ctx->Variable[var]->MinVal)
  67. / 10.0 );
  68. }
  69.  
  70. diff -Naur vis5d+-1.2.1//src/misc.h vis5d+-1.2.1_new//src/misc.h
  71. --- vis5d+-1.2.1//src/misc.h 2001-11-07 06:53:12.000000000 -0500
  72. +++ vis5d+-1.2.1_new//src/misc.h 2010-10-16 23:26:28.000000000 -0500
  73. @@ -37,7 +37,7 @@
  74.  
  75. extern void die( char *msg );
  76.  
  77. -extern float round( float x );
  78. +extern float roundv5d( float x );
  79.  
  80. extern int which( char *file, char *fullpath );
  81.  
  82. diff -Naur vis5d+-1.2.1//src/work.c vis5d+-1.2.1_new//src/work.c
  83. --- vis5d+-1.2.1//src/work.c 2001-11-07 06:53:30.000000000 -0500
  84. +++ vis5d+-1.2.1_new//src/work.c 2010-10-16 23:27:16.000000000 -0500
  85. @@ -6791,7 +6791,7 @@
  86. request->HighLimit = floor(request->HighLimit*factor)/(float)
  87. factor;
  88. }
  89. }
  90. - request->Interval = round((request->HighLimit - request->LowLimit)/5.0)
  91. ;
  92. + request->Interval = roundv5d((request->HighLimit - request->LowLimit)/5
  93. .0);
  94.  
  95. }
  96. }
  97. --- vis5d+-1.2.1/util/kludge.f 2001-10-24 12:46:49.000000000 +0200
  98. +++ vis5d+-1.2.1.new/util/kludge.f 2011-04-28 14:41:00.883619139 +0200
  99. @@ -51,9 +51,13 @@
  100. SUBROUTINE GETDAY(I)
  101. IMPLICIT INTEGER (A-Z)
  102. INTEGER MTBL(12)
  103. + INTEGER TARRAY(3)
  104. DATA MTBL/0,31,59,90,120,151,181,212,243,273,304,334/
  105. C
  106. - CALL IDATE(MON,IDAY,IYEAR)
  107. + CALL IDATE(TARRAY)
  108. + IDAY = TARRAY(1)
  109. + MON = TARRAY(2)
  110. + IYEAR = TARRAY(3)
  111. IF (IDAY.LT.1.OR.IDAY.GT.31) RETURN
  112. IF (MON.LT.1.OR.MON.GT.12) RETURN
  113. IDDD=IDAY+MTBL(MON)
  114. EOF
RAW Paste Data