diff options
Diffstat (limited to 'var')
12 files changed, 718 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_tcltk-configure.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_tcltk-configure.patch new file mode 100644 index 0000000000..60c1d683e2 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_tcltk-configure.patch @@ -0,0 +1,39 @@ +--- a/tcltk/BUILD_DIR/configure 2021-07-13 14:18:46.000000000 -0500 ++++ b/tcltk/BUILD_DIR/configure 2022-02-15 13:32:41.678576015 -0600 +@@ -6080,36 +6080,6 @@ + x_includes="/usr/local/include" + fi + fi +- # AC_PATH_X checks for Xlib.h, but somehow a missing X11/Xlib.h can +- # still get past it and cause problems later in the build (tk.h), so +- # try an additional test here just to make sure that it's installed: +- if test "x$x_includes" = "x"; then +- as_fn_error $? "No X11 include directory found. Please specify location using --x-includes option." "$LINENO" 5 +- else +- xlib_h="$x_includes/X11/Xlib.h" +- xintrinsic_h="$x_includes/X11/Intrinsic.h" +- xstringdefs_h="$x_includes/X11/StringDefs.h" +- if test -f $xlib_h; then +- if test -f $xintrinsic_h; then +- if test -f $xstringdefs_h; then +- XINCLUDES="-I$x_includes" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found $xlib_h" >&5 +-$as_echo "Found $xlib_h" >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $x_includes for X11 header files" >&5 +-$as_echo "Using $x_includes for X11 header files" >&6; } +- else +- as_fn_error $? "Required header X11/StringDefs.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- else +- as_fn_error $? "Required header X11/Intrinsic.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- else +- as_fn_error $? "Required header X11/Xlib.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- fi + + # X11 libraries: Having a -L path for libX11 is not always necessary, + # but when passing a value for x_includes to external packages (e.g. diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0a.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0a.patch new file mode 100644 index 0000000000..9cb627589c --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0a.patch @@ -0,0 +1,38 @@ +--- a/Xspec/src/XSUser/UserInterface/execscript.cxx 2021-02-19 10:47:02.000000000 -0600 ++++ b/Xspec/src/XSUser/UserInterface/execscript.cxx 2022-02-16 10:35:18.765454040 -0600 +@@ -366,19 +366,23 @@ + XSparse::collateByWhitespace(lineArgs, buffer); + string procName; + string scriptName; +- +- if (lineArgs[0] == "cd") ++ // Careful, if line contained whitespace and nothing but ++ // whitespace, lineArgs vector will be empty. ++ if (lineArgs.size()) + { +- // If no second argument, assume cd into home directory. +- string cdPath = (lineArgs.size() < 2) ? string("~/") : lineArgs[1]; +- appendPathToScript(cdPath, currPathToScript); +- } +- else if (findProcFromLineArgs(lineArgs, procName)) +- userProcs.insert(procName); +- else if (isCallToScript(lineArgs, scriptName)) +- { +- // Recursive call +- status = findNestedUserProcs(scriptName, userProcs, currPathToScript); ++ if (lineArgs[0] == "cd") ++ { ++ // If no second argument, assume cd into home directory. ++ string cdPath = (lineArgs.size() < 2) ? string("~/") : lineArgs[1]; ++ appendPathToScript(cdPath, currPathToScript); ++ } ++ else if (findProcFromLineArgs(lineArgs, procName)) ++ userProcs.insert(procName); ++ else if (isCallToScript(lineArgs, scriptName)) ++ { ++ // Recursive call ++ status = findNestedUserProcs(scriptName, userProcs, currPathToScript); ++ } + } + } + } diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0b.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0b.patch new file mode 100644 index 0000000000..22d5db9bde --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0b.patch @@ -0,0 +1,34 @@ +--- a/Xspec/src/XSStat/Cstat.h 2021-02-19 10:47:02.000000000 -0600 ++++ b/Xspec/src/XSStat/Cstat.h 2022-02-16 10:37:53.682939519 -0600 +@@ -134,10 +134,13 @@ + return; + } + } else { +- Real bTime (background->data()->exposureTime()); ++ // tb includes the background exposure time multiplied by the ratios ++ // between the source and background BACKSCALE and AREASCALE. + RealArray tb (background->data()->backgroundScale()[IN]); + tb /= sp->backgroundScale()[IN]; +- tb *= bTime; ++ tb *= background->data()->areaScale()[IN]; ++ tb /= sp->areaScale()[IN]; ++ tb *= background->data()->exposureTime(); + RealArray B (tb * background->spectrum()[IN]); + RealArray Berr (tb * background->variance()[IN]); + +@@ -228,10 +231,13 @@ + T::specificResetCalc(S, ts, model, number(), modifier(), diff1, diff2); + } else { + // Variable definitions follow Appendix B of manual. +- Real bTime (background->data()->exposureTime()); ++ // tb includes the background exposure time multiplied by the ratios ++ // between the source and background BACKSCALE and AREASCALE. + RealArray tb (background->data()->backgroundScale()[IN]); + tb /= sp->backgroundScale()[IN]; +- tb *= bTime; ++ tb *= background->data()->areaScale()[IN]; ++ tb /= sp->areaScale()[IN]; ++ tb *= background->data()->exposureTime(); + RealArray B (tb * background->spectrum()[IN]); + RealArray Berr (tb * background->variance()[IN]); + diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0c.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0c.patch new file mode 100644 index 0000000000..427ca2960b --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0c.patch @@ -0,0 +1,53 @@ +diff -u a/Xspec/src/XSFunctions/sumdem.cxx b/Xspec/src/XSFunctions/sumdem.cxx +--- a/Xspec/src/XSFunctions/sumdem.cxx 2019-05-17 14:35:25.000000000 -0500 ++++ b/Xspec/src/XSFunctions/sumdem.cxx 2022-02-16 10:42:36.946827375 -0600 +@@ -14,7 +14,7 @@ + RealArray& fluxArray, RealArray& fluxErrArray); + + +-void sumdem(int itype, int swtch, float* ear, int ne, float* abun, ++extern "C" void sumdem(int itype, int swtch, float* ear, int ne, float* abun, + float dens, float z, int ninputt, float* inputt, float* dem, + int ifl, bool qtherm, float velocity, float* photar, float* photer, + int* status); +diff -u a/Xspec/src/XSFunctions/xsmaug.cxx b/Xspec/src/XSFunctions/xsmaug.cxx +--- a/Xspec/src/XSFunctions/xsmaug.cxx 2019-05-17 14:35:25.000000000 -0500 ++++ b/Xspec/src/XSFunctions/xsmaug.cxx 2022-02-16 10:42:28.949802306 -0600 +@@ -49,10 +49,10 @@ + // REAL ear(0:*), abun(*), inputt(*), dem(*), photar(*) + // REAL dens, z + +-void sumdem_(int& itype, int& flag, float* ear, int& ne, +- float* abun, float& dens, float& z, int& ninputt, +- float* inputt, float* dem, int& ifl, int& qtherm, +- float& velocity, float* photar, int& status); ++void sumdem(int itype, int flag, float* ear, int ne, ++ float* abun, float dens, float z, int ninputt, ++ float* inputt, float* dem, int ifl, bool qtherm, ++ float velocity, float* photar, float* photer, int* status); + } + + /*---------------------------------------------------------------------------*/ +@@ -325,7 +325,7 @@ + const double MIN2RAD = 3437.75; + int i, ie, iel; + int mesh2, meshpt; +- int itype, mode, no_el, status; ++ int itype, mode, no_el, status=0; + double angfac, da, ei, evol, inner, H0, L0, outer, q0, z, zfac; + double a1, a2, Ab_shell, ei_shell, h1, h2, r1, r2, rcutoff, t1, t2, w1, w2, w12; + double elden, norm; +@@ -487,10 +487,10 @@ + static float ONE(1.); + static int one(1); + float fz (z); +- static int NOT(0); ++ static bool NOT(false); + static float ZERO(0.0); +- sumdem_(itype, mode, fear, ne, abund, ONE , fz, one, kT_shell, dem, ifl, +- NOT, ZERO, phoshell, status); ++ sumdem(itype, mode, fear, ne, abund, ONE , fz, one, kT_shell, dem, ifl, ++ NOT, ZERO, phoshell, 0, &status); + + /* ADD THE SHELL CONTRIBUTION TO THE OUTPUT SPECTRUM, + * CORRECTING IT FOR <angfac>, DISTANCE AND REDSHIFT, diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0d.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0d.patch new file mode 100644 index 0000000000..907f9920e9 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0d.patch @@ -0,0 +1,65 @@ +diff -u a/Xspec/src/XSFunctions/dospin.f b/Xspec/src/XSFunctions/dospin.f +--- a/Xspec/src/XSFunctions/dospin.f 2020-03-31 09:43:58.000000000 -0500 ++++ b/Xspec/src/XSFunctions/dospin.f 2022-02-16 10:46:28.400550576 -0600 +@@ -52,14 +52,14 @@ + integer nradii,ng,ia,imu0,abins,mu0bins,ilun,ios,block,hdutyp + integer ir + parameter(nradii=50,ng=20,abins=20,mu0bins=20) ++ DOUBLE PRECISION, ALLOCATABLE, SAVE :: trff_tab(:,:,:,:,:) ++ DOUBLE PRECISION, ALLOCATABLE, SAVE :: cosne_tab(:,:,:,:,:) ++ DOUBLE PRECISION, ALLOCATABLE, SAVE :: gmin_tab(:,:,:) ++ DOUBLE PRECISION, ALLOCATABLE, SAVE :: gmax_tab(:,:,:) ++ DOUBLE PRECISION, ALLOCATABLE, SAVE :: a_tab(:),mu0_tab(:) + DOUBLE PRECISION sumspec + DOUBLE PRECISION a,theta0,mu0,gstar(ng) +- DOUBLE PRECISION a_tab(abins),mu0_tab(mu0bins) + DOUBLE PRECISION aintfac,mu0intfac +- DOUBLE PRECISION trff_tab(nradii,ng,2,abins,mu0bins) +- DOUBLE PRECISION cosne_tab(nradii,ng,2,abins,mu0bins) +- DOUBLE PRECISION gmin_tab(nradii,abins,mu0bins) +- DOUBLE PRECISION gmax_tab(nradii,abins,mu0bins) + DOUBLE PRECISION re(nradii),gmin(nradii) + DOUBLE PRECISION gmax(nradii),trff(nradii,ng,2) + DOUBLE PRECISION cosne(nradii,ng,2) +@@ -88,7 +88,6 @@ + external lenact, fgmodf + + SAVE qfirst +- save a_tab,trff_tab,cosne_tab,gmin_tab,gmax_tab,mu0_tab + + DATA qfirst / .true. / + +@@ -128,6 +127,11 @@ + c Read in transfer function from the kerrtable.fits file. + c + if ( qfirst ) then ++ allocate(trff_tab(nradii,ng,2,abins,mu0bins)) ++ allocate(cosne_tab(nradii,ng,2,abins,mu0bins)) ++ allocate(gmin_tab(nradii,abins,mu0bins)) ++ allocate(gmax_tab(nradii,abins,mu0bins)) ++ allocate(a_tab(abins),mu0_tab(mu0bins)) + call getlun(ilun) + datafile = fgmodf() + datafile=datafile(1:lenact(datafile))//'/kerrtable.fits' +@@ -316,7 +320,8 @@ + rad=rmin * 10 ** ( dfloat(ilgrad-1)*dlog(re(1)/re(nradii))/ + & dfloat(ilgrad_max-1)) + +- if ((rad .gt. rmin) .and. (rad .lt. rmax)) then ++ if ((rad .gt. rmin) .and. (rad .gt. re(nradii)) .and. ++ & (rad .lt. rmax)) then + + if (rad .gt. re(irad)) irad=irad-1 + intfac=(rad-re(irad+1))/(re(irad)-re(irad+1)) +diff -u a/Xspec/src/XSFunctions/xsrefsch.f b/Xspec/src/XSFunctions/xsrefsch.f +--- a/Xspec/src/XSFunctions/xsrefsch.f 2019-05-17 14:35:25.000000000 -0500 ++++ b/Xspec/src/XSFunctions/xsrefsch.f 2022-02-16 10:46:28.401550579 -0600 +@@ -307,7 +307,7 @@ + sincl = sin(param(5)/dera) + cincl = cos(param(5)/dera) + +- do n=1,ne ++ do n=0,ne + ear(n) = zfac*earp(n) + end do + diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0e.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0e.patch new file mode 100644 index 0000000000..61fb7eb410 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0e.patch @@ -0,0 +1,194 @@ +--- a/Xspec/src/manager/model.dat 2021-07-13 14:18:32.000000000 -0500 ++++ b/Xspec/src/manager/model.dat 2022-02-16 10:47:54.447819272 -0600 +@@ -44,14 +44,14 @@ + kT keV 1. 0.008 0.008 64.0 64.0 .01 + Abundanc " " 1. 0. 0. 5. 5. -0.001 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + btapec 5 0. 1.e20 C_btapec add 0 + kT keV 1. 0.008 0.008 64.0 64.0 .01 + kTi keV 1. 0.008 0.008 64.0 64.0 .01 + Abundanc " " 1. 0. 0. 5. 5. -0.001 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bbody 1 1.e-20 1.e20 xsblbd add 0 + kT keV 3.0 1.e-4 1.e-2 100. 200. 0.01 +@@ -109,7 +109,7 @@ + Abundanc " " 1.0 0. 0. 1000. 10000. -0.01 + Tau s/cm^3 1.e11 1.e8 1.e8 5.e13 5.e13 1.e8 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity km/s 0.0 0.0 0.0 1.e6 1.e6 -10.0 ++Velocity km/s 0.0 0.0 0.0 1.e4 1.e4 -10.0 + + bvapec 16 0. 1.e20 C_bvapec add 0 + kT keV 6.5 0.0808 0.0808 68.447 68.447 0.01 +@@ -127,7 +127,7 @@ + Fe " " 1. 0. 0. 1000. 1000. -0.01 + Ni " " 1. 0. 0. 1000. 1000. -0.01 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bvrnei 18 0. 1.e20 C_bvrnei add 0 + kT keV 0.5 0.0808 0.0808 79.9 79.9 0.01 +@@ -147,7 +147,7 @@ + Ni " " 1.0 0. 0. 1000. 10000. -0.01 + Tau s/cm^3 1.e11 1.e8 1.e8 5.e13 5.e13 1.e8 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bvtapec 17 0. 1.e20 C_bvtapec add 0 + kT keV 6.5 0.0808 0.0808 68.447 68.447 0.01 +@@ -166,7 +166,7 @@ + Fe " " 1. 0. 0. 1000. 1000. -0.01 + Ni " " 1. 0. 0. 1000. 1000. -0.01 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bvvapec 33 0. 1.e20 C_bvvapec add 0 + kT keV 6.5 0.0808 0.0808 68.447 68.447 0.01 +@@ -201,7 +201,7 @@ + Cu " " 1. 0. 0. 1000. 1000. -0.01 + Zn " " 1. 0. 0. 1000. 1000. -0.01 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bvvrnei 35 0. 1.e20 C_bvvrnei add 0 + kT keV 0.5 0.0808 0.0808 79.9 79.9 0.01 +@@ -238,7 +238,7 @@ + Zn " " 1. 0. 0. 1000. 1000. -0.01 + Tau s/cm^3 1.e11 1.e8 1.e8 5.e13 5.e13 1.e8 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + bvvtapec 34 0. 1.e20 C_bvvtapec add 0 + kT keV 6.5 0.0808 0.0808 68.447 68.447 0.01 +@@ -274,7 +274,7 @@ + Cu " " 1. 0. 0. 1000. 1000. -0.01 + Zn " " 1. 0. 0. 1000. 1000. -0.01 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +-Velocity "km/s" 0. 0. 0. 1.e6 1.e6 -10.0 ++Velocity "km/s" 0. 0. 0. 1.e4 1.e4 -10.0 + + c6mekl 10 0. 1.e20 C_c6mekl add 0 + CPcoef1 " " 1.0 -1 -1 1 1 0.10 +@@ -1666,7 +1666,7 @@ + vvwdem 36 0. 1.e20 C_vvwDem add 0 + Tmax keV 1.0 0.01 0.01 10 20 0.01 + beta " " 0.1 0.01 0.01 1.0 1.0 0.01 +-p " " 0.25 -1.0 -1.0 10.0 10.0 0.01 ++inv_slope " " 0.25 -1.0 -1.0 10.0 10.0 0.01 + nH cm^-3 1.0 1.e-6 1.e-5 1.e19 1.e20 -0.01 + H " " 1. 0. 0. 1000. 1000. -0.01 + He " " 1. 0. 0. 1000. 1000. -0.01 +@@ -1704,7 +1704,7 @@ + vwdem 20 0. 1.e20 C_vwDem add 0 + Tmax keV 1.0 0.01 0.01 10 20 0.01 + beta " " 0.1 0.01 0.01 1.0 1.0 0.01 +-p " " 0.25 -1.0 -1.0 10.0 10.0 0.01 ++inv_slope " " 0.25 -1.0 -1.0 10.0 10.0 0.01 + nH cm^-3 1.0 1.e-6 1.e-5 1.e19 1.e20 -0.01 + He " " 1.0 0. 0. 10. 10. -0.01 + C " " 1.0 0. 0. 10. 10. -0.01 +@@ -1726,7 +1726,7 @@ + wdem 7 0. 1.e20 C_wDem add 0 + Tmax keV 1.0 0.01 0.01 10 20 0.01 + beta " " 0.1 0.01 0.01 1.0 1.0 0.01 +-p " " 0.25 -1.0 -1.0 10.0 10.0 0.01 ++inv_slope " " 0.25 -1.0 -1.0 10.0 10.0 0.01 + nH cm^-3 1.0 1.e-6 1.e-5 1.e19 1.e20 -0.01 + abundanc " " 1.0 0. 0. 10. 10. -0.01 + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 +@@ -1854,36 +1854,36 @@ + Redshift " " 0. -0.999 -0.999 10. 10. -0.01 + + ismabs 31 0.01 1.e6 ismabs mul 0 +-H 10^22 0.1 0. 0. 1E5 1E6 1E-3 +-HeII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-CI 10^16 33.1 0. 0. 1E5 1E6 1E-3 +-CII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-CIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-NI 10^16 8.32 0. 0. 1E5 1E6 1E-3 +-NII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-NIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-OI 10^16 67.6 0. 0. 1E5 1E6 1E-3 +-OII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-OIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-NeI 10^16 12. 0. 0. 1E5 1E6 1E-3 +-NeII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-NeIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-MgI 10^16 3.8 0. 0. 1E5 1E6 1E-3 +-MgII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-MgIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-SiI 10^16 3.35 0. 0. 1E5 1E6 1E-3 +-SiII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-SiIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-SI 10^16 2.14 0. 0. 1E5 1E6 1E-3 +-SII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-SIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-ArI 10^16 0.25 0. 0. 1E5 1E6 1E-3 +-ArII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-ArIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-CaI 10^16 0.22 0. 0. 1E5 1E6 1E-3 +-CaII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-CaIII 10^16 0. 0. 0. 1E5 1E6 -0.01 +-Fe 10^16 3.16 0. 0. 1E5 1E6 1E-3 ++H 10^22 0.1 0. 0. 1E5 1E6 1E-3 ++He_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++C_I 10^16 33.1 0. 0. 1E5 1E6 1E-3 ++C_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++C_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++N_I 10^16 8.32 0. 0. 1E5 1E6 1E-3 ++N_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++N_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++O_I 10^16 67.6 0. 0. 1E5 1E6 1E-3 ++O_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++O_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ne_I 10^16 12. 0. 0. 1E5 1E6 1E-3 ++Ne_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ne_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Mg_I 10^16 3.8 0. 0. 1E5 1E6 1E-3 ++Mg_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Mg_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Si_I 10^16 3.35 0. 0. 1E5 1E6 1E-3 ++Si_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Si_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++S_I 10^16 2.14 0. 0. 1E5 1E6 1E-3 ++S_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++S_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ar_I 10^16 0.25 0. 0. 1E5 1E6 1E-3 ++Ar_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ar_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ca_I 10^16 0.22 0. 0. 1E5 1E6 1E-3 ++Ca_II 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Ca_III 10^16 0. 0. 0. 1E5 1E6 -0.01 ++Fe 10^16 3.16 0. 0. 1E5 1E6 1E-3 + redshift " " 0.0 -1.0 0.0 10. 10. -0.01 + + ismdust 3 0.01 1.e6 ismdust mul 0 +@@ -2150,7 +2150,7 @@ + z " " 0.0 0.0 0.0 1.e5 1.e6 1.e-6 + + zdust 4 0. 1.e20 mszdst mul 0 +-$method " " 1 1 1 3 3 -0.01 ++$method 1 + E_BmV " " 0.1 0.0 0.0 100. 100. 0.01 + Rv " " 3.1 0.0 0.0 10. 10. -0.01 + Redshift " " 0. 0.0 0.0 20. 20. -0.01 +@@ -2186,7 +2186,7 @@ + nHmin 10^22 0.01 1e-07 1e-07 1000 1e+06 1e-2 + nHmax 10^22 10 1e-07 1e-07 1000 1e+06 1e-2 + beta " " 0.0 -10 -10 10 10 1e-2 +-log(xi) " " 3 -3 -3 6 6 1e-2 ++log_xi " " 3 -3 -3 6 6 1e-2 + redshift " " 0. 0. 0. 10. 10. -0.01 + + zxipcf 4 0.01 1.e20 C_zxipcf mul 0 diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0f.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0f.patch new file mode 100644 index 0000000000..fbd8d3582f --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0f.patch @@ -0,0 +1,35 @@ +--- a/Xspec/src/XSModel/Model/Component/OGIPTable/OGIPTable.cxx 2021-07-13 14:18:31.000000000 -0500 ++++ b/Xspec/src/XSModel/Model/Component/OGIPTable/OGIPTable.cxx 2022-02-16 10:51:55.954573553 -0600 +@@ -174,6 +174,14 @@ + + int numbVals = thisParam.getNumberTabulatedValues(); + ++ // If the table parameter has no unit string, heasp may return ++ // a blank but non-empty string. Remove leading/trailing blanks here. ++ string unitStr; ++ string::size_type startPos = thisParam.getUnits().find_first_not_of(' '); ++ string::size_type endPos = thisParam.getUnits().find_last_not_of(' '); ++ if (startPos != string::npos && endPos != string::npos) ++ unitStr = thisParam.getUnits().substr(startPos,endPos-startPos+1); ++ + if (thisParam.getInterpolationMethod() >= 0 && + m_interParam.size() < (size_t)nInterpParams && numbVals > 0) { + // case of an interpolated parameter +@@ -182,7 +190,7 @@ + thisParam.getInitialValue(), thisParam.getDelta(), + thisParam.getMaximum(), thisParam.getMinimum(), + thisParam.getTop(), thisParam.getBottom(), +- thisParam.getUnits())); ++ unitStr)); + + modParam->numVals(numbVals); + modParam->setTabValue(thisParam.getTabulatedValues()); +@@ -196,7 +204,7 @@ + thisParam.getInitialValue(), thisParam.getDelta(), + thisParam.getMaximum(), thisParam.getMinimum(), + thisParam.getTop(), thisParam.getBottom(), +- thisParam.getUnits())); ++ unitStr)); + params().push_back(modPar.release()); + m_addParam.push_back(static_cast<ModParam*>(params().back())); + } diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0g.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0g.patch new file mode 100644 index 0000000000..e1cd6946cb --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0g.patch @@ -0,0 +1,12 @@ +--- a/Xspec/src/XSModel/Data/SpectralData.cxx 2021-02-19 10:47:01.000000000 -0600 ++++ b/Xspec/src/XSModel/Data/SpectralData.cxx 2022-02-16 10:55:16.813201027 -0600 +@@ -1232,9 +1232,6 @@ + throw YellowAlert(msg.str()); + } + +- // multiply in the areaScale for this spectrum +- m_effectiveAreas *= m_areaScale; +- + } + + void SpectralData::clearEffectiveAreas () diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0ver.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0ver.patch new file mode 100644 index 0000000000..48f0d61115 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.29_xspec-12.12.0ver.patch @@ -0,0 +1,11 @@ +--- a/Xspec/src/XSUtil/Utils/XSutility.cxx 2021-07-13 14:18:31.000000000 -0500 ++++ b/Xspec/src/XSUtil/Utils/XSutility.cxx 2022-02-16 10:57:32.985626496 -0600 +@@ -390,7 +390,7 @@ + + const string& xs_version() + { +- static const string version = "12.12.0"; ++ static const string version = "12.12.0g"; + return version; + } + diff --git a/var/spack/repos/builtin/packages/heasoft/heasoft-6.30_tcltk-configure.patch b/var/spack/repos/builtin/packages/heasoft/heasoft-6.30_tcltk-configure.patch new file mode 100644 index 0000000000..371485ecf6 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/heasoft-6.30_tcltk-configure.patch @@ -0,0 +1,39 @@ +--- a/tcltk/BUILD_DIR/configure 2021-12-20 12:05:17.000000000 -0600 ++++ b/tcltk/BUILD_DIR/configure 2022-03-31 17:53:13.981092533 -0500 +@@ -6816,36 +6816,6 @@ + x_includes="/usr/local/include" + fi + fi +- # AC_PATH_X checks for Xlib.h, but somehow a missing X11/Xlib.h can +- # still get past it and cause problems later in the build (tk.h), so +- # try an additional test here just to make sure that it's installed: +- if test "x$x_includes" = "x"; then +- as_fn_error $? "No X11 include directory found. Please specify location using --x-includes option." "$LINENO" 5 +- else +- xlib_h="$x_includes/X11/Xlib.h" +- xintrinsic_h="$x_includes/X11/Intrinsic.h" +- xstringdefs_h="$x_includes/X11/StringDefs.h" +- if test -f $xlib_h; then +- if test -f $xintrinsic_h; then +- if test -f $xstringdefs_h; then +- XINCLUDES="-I$x_includes" +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found $xlib_h" >&5 +-printf "%s\n" "Found $xlib_h" >&6; } +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $x_includes for X11 header files" >&5 +-printf "%s\n" "Using $x_includes for X11 header files" >&6; } +- else +- as_fn_error $? "Required header X11/StringDefs.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- else +- as_fn_error $? "Required header X11/Intrinsic.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- else +- as_fn_error $? "Required header X11/Xlib.h not found in $x_includes" "$LINENO" 5 +- as_fn_error $? "X11 Development package is required in order to build HEASOFT" "$LINENO" 5 +- fi +- fi + + # X11 libraries: Having a -L path for libX11 is not always necessary, + # but when passing a value for x_includes to external packages (e.g. diff --git a/var/spack/repos/builtin/packages/heasoft/package.py b/var/spack/repos/builtin/packages/heasoft/package.py new file mode 100644 index 0000000000..3b52ddcd59 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/package.py @@ -0,0 +1,143 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +import llnl.util.tty as tty + +from spack import * +from spack.util.environment import EnvironmentModifications + + +class Heasoft(AutotoolsPackage): + """A Unified Release of the FTOOLS and XANADU Software Packages. + + XANADU: High-level, multi-mission tasks for X-ray astronomical spectral, + timing, and imaging data analysis. FTOOLS: General and mission-specific + tools to manipulate FITS files. FITSIO: Core library responsible for reading + and writing FITS files. fv: General FITS file browser/editor/plotter with a + graphical user interface. XSTAR: Tool for calculating the physical + conditions and emission spectra of photoionized gases""" + + homepage = "https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/" + url = "https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft6.29/heasoft-6.29src.tar.gz" + + maintainers = ['glennpj'] + + version('6.30', + sha256='7f828f6050809653319f94d715c1b6815fbc09adfdcb61f2f0f1d7a6af10684a') + version('6.29', + sha256='534fec04baa2586326fd7240805f2606620f3b7d7078a80fdd95c9c1177c9e68') + + variant('X', default=True, description='Enable X11 support') + + depends_on('zlib') + depends_on('ncurses') + depends_on('curl') + depends_on('libxt', when='+X') + depends_on('libx11', when='+X') + depends_on('readline') + depends_on('libpng') + depends_on('perl-extutils-makemaker') + depends_on('py-numpy') + + extends('python') + + conflicts('%gcc@:4,10:') + + # Do not create directory in $HOME during environment sourcing and use a + # predictable name for the file to be sourced. + patch('setup.patch') + + # tcltk-configure: Remove redundant X11 header test because spack has X11 + # headers in different directories + # + # xspec: The HEASOFT project provides a tarball of replacement files for + # Xspec, along with a TCL patch utility. This is meant for updating a + # source tree in place with minimal rebuilding. This does not fit Spack's + # model so convert those to patches. These are kept in sync with what is on + # https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/xanadu/xspec/issues/issues.html + with when("@6.29"): + patch('heasoft-6.29_tcltk-configure.patch') + + patch('heasoft-6.29_xspec-12.12.0a.patch') + patch('heasoft-6.29_xspec-12.12.0b.patch') + patch('heasoft-6.29_xspec-12.12.0c.patch') + patch('heasoft-6.29_xspec-12.12.0d.patch') + patch('heasoft-6.29_xspec-12.12.0e.patch') + patch('heasoft-6.29_xspec-12.12.0f.patch') + patch('heasoft-6.29_xspec-12.12.0g.patch') + patch('heasoft-6.29_xspec-12.12.0ver.patch') + + with when("@6.30"): + patch('heasoft-6.30_tcltk-configure.patch') + + configure_directory = 'BUILD_DIR' + + parallel = False + + def patch(self): + filter_file(r'(--with-readline-library=)\\\$READLINE_DIR', + r'\1{0}'.format(self.spec['readline'].libs.directories[0]), + join_path('tcltk', 'BUILD_DIR', 'hd_config_info')) + + filter_file(r'(--with-readline-includes=)\\\$READLINE_DIR', + r'\1{0}'.format( + join_path(self.spec['readline'].headers.directories[0], + 'readline')), + join_path('tcltk', 'BUILD_DIR', 'hd_config_info')) + + if '+X' in self.spec: + filter_file(r'(\s+XDIR => ).*', + r"\1'{0}',".format(self.spec['libx11'].libs.directories[0]), + join_path('tcltk', 'PGPLOT-perl', 'Makefile.PL')) + + def configure_args(self): + config_args = [ + '--with-png={0}'.format(self.spec['libpng'].prefix), + 'CPPFLAGS={0}'.format(self.spec['zlib'].headers.include_flags), + 'LDFLAGS={0}'.format(self.spec['zlib'].libs.search_flags) + ] + + config_args += self.enable_or_disable('x', variant='X') + + if '+X' in self.spec: + config_args.extend([ + '--x-includes={0}'.format(self.spec['libx11'].headers.directories[0]), + '--x-libraries={0}'.format(self.spec['libx11'].libs.directories[0]), + ]) + + return config_args + + @run_after('install') + def generate_environment(self): + host_family = self.spec.target.family + host_platform = self.spec.platform + host_libc = os.confstr('CS_GNU_LIBC_VERSION').split()[1] + target = '{0}-pc-{1}-gnu-libc{2}'.format(host_family, host_platform, + host_libc) + headas_setup_file = join_path(self.spec.prefix, target, 'BUILD_DIR', + 'headas-setup') + + filter_file(r'(^headas_config=).*', + r'\1{0}'.format(join_path(self.prefix, 'headas-config_spack')), + headas_setup_file) + + filter_file(r'(^flavor.*\n)', + r'\1HEADAS={0}'.format(join_path(self.spec.prefix, target)) + + "\n", + headas_setup_file) + + headas_setup = Executable(headas_setup_file) + headas_setup('sh') + + def setup_run_environment(self, env): + try: + env.extend(EnvironmentModifications.from_sourcing_file( + join_path(self.spec.prefix, 'headas-config_spack.sh'), clean=True + )) + except Exception as e: + msg = 'unexpected error when sourcing HEASOFT setup [{0}]' + tty.warn(msg.format(str(e))) diff --git a/var/spack/repos/builtin/packages/heasoft/setup.patch b/var/spack/repos/builtin/packages/heasoft/setup.patch new file mode 100644 index 0000000000..c79033c1f9 --- /dev/null +++ b/var/spack/repos/builtin/packages/heasoft/setup.patch @@ -0,0 +1,55 @@ +--- a/BUILD_DIR/headas-setup.in 2022-02-16 20:15:32.438402875 -0600 ++++ b/BUILD_DIR/headas-setup.in 2022-02-16 20:17:16.572726456 -0600 +@@ -136,20 +136,6 @@ + if [ -d $HEADAS/syspfiles/. ]; then + PFCLOBBER=1 + +- # make sure local parameter file directory exists +- if [ ! -w "$HOME/pfiles/." ]; then +- if [ ! -d "$HOME/pfiles/." ]; then +- mkdir "$HOME/pfiles" +- if [ $? -ne 0 ]; then +- echo "$headas_error cannot create local pfiles directory $HOME/pfiles" >&2 +- exit 3 +- fi +- else +- echo "$headas_error local pfiles directory $HOME/pfiles exists but is not writable" >&2 +- exit 3 +- fi +- fi +- + # use PFILES (if set) to set initial values for locpfiles and syspfiles + if [ "x$PFILES" != x ]; then + syspfiles=`echo $PFILES | sed "s%.*;%%"` +@@ -340,23 +326,23 @@ + + # Bourne Shell version, write only for sh flavor initialization + if [ $flavor = sh ]; then +- rm -f "$headas_config$$.sh" +- touch "$headas_config$$.sh" ++ rm -f "$headas_config.sh" ++ touch "$headas_config.sh" + for var in $varlist; do + eval "if [ \"x\$$var\" != x ]; then +- echo \"\$var=\\\"\$$var\\\"; export \$var\" >> \"$headas_config$$.sh\"; ++ echo \"\$var=\\\"\$$var\\\"; export \$var\" >> \"$headas_config.sh\"; + fi" + done +- echo "$headas_config$$.sh" ++ echo "$headas_config.sh" + # C Shell version, write only for csh flavor initialization + elif [ $flavor = csh ]; then +- rm -f "$headas_config$$.csh" +- touch "$headas_config$$.csh" ++ rm -f "$headas_config.csh" ++ touch "$headas_config.csh" + for var in $varlist; do + eval "if [ \"x\$$var\" != x ]; then +- echo setenv \$var \\\"\$$var\\\" >> \"$headas_config$$.csh\"; ++ echo setenv \$var \\\"\$$var\\\" >> \"$headas_config.csh\"; + fi" + done +- echo "$headas_config$$.csh" ++ echo "$headas_config.csh" + fi + #------------------------------------------------------------------------------- |