Package Details

Package: nrecipes-2.0+4
Product: nrecipes
SVN Revision: 24817
Effective SVN Revision (incl depedencies): 24817
Effective latest update: 18/07/2014-18:56
Lifecycle: operational
Lifecycle (spec): operational
State: OK
Validation State: OK
Inherited State: OK
Build State: OK
Test State: OK

Dependency Graph

Remark: The dependency graph depicts for packages dependant on nrecipes-2.0+4 only the latest version per product. Furthermore, test dependencies are not visible.

For a list with all direct and indirect dependencies and dependants (main and test) see all dependencies.

Messages:

OK Package validated, build and test status ok.

All Reports

build desbuild 27/12/2014-15:59 OK
build des-macpro9 30/03/2015-21:12 OK

Table File

1 envPrepend(PATH, ${PRODUCT_DIR}/bin)

Build File

1 #!/usr/bin/env bash
2 #
3 # ---------------------------------------------------------------------
4 # This is how we generated the patch for Darwin that works with clang 5+, Xcode 5+
5 # The previous patch 2.0+3 did not work with newer cc compilers
6 #
7 # Notes on how to compile nrecipes with cc=clang on Darwin
8 # F. Menanteau Jul, 2014
9 #
10 #
11 # -- Context --
12 #
13 # We have a tar file for nrecipes of unknown origin that it is used by
14 # imsupport, which compile okay with gcc in Linux, however,
15 # with cc=cland there is a conflict for the fmin() defined in usr/include/math.h:
16 #
17 # broydn.c:24:8: error: conflicting types for 'fmin'
18 # float fmin();
19 # ^
20 # /usr/include/math.h:543:15: note: previous declaration is here
21 # extern double fmin(double, double);
22 # ----
23 #
24 # Solution
25 # 0) With your favorite editor, replace fmin() for fmin_nr() in:
26 # include/nr.h:float fmin();
27 # misc/nr.h:float fmin(float x[]);
28 # misc/nr.h:float fmin();
29 # recipes/broydn.c: float fmin();
30 # recipes/broydn.c: f=fmin(x);
31 # recipes/fmin.c:float fmin(x)
32 # recipes/newt.c: float fmin();
33 # recipes/newt.c: f=fmin(x);
34 # recipes/nr.h:float fmin();
35 #
36 # 1) Untar the dirs
37 # %> tar xfz nrecipes-2.0.tar.gz
38 # %> tar xfz nrecipes-2.0-Darwin-patched.tar.gz
39 #
40 # 2) create the diff/patch file
41 # %> diff -ruN nrecipes-2.0 nrecipes-2.0-Darwin-patched > nrecipesDarwin.patch
42 #
43 # 3) apply the patch
44 # %> patch -s -p0 < nrecipesDarwin.patch
45 #
46 # 4) confirm that the patch worked -- both directories should be identical
47 # %> diff -ruN nrecipes-2.0 nrecipes-2.0-Darwin-patched
48 # --------------------------------------------------------------------
49
50 curl -O $EXTERNAL/$PRODUCT/$PRODUCT-$VERSION.tar.gz
51 tar xzf $PRODUCT-$VERSION.tar.gz
52 mkdir -p $PRODUCT_DIR/lib
53 mkdir -p $PRODUCT_DIR/bin
54
55
56
57
58 # Darwin
59 if [[ $FLAVOR =~ Darwin ]] ; then
60
61 # Get the Darwin directory-wide patch
62 curl -O $EXTERNAL/$PRODUCT/nrecipesDarwin.patch
63 patch -s -p0 < nrecipesDarwin.patch
64
65 mv $PRODUCT-$VERSION 2ndEd_c-kr
66 cd 2ndEd_c-kr
67
68 make clean
69 make FC=gfortran CCKR=cc LIBDIR=$PRODUCT_DIR/lib CBIN=$PRODUCT_DIR/bin
70
71 # Linux
72 elif [[ $FLAVOR =~ Linux ]] ; then
73
74
75 mv $PRODUCT-$VERSION 2ndEd_c-kr
76 cd 2ndEd_c-kr
77
78 # Get the gcc patch
79 curl -O $EXTERNAL/$PRODUCT/gcc.patch
80 patch Makefile < gcc.patch
81
82 make clean
83 make FC=gfortran CCKR=gcc LIBDIR=$PRODUCT_DIR/lib CBIN=$PRODUCT_DIR/bin
84
85 else
86 echo "ERROR: EUPS FLAVOR:$FLAVOR not supported"
87 exit
88 fi