From b24e9a7198c608d88a43fb06fb4ecf185b2f70a6 Mon Sep 17 00:00:00 2001 From: James McDuffie Date: Mon, 15 Aug 2022 13:53:23 -0700 Subject: [PATCH] Remove base/ since that has been moved into the unity-docker-stacks repository. Remove source as submodule. Move spss/ directory contents up a level. --- spss/.dockerignore => .dockerignore | 0 .gitmodules | 3 - spss/Dockerfile.common => Dockerfile.common | 0 spss/Dockerfile.l1a => Dockerfile.l1a | 0 spss/Dockerfile.l1b => Dockerfile.l1b | 0 base/Dockerfile | 168 --- base/scripts/blitz-1.0.1.sh | 27 - base/scripts/boost-1.58.sh | 13 - base/scripts/bufrlib-11.3.0.sh | 22 - base/scripts/coda-2.21.sh | 23 - base/scripts/cxxtest-4.4.sh | 13 - base/scripts/g2clib-1.4.0.sh | 25 - base/scripts/gcc-8.2.0.sh | 12 - base/scripts/grib_api-1.9.18.sh | 22 - base/scripts/hdf4-4.2.13.sh | 21 - base/scripts/hdf5-1.8.16.sh | 23 - base/scripts/hdf5-1.8.19.sh | 23 - base/scripts/hdfeos2.20v1.00.sh | 28 - base/scripts/hdfeos5.1.16.sh | 24 - base/scripts/jasper-1.900.1.sh | 23 - base/scripts/jpeg-9b.sh | 16 - base/scripts/lapack-3.5.0.sh | 17 - base/scripts/libgeotiff-1.4.0.sh | 21 - base/scripts/netcdf-c-4.7.4.sh | 30 - base/scripts/netcdf-cxx4-4.3.1.sh | 22 - base/scripts/netcdf-fortran-4.4.5.sh | 24 - base/scripts/proj-4.8.0.sh | 12 - base/scripts/sdptk5.2.20v1.01.sh | 28 - base/scripts/sdptk5.2.20v1.01.txt | 13 - base/scripts/szip-2.1.1.sh | 19 - base/scripts/tiff-4.0.6.sh | 18 - base/scripts/tinyxml-2.6.2.sh | 17 - base/scripts/xerces-3.1.2.sh | 22 - base/scripts/zlib-1.2.11.sh | 16 - base/sources/BUFRLIB_v11-3-0.tar.gz | 3 - base/sources/HDF-EOS2.20v1.00.tar.Z | 3 - base/sources/HDF-EOS5.1.16.tar.Z | 3 - base/sources/SDPTK5.2.20v1.01.tar.Z | 3 - base/sources/blitz-1.0.1.tar.gz | 3 - base/sources/blitz-python2.patch | 42 - base/sources/boost_1_58_0.tar.gz | 3 - base/sources/bufrlib-11.3.0.patch | 3 - base/sources/coda-2.21.tar.gz | 3 - base/sources/coda_zlib_mangle.h.patch | 5 - base/sources/cxxtest-4.4.tar.gz | 3 - base/sources/g2clib-1.4.0.tar.gz | 3 - base/sources/gcc-8.2.0.tar.gz | 3 - base/sources/grib_api-1.9.18.tar.gz | 3 - base/sources/hdf-4.2.13.tar.gz | 3 - base/sources/hdf5-1.8.16.tar.gz | 3 - base/sources/hdf5-1.8.19.tar.gz | 3 - .../jasper-1.900.1-security_fixes-2.patch | 1302 ----------------- base/sources/jasper-1.900.1.zip | 3 - base/sources/jpegsrc.v9b.tar.gz | 3 - base/sources/lapack-3.5.0.tgz | 3 - base/sources/libgeotiff-1.4.0.tar.gz | 3 - base/sources/netcdf-c-4.7.4.tar.gz | 3 - base/sources/netcdf-cxx4-4.3.1.tar.gz | 3 - base/sources/netcdf-fortran-4.4.5.patch | 11 - base/sources/netcdf-fortran-4.4.5.tar.gz | 3 - base/sources/proj-4.8.0.tar.gz | 3 - base/sources/szip-2.1.1.tar.gz | 3 - base/sources/tiff-4.0.6.tar.gz | 3 - base/sources/tinyxml-2.6.2.tar.gz | 3 - base/sources/xerces-c-3.1.2.tar.gz | 3 - base/sources/zlib-1.2.11.tar.gz | 3 - {spss/cwl => cwl}/l1a_package.cwl | 0 {spss/cwl => cwl}/l1a_package.yml | 0 {spss/cwl => cwl}/l1b_package.cwl | 0 {spss/cwl => cwl}/l1b_package.yml | 0 {spss/ephemeris => ephemeris}/README | 0 {spss/ephemeris => ephemeris}/leapsec.dat | 0 {spss/ephemeris => ephemeris}/utcpole.dat | 0 .../interface => interface}/run_l1a_pge.ipynb | 0 .../interface => interface}/run_l1b_pge.ipynb | 0 spss/src | 1 - {spss/test => test}/common/copy_l1a_input.sh | 0 {spss/test => test}/common/copy_l1b_input.sh | 0 {spss/test => test}/common/setup_env.sh | 0 {spss/test => test}/launch_l1a_jupyter.sh | 0 {spss/test => test}/launch_l1b_jupyter.sh | 0 {spss/test => test}/run_l1a_test.sh | 0 {spss/test => test}/run_l1b_test.sh | 0 83 files changed, 2190 deletions(-) rename spss/.dockerignore => .dockerignore (100%) rename spss/Dockerfile.common => Dockerfile.common (100%) rename spss/Dockerfile.l1a => Dockerfile.l1a (100%) rename spss/Dockerfile.l1b => Dockerfile.l1b (100%) delete mode 100644 base/Dockerfile delete mode 100755 base/scripts/blitz-1.0.1.sh delete mode 100755 base/scripts/boost-1.58.sh delete mode 100755 base/scripts/bufrlib-11.3.0.sh delete mode 100755 base/scripts/coda-2.21.sh delete mode 100755 base/scripts/cxxtest-4.4.sh delete mode 100755 base/scripts/g2clib-1.4.0.sh delete mode 100755 base/scripts/gcc-8.2.0.sh delete mode 100755 base/scripts/grib_api-1.9.18.sh delete mode 100755 base/scripts/hdf4-4.2.13.sh delete mode 100755 base/scripts/hdf5-1.8.16.sh delete mode 100755 base/scripts/hdf5-1.8.19.sh delete mode 100755 base/scripts/hdfeos2.20v1.00.sh delete mode 100755 base/scripts/hdfeos5.1.16.sh delete mode 100755 base/scripts/jasper-1.900.1.sh delete mode 100755 base/scripts/jpeg-9b.sh delete mode 100755 base/scripts/lapack-3.5.0.sh delete mode 100755 base/scripts/libgeotiff-1.4.0.sh delete mode 100755 base/scripts/netcdf-c-4.7.4.sh delete mode 100755 base/scripts/netcdf-cxx4-4.3.1.sh delete mode 100755 base/scripts/netcdf-fortran-4.4.5.sh delete mode 100755 base/scripts/proj-4.8.0.sh delete mode 100755 base/scripts/sdptk5.2.20v1.01.sh delete mode 100644 base/scripts/sdptk5.2.20v1.01.txt delete mode 100755 base/scripts/szip-2.1.1.sh delete mode 100755 base/scripts/tiff-4.0.6.sh delete mode 100755 base/scripts/tinyxml-2.6.2.sh delete mode 100755 base/scripts/xerces-3.1.2.sh delete mode 100755 base/scripts/zlib-1.2.11.sh delete mode 100644 base/sources/BUFRLIB_v11-3-0.tar.gz delete mode 100644 base/sources/HDF-EOS2.20v1.00.tar.Z delete mode 100644 base/sources/HDF-EOS5.1.16.tar.Z delete mode 100644 base/sources/SDPTK5.2.20v1.01.tar.Z delete mode 100644 base/sources/blitz-1.0.1.tar.gz delete mode 100644 base/sources/blitz-python2.patch delete mode 100644 base/sources/boost_1_58_0.tar.gz delete mode 100644 base/sources/bufrlib-11.3.0.patch delete mode 100644 base/sources/coda-2.21.tar.gz delete mode 100644 base/sources/coda_zlib_mangle.h.patch delete mode 100644 base/sources/cxxtest-4.4.tar.gz delete mode 100644 base/sources/g2clib-1.4.0.tar.gz delete mode 100644 base/sources/gcc-8.2.0.tar.gz delete mode 100644 base/sources/grib_api-1.9.18.tar.gz delete mode 100644 base/sources/hdf-4.2.13.tar.gz delete mode 100644 base/sources/hdf5-1.8.16.tar.gz delete mode 100644 base/sources/hdf5-1.8.19.tar.gz delete mode 100644 base/sources/jasper-1.900.1-security_fixes-2.patch delete mode 100644 base/sources/jasper-1.900.1.zip delete mode 100644 base/sources/jpegsrc.v9b.tar.gz delete mode 100644 base/sources/lapack-3.5.0.tgz delete mode 100644 base/sources/libgeotiff-1.4.0.tar.gz delete mode 100644 base/sources/netcdf-c-4.7.4.tar.gz delete mode 100644 base/sources/netcdf-cxx4-4.3.1.tar.gz delete mode 100644 base/sources/netcdf-fortran-4.4.5.patch delete mode 100644 base/sources/netcdf-fortran-4.4.5.tar.gz delete mode 100644 base/sources/proj-4.8.0.tar.gz delete mode 100644 base/sources/szip-2.1.1.tar.gz delete mode 100644 base/sources/tiff-4.0.6.tar.gz delete mode 100644 base/sources/tinyxml-2.6.2.tar.gz delete mode 100644 base/sources/xerces-c-3.1.2.tar.gz delete mode 100644 base/sources/zlib-1.2.11.tar.gz rename {spss/cwl => cwl}/l1a_package.cwl (100%) rename {spss/cwl => cwl}/l1a_package.yml (100%) rename {spss/cwl => cwl}/l1b_package.cwl (100%) rename {spss/cwl => cwl}/l1b_package.yml (100%) rename {spss/ephemeris => ephemeris}/README (100%) rename {spss/ephemeris => ephemeris}/leapsec.dat (100%) rename {spss/ephemeris => ephemeris}/utcpole.dat (100%) rename {spss/interface => interface}/run_l1a_pge.ipynb (100%) rename {spss/interface => interface}/run_l1b_pge.ipynb (100%) delete mode 160000 spss/src rename {spss/test => test}/common/copy_l1a_input.sh (100%) rename {spss/test => test}/common/copy_l1b_input.sh (100%) rename {spss/test => test}/common/setup_env.sh (100%) rename {spss/test => test}/launch_l1a_jupyter.sh (100%) rename {spss/test => test}/launch_l1b_jupyter.sh (100%) rename {spss/test => test}/run_l1a_test.sh (100%) rename {spss/test => test}/run_l1b_test.sh (100%) diff --git a/spss/.dockerignore b/.dockerignore similarity index 100% rename from spss/.dockerignore rename to .dockerignore diff --git a/.gitmodules b/.gitmodules index eccb587..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "spss/src"] - path = spss/src - url = git@github.jpl.nasa.gov:SIPS/SPSS.git diff --git a/spss/Dockerfile.common b/Dockerfile.common similarity index 100% rename from spss/Dockerfile.common rename to Dockerfile.common diff --git a/spss/Dockerfile.l1a b/Dockerfile.l1a similarity index 100% rename from spss/Dockerfile.l1a rename to Dockerfile.l1a diff --git a/spss/Dockerfile.l1b b/Dockerfile.l1b similarity index 100% rename from spss/Dockerfile.l1b rename to Dockerfile.l1b diff --git a/base/Dockerfile b/base/Dockerfile deleted file mode 100644 index 5d5cfb7..0000000 --- a/base/Dockerfile +++ /dev/null @@ -1,168 +0,0 @@ -FROM centos:7 - -ENV BUILD_PATH /build - -WORKDIR $BUILD_PATH - -ENV SOURCES_PATH=$BUILD_PATH/sources -ENV SCRIPTS_PATH=$BUILD_PATH/scripts -ENV INSTALL_PREFIX=/opt/packages -ENV GCC_PATH=/opt/gcc/gcc-8.2.0 -ENV NUM_COMPILE_JOBS=4 - -# Install development tools -RUN yum -y group install "Development Tools" - -# Install additional base packages -RUN yum -y install python3 wget epel-release - -# Install system dependencies -# libjpeg-turbo-devel is used by hdf4 library instead of the installed jpeg-9b version -# Even though boost is installed into /opt/packages, some of the SIPS PGEs use a system wide version -RUN yum -y install libjpeg-turbo-devel boost-devel python36-netcdf4 - -# Copy files -COPY sources $SOURCES_PATH -COPY scripts $SCRIPTS_PATH - -# Install custom version of GCC -RUN yum -y install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel -RUN $SCRIPTS_PATH/gcc-8.2.0.sh - -# Install zlib library -# https://zlib.net/ - -RUN $SCRIPTS_PATH/zlib-1.2.11.sh - -# Install libjpeg -# https://ijg.org/ - -RUN $SCRIPTS_PATH/jpeg-9b.sh - -# Install szip library -# https://support.hdfgroup.org/ftp/lib-external/szip/ - -RUN $SCRIPTS_PATH/szip-2.1.1.sh - -# Install HDF4 library -# https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.13/src/ - -RUN $SCRIPTS_PATH/hdf4-4.2.13.sh - -# Install HDF5 library -# https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.16/src/ - -# Two different versions linked to in SPSS scripts -RUN $SCRIPTS_PATH/hdf5-1.8.16.sh -RUN $SCRIPTS_PATH/hdf5-1.8.19.sh - -# Install HDFEOS2 library -# https://wiki.earthdata.nasa.gov/display/DAS/Toolkit+Downloads+with+HDFEOS+v3.0 -# https://hdfeos.org/software/hdfeos.php - -RUN yum install -y ksh - -RUN $SCRIPTS_PATH/hdfeos2.20v1.00.sh - -# Install HDFEOS5 library -# https://wiki.earthdata.nasa.gov/display/DAS/Toolkit+Downloads - -RUN $SCRIPTS_PATH/hdfeos5.1.16.sh - -# Install netcdf libraries -# https://github.com/Unidata/netcdf-c/releases -# https://github.com/Unidata/netcdf-fortran/eleases -# https://github.com/Unidata/netcdf-cxx4/releases - -RUN yum install -y libcurl-devel - -RUN $SCRIPTS_PATH/netcdf-c-4.7.4.sh -RUN $SCRIPTS_PATH/netcdf-fortran-4.4.5.sh -RUN $SCRIPTS_PATH/netcdf-cxx4-4.3.1.sh - -# Install SDPTK5.2.20v1.01 library -# All of the above are dependencies of SDPTK5.2.20v1.01 -# https://wiki.earthdata.nasa.gov/display/DAS/Toolkit+Downloads - -RUN yum install -y csh -RUN $SCRIPTS_PATH/sdptk5.2.20v1.01.sh - -# Install cxxtest -# This simply has the package expanded into the destination directory -# https://sourceforge.net/projects/cxxtest/files/cxxtest/ - -RUN $SCRIPTS_PATH/cxxtest-4.4.sh - -# Install xerces library -# https://archive.apache.org/dist/xerces/c/3/sources/ - -RUN $SCRIPTS_PATH/xerces-3.1.2.sh - -# Install boost libraries -# https://www.boost.org/users/history/version_1_58_0.html - -RUN $SCRIPTS_PATH/boost-1.58.sh - -# Install TinyXML library -# http://www.grinninglizard.com/tinyxml/ -# https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/ - -RUN $SCRIPTS_PATH/tinyxml-2.6.2.sh - -# Install Coda library -# https://github.com/stcorp/coda/releases - -RUN $SCRIPTS_PATH/coda-2.21.sh - -# Install grib_api -# https://github.com/weathersource/grib_api -# https://src.fedoraproject.org/lookaside/pkgs/grib_api/grib_api-1.9.18.tar.gz/94c03e18f4e1e166048057929feb0d1a/ - -RUN $SCRIPTS_PATH/grib_api-1.9.18.sh - -# Install JAsPer Project -# https://www.ece.uvic.ca/~frodo/jasper/#doc - -RUN $SCRIPTS_PATH/jasper-1.900.1.sh - -# Install g2clib -# https://github.com/weathersource/g2clib/tags - -RUN yum install -y libpng-devel libpng-static -RUN $SCRIPTS_PATH/g2clib-1.4.0.sh - -# Install bufrlib -# https://github.com/NOAA-EMC/NCEPLIBS-bufr -# https://github.com/JCSDA-internal/bufrlib/releases - -RUN $SCRIPTS_PATH/bufrlib-11.3.0.sh - -# Install LAPACK -# http://www.netlib.org/lapack/ -# https://src.fedoraproject.org/lookaside/extras/lapack/lapack-3.5.0.tgz/e7ba742120bd75339ac4c6fbdd8bce92/ - -RUN yum install -y cmake -RUN $SCRIPTS_PATH/lapack-3.5.0.sh - -# Install Blitz -# https://github.com/blitzpp/blitz -# https://src.fedoraproject.org/lookaside/pkgs/blitz/blitz-1.0.1.tar.gz/sha512/e217e016a651cc1b0fa5e625663a8ac8f96b1abbe03db92246b967f79b2285ee974e9090deecad05c2c559a30dbddfcc86dca6eb373cc47346810f35cffba265/ - -RUN $SCRIPTS_PATH/blitz-1.0.1.sh - -# Install libtiff -# http://www.simplesystems.org/libtiff/ -# http://download.osgeo.org/libtiff/ - -RUN $SCRIPTS_PATH/tiff-4.0.6.sh - -# Install PROJ.4 -# https://download.osgeo.org/proj/proj-4.8.0.tar.gz - -RUN $SCRIPTS_PATH/proj-4.8.0.sh - -# Install libgeotiff -# https://github.com/OSGeo/libgeotiff -# https://download.osgeo.org/geotiff/libgeotiff/ - -RUN $SCRIPTS_PATH/libgeotiff-1.4.0.sh diff --git a/base/scripts/blitz-1.0.1.sh b/base/scripts/blitz-1.0.1.sh deleted file mode 100755 index d24ee4c..0000000 --- a/base/scripts/blitz-1.0.1.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# wget https://github.com/blitzpp/blitz/archive/1.0.1.tar.gz -O blitz-1.0.1.tar.gz -# https://src.fedoraproject.org/rpms/blitz/blob/master/f/blitz.spec -# -tar zxf $SOURCES_PATH/blitz-1.0.1.tar.gz -cd blitz-1.0.1 -patch -p1 <$SOURCES_PATH/blitz-python2.patch -./configure --prefix=$INSTALL_PREFIX/blitz-1.0.1 \ ---enable-shared \ ---enable-static \ ---disable-cxx-flags-preset \ ---enable-64bit ---enable-fortran \ ---disable-fortran-flags-preset \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77=$GCC_PATH/bin/gfortran \ -FFLAGS="-O -fPIC -pthread -m64 -ffixed-line-length-132 -mcmodel=large \ - -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/blitz-1.0.1" -ls -l $INSTALL_PREFIX/blitz-1.0.1 -echo diff --git a/base/scripts/boost-1.58.sh b/base/scripts/boost-1.58.sh deleted file mode 100755 index dadc291..0000000 --- a/base/scripts/boost-1.58.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# -# https://sourceforge.net/projects/boost/files/boost/1.58.0/ -# WARNING: this will take more than 10 mins to build -# -tar zxf $SOURCES_PATH/boost_1_58_0.tar.gz -cd boost_1_58_0 -./bootstrap.sh --prefix=$INSTALL_PREFIX/boost-1.58 -./b2 install -echo -echo "$ ls -l $INSTALL_PREFIX/boost-1.58" -ls -l $INSTALL_PREFIX/boost-1.58 -echo diff --git a/base/scripts/bufrlib-11.3.0.sh b/base/scripts/bufrlib-11.3.0.sh deleted file mode 100755 index 25c0c22..0000000 --- a/base/scripts/bufrlib-11.3.0.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# -# wget https://www.emc.ncep.noaa.gov/BUFRLIB/docs/BUFRLIB_v11-3-0.tar -# -mkdir bufrlib-11.3.0 -tar zxf $SOURCES_PATH/BUFRLIB_v11-3-0.tar.gz -C bufrlib-11.3.0 -cd bufrlib-11.3.0 -patch getdefflags_F.sh $SOURCES_PATH/bufrlib-11.3.0.patch -CC=$GCC_PATH/bin/gcc -FC=$GCC_PATH/bin/gfortran -AR=/usr/bin/ar -BUFRLIB=bufrlib-11.3.0.a -$CC -c -DUNDERSCORE `./getdefflags_C.sh` *.c -$FC -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` -$AR cr $BUFRLIB *.o -mkdir -p $INSTALL_PREFIX/bufrlib-11.3.0/lib -cp $BUFRLIB $INSTALL_PREFIX/bufrlib-11.3.0/lib -ln -s $INSTALL_PREFIX/bufrlib-11.3.0/lib/$BUFRLIB $INSTALL_PREFIX/bufrlib-11.3.0/lib/libbufr.a -echo -echo "ls -l $INSTALL_PREFIX/bufrlib-11.3.0/lib" -ls -l $INSTALL_PREFIX/bufrlib-11.3.0/lib -echo diff --git a/base/scripts/coda-2.21.sh b/base/scripts/coda-2.21.sh deleted file mode 100755 index e57ca55..0000000 --- a/base/scripts/coda-2.21.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -# https://github.com/stcorp/coda/releases/tag/2.21 -# -# 2020.02.20 -# Apply patch on idl86 per Albert Chang -# diff /opt/idl/idl86/external/include/idl_export.h.orig /opt/idl/idl86/external/include/idl_export.h > idl86_idl_export.h.patch -# -tar zxf $SOURCES_PATH/coda-2.21.tar.gz -cd coda-2.21 -patch libcoda/zlib/coda_zlib_mangle.h $SOURCES_PATH/coda_zlib_mangle.h.patch -./configure --prefix=$INSTALL_PREFIX/coda-2.21 \ ---enable-shared \ ---enable-static \ -CC=$GCC_PATH/bin/gcc \ -F77=$GCC_PATH/bin/gfortran -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/coda-2.21" -ls -l $INSTALL_PREFIX/coda-2.21 -echo - diff --git a/base/scripts/cxxtest-4.4.sh b/base/scripts/cxxtest-4.4.sh deleted file mode 100755 index 9da3e51..0000000 --- a/base/scripts/cxxtest-4.4.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# -# wget https://github.com/CxxTest/cxxtest/releases/download/4.4/cxxtest-4.4.tar.gz -# - -mkdir -p $INSTALL_PREFIX/cxxtest-4.4 -tar zxf $SOURCES_PATH/cxxtest-4.4.tar.gz -cd cxxtest-4.4 -cp -a * $INSTALL_PREFIX/cxxtest-4.4 -echo -echo "$ ls -l $INSTALL_PREFIX/cxxtest-4.4" -ls -l $INSTALL_PREFIX/cxxtest-4.4 -echo diff --git a/base/scripts/g2clib-1.4.0.sh b/base/scripts/g2clib-1.4.0.sh deleted file mode 100755 index 3228fe8..0000000 --- a/base/scripts/g2clib-1.4.0.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# -# https://centos.pkgs.org/7/epel-x86_64/g2clib-devel-1.4.0-9.el7.x86_64.rpm.html -# -tar zxvf $SOURCES_PATH/g2clib-1.4.0.tar.gz -cd g2clib-1.4.0/src - -# Remove makefile line that removes object files or else some -# source code files will not be included in library -sed -i '/rm -f/d' makefile - -export CC=$GCC_PATH/bin/gcc \ -export CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -DUSE_PNG -DUSE_JPEG2000 \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000 \ - -I$INSTALL_PREFIX/jasper-1.900.1/include" -make CFLAGS="$CFLAGS" CC="$CC" -PREFIX=$INSTALL_PREFIX/g2clib-1.4.0 -mkdir -p $PREFIX/{lib,include} -install -p -m0644 libgrib2c.a $PREFIX/lib -install -p -m0644 *.h $PREFIX/include -echo -echo "$ ls -l $INSTALL_PREFIX/g2clib-1.4.0" -ls -l $INSTALL_PREFIX/g2clib-1.4.0 -echo diff --git a/base/scripts/gcc-8.2.0.sh b/base/scripts/gcc-8.2.0.sh deleted file mode 100755 index c198d0d..0000000 --- a/base/scripts/gcc-8.2.0.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -tar zxf $SOURCES_PATH/gcc-8.2.0.tar.gz -cd gcc-8.2.0 -./configure \ - --enable-languages=c,c++,fortran \ - --disable-multilib \ - --prefix=$GCC_PATH -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $GCC_PATH" -ls -l $GCC_PATH diff --git a/base/scripts/grib_api-1.9.18.sh b/base/scripts/grib_api-1.9.18.sh deleted file mode 100755 index ee37179..0000000 --- a/base/scripts/grib_api-1.9.18.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# -# wget https://confluence.ecmwf.int/download/attachments/3473437/grib_api-1.9.18.tar.gz?api=v2 -# -tar zxf $SOURCES_PATH/grib_api-1.9.18.tar.gz -cd grib_api-1.9.18 -./configure --prefix=$INSTALL_PREFIX/grib_api-1.9.18 \ ---enable-static \ ---enable-shared \ ---disable-jpeg \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77=$GCC_PATH/bin/gfortran \ -FFLAGS="-O -fPIC -pthread -m64 -ffixed-line-length-132 -mcmodel=large \ - -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/grib_api-1.9.18" -ls -l $INSTALL_PREFIX/grib_api-1.9.18 -echo diff --git a/base/scripts/hdf4-4.2.13.sh b/base/scripts/hdf4-4.2.13.sh deleted file mode 100755 index 617b853..0000000 --- a/base/scripts/hdf4-4.2.13.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.13/src/hdf-4.2.13.tar.gz -# confirm: nm $INSTALL_PREFIX/hdf4-4.2.13/lib/libmfhdf.a | grep NC_check_id -# -tar zxf $SOURCES_PATH/hdf-4.2.13.tar.gz -cd hdf-4.2.13 -./configure --prefix=$INSTALL_PREFIX/hdf4-4.2.13 \ ---with-zlib=$INSTALL_PREFIX/zlib-1.2.11 \ ---with-szlib=$INSTALL_PREFIX/szip-2.1.1 \ ---enable-netcdf=no \ -CC="$GCC_PATH/bin/gcc" \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,hdf-4.2.13.map" \ -F77="$GCC_PATH/bin/gfortran" \ -FFLAGS="-m64 -s -fPIC -pthread -ffixed-line-length-132 -mcmodel=large -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/hdf4-4.2.13" -ls -l $INSTALL_PREFIX/hdf4-4.2.13 diff --git a/base/scripts/hdf5-1.8.16.sh b/base/scripts/hdf5-1.8.16.sh deleted file mode 100755 index 052676d..0000000 --- a/base/scripts/hdf5-1.8.16.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.16/src/hdf5-1.8.16.tar.gz -# update binutils on C7 -# -tar zxf $SOURCES_PATH/hdf5-1.8.16.tar.gz -cd hdf5-1.8.16 -./configure --prefix="$INSTALL_PREFIX/hdf5-1.8.16" \ ---with-zlib=$INSTALL_PREFIX/zlib-1.2.11 \ ---with-szlib=$INSTALL_PREFIX/szip-2.1.1 \ ---enable-cxx \ ---enable-fortran \ -CC="$GCC_PATH/bin/gcc" \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,hdf5-1.8.16.map" \ -CXX="$GCC_PATH/bin/g++" \ -CPP="$GCC_PATH/bin/g++ -E" \ -F77="$GCC_PATH/bin/gfortran" \ -FFLAGS="-m64 -fPIC -pthread -s -ffixed-line-length-132 -mcmodel=large -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/hdf5-1.8.16" -ls -l $INSTALL_PREFIX/hdf5-1.8.16 diff --git a/base/scripts/hdf5-1.8.19.sh b/base/scripts/hdf5-1.8.19.sh deleted file mode 100755 index 0a15848..0000000 --- a/base/scripts/hdf5-1.8.19.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.19/src/hdf5-1.8.19.tar.gz -# update binutils on C7 -# -tar zxf $SOURCES_PATH/hdf5-1.8.19.tar.gz -cd hdf5-1.8.19 -./configure --prefix="$INSTALL_PREFIX/hdf5-1.8.19" \ ---with-zlib=$INSTALL_PREFIX/zlib-1.2.11 \ ---with-szlib=$INSTALL_PREFIX/szip-2.1.1 \ ---enable-cxx \ ---enable-fortran \ -CC="$GCC_PATH/bin/gcc" \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,hdf5-1.8.19.map" \ -CXX="$GCC_PATH/bin/g++" \ -CPP="$GCC_PATH/bin/g++ -E" \ -F77="$GCC_PATH/bin/gfortran" \ -FFLAGS="-m64 -fPIC -pthread -s -ffixed-line-length-132 -mcmodel=large -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/hdf5-1.8.19" -ls -l $INSTALL_PREFIX/hdf5-1.8.19 diff --git a/base/scripts/hdfeos2.20v1.00.sh b/base/scripts/hdfeos2.20v1.00.sh deleted file mode 100755 index 3eb715d..0000000 --- a/base/scripts/hdfeos2.20v1.00.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# wget https://observer.gsfc.nasa.gov/ftp/edhs/hdfeos/latest_release/HDF-EOS2.20v1.00.tar.Z -# -tar zxf $SOURCES_PATH/HDF-EOS2.20v1.00.tar.Z -mv hdfeos hdfeos2.20v1.00 -cd hdfeos2.20v1.00 -export LD_LIBRARY_PATH=$INSTALL_PREFIX/jpeg-9b/lib:$INSTALL_PREFIX/szip-2.1.1/lib -./configure --prefix="$INSTALL_PREFIX/hdfeos2.20v1.00" \ ---libdir=$INSTALL_PREFIX/hdfeos2.20v1.00/lib/linux64 \ ---with-jpeg=$INSTALL_PREFIX/jpeg-9b \ ---with-zlib=$INSTALL_PREFIX/zlib-1.2.11 \ ---with-szlib=$INSTALL_PREFIX/szip-2.1.1 \ ---with-hdf4=$INSTALL_PREFIX/hdf4-4.2.13 \ ---enable-install-include \ ---with-pic \ -CC="$INSTALL_PREFIX/hdf4-4.2.13/bin/h4cc" \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -CXX="$GCC_PATH/bin/g++" \ -CXXFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77="$GCC_PATH/bin/gfortran" \ -FFLAGS="-m64 -fPIC -pthread -s -ffixed-line-length-132 -mcmodel=large -fdec-structure -fdec -mlarge-data-threshold=90000000" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,hdf-eos2-20v1.00.map" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls $INSTALL_PREFIX/hdfeos2.20v1.00" -ls $INSTALL_PREFIX/hdfeos2.20v1.00 diff --git a/base/scripts/hdfeos5.1.16.sh b/base/scripts/hdfeos5.1.16.sh deleted file mode 100755 index bb5ea25..0000000 --- a/base/scripts/hdfeos5.1.16.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# wget https://observer.gsfc.nasa.gov/ftp/edhs/hdfeos5/latest_release/HDF-EOS5.1.16.tar.Z -# -tar zxf $SOURCES_PATH/HDF-EOS5.1.16.tar.Z -mv hdfeos5 hdfeos5.1.16 -cd hdfeos5.1.16 -export LD_LIBRARY_PATH=$INSTALL_PREFIX/szip-2.1.1/lib -./configure --prefix="$INSTALL_PREFIX/hdfeos5.1.16" \ ---libdir="$INSTALL_PREFIX/hdfeos5.1.16/lib/linux64" \ ---with-hdf5=$INSTALL_PREFIX/hdf5-1.8.19 \ ---with-zlib=$INSTALL_PREFIX/zlib-1.2.11 \ ---with-szlib=$INSTALL_PREFIX/szip-2.1.1 \ ---enable-install-include \ -CC=$INSTALL_PREFIX/hdf5-1.8.19/bin/h5cc \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77=$GCC_PATH/bin/gfortran \ -FFLAGS="-m64 -fPIC -pthread -s -ffixed-line-length-132 -mcmodel=large -fdec-structure -fdec -mlarge-data-threshold=90000000 -fno-underscoring -fno-second-underscore" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,hdfeos5.1.16.map" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/hdfeos5.1.16" -ls -l $INSTALL_PREFIX/hdfeos5.1.16 diff --git a/base/scripts/jasper-1.900.1.sh b/base/scripts/jasper-1.900.1.sh deleted file mode 100755 index 5ddb7e8..0000000 --- a/base/scripts/jasper-1.900.1.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -# http://www.linuxfromscratch.org/blfs/view/7.10/general/jasper.html -# wget http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip -# http://www.linuxfromscratch.org/patches/blfs/7.10/jasper-1.900.1-security_fixes-2.patch -# -unzip -q $SOURCES_PATH/jasper-1.900.1.zip -chmod 755 jasper-1.900.1 -cd jasper-1.900.1 -patch -Np1 -i $SOURCES_PATH/jasper-1.900.1-security_fixes-2.patch -./configure --prefix=$INSTALL_PREFIX/jasper-1.900.1 \ - --enable-shared \ - --enable-static \ - --mandir=$INSTALL_PREFIX/jasper-1.900.1/share/man \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/jasper-1.900.1" -ls -l $INSTALL_PREFIX/jasper-1.900.1 -echo diff --git a/base/scripts/jpeg-9b.sh b/base/scripts/jpeg-9b.sh deleted file mode 100755 index 48ba130..0000000 --- a/base/scripts/jpeg-9b.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz -# -tar zxf $SOURCES_PATH/jpegsrc.v9b.tar.gz -cd jpeg-9b -./configure --prefix=$INSTALL_PREFIX/jpeg-9b \ ---enable-static --enable-shared \ -CC=$GCC_PATH/bin/gcc \ -FLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/jpeg-9b" -ls -l $INSTALL_PREFIX/jpeg-9b diff --git a/base/scripts/lapack-3.5.0.sh b/base/scripts/lapack-3.5.0.sh deleted file mode 100755 index cb42c73..0000000 --- a/base/scripts/lapack-3.5.0.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# wget http://www.netlib.org/lapack/lapack-3.5.0.tgz -# -tar zxf $SOURCES_PATH/lapack-3.5.0.tgz -cd lapack-3.5.0 -export CC=$GCC_PATH/bin/gcc -export CXX=$GCC_PATH/bin/g++ -export FC=$GCC_PATH/bin/gfortran -cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX/lapack-3.5.0 \ --DCMAKE_Fortran_FLAGS=-mcmodel=large -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/lapack-3.5.0" -ls -l $INSTALL_PREFIX/lapack-3.5.0 -echo diff --git a/base/scripts/libgeotiff-1.4.0.sh b/base/scripts/libgeotiff-1.4.0.sh deleted file mode 100755 index 02858e6..0000000 --- a/base/scripts/libgeotiff-1.4.0.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# https://download.osgeo.org/geotiff/libgeotiff/ -# -tar zxf $SOURCES_PATH/libgeotiff-1.4.0.tar.gz -cd libgeotiff-1.4.0 -./configure --prefix=$INSTALL_PREFIX/libgeotiff-1.4.0 \ ---with-proj=$INSTALL_PREFIX/proj-4.8.0 \ ---with-libtiff=$INSTALL_PREFIX/tiff-4.0.6 \ ---with-jpeg \ ---with-zip \ ---enable-static --enable-shared \ -CC=$GCC_PATH/bin/gcc \ -FLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/libgeotiff-1.4.0" -ls -l $INSTALL_PREFIX/libgeotiff-1.4.0 -echo diff --git a/base/scripts/netcdf-c-4.7.4.sh b/base/scripts/netcdf-c-4.7.4.sh deleted file mode 100755 index 1598b29..0000000 --- a/base/scripts/netcdf-c-4.7.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# -# https://www.unidata.ucar.edu/downloads/netcdf/ -# https://github.com/Unidata/netcdf-c/releases -# https://github.com/Unidata/netcdf-c/releases/tag/v4.7.4 -# wget https://github.com/Unidata/netcdf-c/archive/v4.7.4.tar.gz -O netcdf-c-4.7.4.tar.gz -# -tar zxf $SOURCES_PATH/netcdf-c-4.7.4.tar.gz -cd netcdf-c-4.7.4 -./configure --prefix="$INSTALL_PREFIX/netcdf-c-4.7.4" \ ---disable-dap --enable-netcdf-4 --enable-shared \ ---with-pic \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000 \ - -I$INSTALL_PREFIX/hdf5-1.8.16/include" \ -CXX=$GCC_PATH/bin/g++ \ -CXXFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000 \ - -I$INSTALL_PREFIX/hdf5-1.8.16/include" \ -CPP="$GCC_PATH/bin/g++ -E" \ -CPPFLAGS="-I$INSTALL_PREFIX/zlib-1.2.11/include -I$INSTALL_PREFIX/hdf5-1.8.16/include" \ -LDFLAGS="-m64 -pthread -fPIC -Wl,-Map,netcdf-4.4.1.map \ - -L$INSTALL_PREFIX/hdf5-1.8.16/lib \ - -L$INSTALL_PREFIX/zlib-1.2.11/lib" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/netcdf-c-4.7.4" -ls -l $INSTALL_PREFIX/netcdf-c-4.7.4 diff --git a/base/scripts/netcdf-cxx4-4.3.1.sh b/base/scripts/netcdf-cxx4-4.3.1.sh deleted file mode 100755 index af64f07..0000000 --- a/base/scripts/netcdf-cxx4-4.3.1.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# https://www.unidata.ucar.edu/downloads/netcdf/ -# https://github.com/Unidata/netcdf-cxx4/releases -# https://github.com/Unidata/netcdf-cxx4/releases/tag/v4.3.1 -# wget https://github.com/Unidata/netcdf-cxx4/archive/v4.3.1.tar.gz -O netcdf-cxx4-4.3.1.tar.gz - -tar zxf $SOURCES_PATH/netcdf-cxx4-4.3.1.tar.gz -cd netcdf-cxx4-4.3.1 -LD_LIBRARY_PATH="$INSTALL_PREFIX/netcdf-c-4.7.4/lib" -./configure --prefix=$INSTALL_PREFIX/netcdf-cxx4-4.3.1 \ -CC="$GCC_PATH/bin/gcc" \ -CCFLAGS=-I$INSTALL_PREFIX/netcdf-c-4.7.4/include \ -CXX="$GCC_PATH/bin/g++" \ -CXXFLAGS=-I$INSTALL_PREFIX/netcdf-c-4.7.4/include \ -CPP="$GCC_PATH/bin/g++ -E" \ -CPPFLAGS="-I$INSTALL_PREFIX/netcdf-c-4.7.4/include -I$INSTALL_PREFIX/hdf5-1.8.16/include" \ -LDFLAGS="-L/$INSTALL_PREFIX/netcdf-c-4.7.4/lib -L$INSTALL_PREFIX/hdf5-1.8.16/lib" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/netcdf-cxx4-4.3.1" -ls -l $INSTALL_PREFIX/netcdf-cxx4-4.3.1 diff --git a/base/scripts/netcdf-fortran-4.4.5.sh b/base/scripts/netcdf-fortran-4.4.5.sh deleted file mode 100755 index 3357b12..0000000 --- a/base/scripts/netcdf-fortran-4.4.5.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# https://github.com/Unidata/netcdf-fortran/releases -# https://github.com/Unidata/netcdf-fortran/releases/tag/v4.4.5 -# wget https://github.com/Unidata/netcdf-fortran/archive/v4.4.5.tar.gz -O netcdf-fortran-4.4.5.tar.gz -# -# diff -u configure configure.new > netcdf-fortran-4.4.5.patch -# -# nm $INSTALL_PREFIX/netcdf-fortran-4.4.5/lib/libnetcdff.a | grep nf_def_grp -# - -tar zxf $SOURCES_PATH/netcdf-fortran-4.4.5.tar.gz -cd netcdf-fortran-4.4.5 -patch < $SOURCES_PATH/netcdf-fortran-4.4.5.patch -./configure --prefix=$INSTALL_PREFIX/netcdf-fortran-4.4.5 \ -CC="$GCC_PATH/bin/gcc" \ -CXX="$GCC_PATH/bin/g++" \ -CPP="$GCC_PATH/bin/g++ -E" \ -CPPFLAGS=-I$INSTALL_PREFIX/netcdf-c-4.7.4/include \ -FC="$GCC_PATH/bin/gfortran" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/netcdf-fortran-4.4.5" -ls -l $INSTALL_PREFIX/netcdf-fortran-4.4.5 diff --git a/base/scripts/proj-4.8.0.sh b/base/scripts/proj-4.8.0.sh deleted file mode 100755 index 93e2977..0000000 --- a/base/scripts/proj-4.8.0.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# wget https://download.osgeo.org/proj/proj-4.8.0.tar.gz -# -tar zxf $SOURCES_PATH/proj-4.8.0.tar.gz -cd proj-4.8.0 -./configure --prefix=$INSTALL_PREFIX/proj-4.8.0 -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/proj-4.8.0" -ls -l $INSTALL_PREFIX/proj-4.8.0 diff --git a/base/scripts/sdptk5.2.20v1.01.sh b/base/scripts/sdptk5.2.20v1.01.sh deleted file mode 100755 index a2d0c1a..0000000 --- a/base/scripts/sdptk5.2.20v1.01.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# wget https://observer.gsfc.nasa.gov/ftp/edhs/sdptk/latest_release/SDPTK5.2.20v1.01.tar.Z -# -# see sdptk5.2.20v1.01.txt -# fix PGSHOME in $INSTALL_PREFIX/sdptk5.2.20v1.01/TOOLKIT/bin/linux/pgs-env.csh -# confirm with nm $INSTALL_PREFIX/sdptk5.2.20v1.01/TOOLKIT/lib/linux64/libPGSTK.a | grep PGS_EPH_getToken -# -mkdir -p $INSTALL_PREFIX/sdptk5.2.20v1.01/TOOLKIT -tar zxf $SOURCES_PATH/SDPTK5.2.20v1.01.tar.Z -cd TOOLKIT -./bin/INSTALL \ --pgshome "$INSTALL_PREFIX/sdptk5.2.20v1.01/TOOLKIT" \ --log sdptk.log \ --hdfhome "$INSTALL_PREFIX/hdf4-4.2.13" \ --hdf5home "$INSTALL_PREFIX/hdf5-1.8.19" \ --hdfeos_home "$INSTALL_PREFIX/hdfeos2.20v1.00" \ --hdfeos5_home "$INSTALL_PREFIX/hdfeos5.1.16" \ --netcdfhome "$INSTALL_PREFIX/netcdf-c-4.7.4" \ --fc_path "$GCC_PATH/bin/gfortran" \ --cc_path "$GCC_PATH/bin/gcc" \ --cpp_path "$GCC_PATH/bin/g++" \ --cc_flags "-m64 -fPIC -pthread -s -m128bit-long-double -mcmodel=large -mlarge-data-threshold=90000000 -I$INSTALL_PREFIX/zlib-1.2.11/include" \ --cpp_flags "-m64 -fPIC -pthread -s -m128bit-long-double -mcmodel=large -mlarge-data-threshold=90000000 -I$INSTALL_PREFIX/zlib-1.2.11/include" \ --fc_flags "-ff2c -m64 -fPIC -pthread -s -m128bit-long-double -fdec-structure -fdec -mcmodel=large -mlarge-data-threshold=90000000" \ --c_rlib < $SCRIPTS_PATH/sdptk5.2.20v1.01.txt -cd .. -cp -a TOOLKIT $INSTALL_PREFIX/sdptk5.2.20v1.01 diff --git a/base/scripts/sdptk5.2.20v1.01.txt b/base/scripts/sdptk5.2.20v1.01.txt deleted file mode 100644 index 4d283ee..0000000 --- a/base/scripts/sdptk5.2.20v1.01.txt +++ /dev/null @@ -1,13 +0,0 @@ -lnx64 -yes -yes -/opt/packages/zlib-1.2.11 -yes -/opt/packages/jpeg-9b -yes -/opt/packages/szip-2.1.1 -yes -yes -yes -yes -yes diff --git a/base/scripts/szip-2.1.1.sh b/base/scripts/szip-2.1.1.sh deleted file mode 100755 index 43889ee..0000000 --- a/base/scripts/szip-2.1.1.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# wget https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz -# -tar zxf $SOURCES_PATH/szip-2.1.1.tar.gz -cd szip-2.1.1 -./configure --prefix=$INSTALL_PREFIX/szip-2.1.1 \ ---enable-static --enable-shared \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77=$GCC_PATH/bin/gfortran \ -FFLAGS="-O -fPIC -pthread -m64 -ffixed-line-length-132 -mcmodel=large \ - -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/szip-2.1.1" -ls -l $INSTALL_PREFIX/szip-2.1.1 diff --git a/base/scripts/tiff-4.0.6.sh b/base/scripts/tiff-4.0.6.sh deleted file mode 100755 index 959ef00..0000000 --- a/base/scripts/tiff-4.0.6.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# http://www.linuxfromscratch.org/blfs/view/7.10/general/libtiff.html -# -tar zxf $SOURCES_PATH/tiff-4.0.6.tar.gz -cd tiff-4.0.6 -sed -i "/seems to be moved/s/^/#/" config/ltmain.sh -./configure --prefix=$INSTALL_PREFIX/tiff-4.0.6 \ ---enable-static --enable-shared \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "ls -l $INSTALL_PREFIX/tiff-4.0.6" -ls -l $INSTALL_PREFIX/tiff-4.0.6 -echo diff --git a/base/scripts/tinyxml-2.6.2.sh b/base/scripts/tinyxml-2.6.2.sh deleted file mode 100755 index 9abbe3e..0000000 --- a/base/scripts/tinyxml-2.6.2.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/ -# -mkdir -p $INSTALL_PREFIX/tinyxml-2.6.2/{include,lib,share,bin} -tar zxf $SOURCES_PATH/tinyxml-2.6.2.tar.gz -cd tinyxml-2.6.2 -make -j $NUM_COMPILE_JOBS -ar cr libtinyxml.a *o -cp -a *.a $INSTALL_PREFIX/tinyxml-2.6.2/lib -cp -a *.h *.cpp $INSTALL_PREFIX/tinyxml-2.6.2/include -cp -a docs $INSTALL_PREFIX/tinyxml-2.6.2/share -cp -a xmltest $INSTALL_PREFIX/tinyxml-2.6.2/bin -echo -echo "$ ls -l $INSTALL_PREFIX/tinyxml-2.6.2/" -ls -l $INSTALL_PREFIX/tinyxml-2.6.2/ -echo diff --git a/base/scripts/xerces-3.1.2.sh b/base/scripts/xerces-3.1.2.sh deleted file mode 100755 index 7f1c77b..0000000 --- a/base/scripts/xerces-3.1.2.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# -# wget https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.2.tar.gz -# -tar zxf $SOURCES_PATH/xerces-c-3.1.2.tar.gz -cd xerces-c-3.1.2 -./configure --prefix=$INSTALL_PREFIX/xerces-3.1.2 \ ---enable-static --enable-shared \ ---without-icu \ ---disable-network \ -CC=$GCC_PATH/bin/gcc \ -CFLAGS="-m64 -fPIC -pthread -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" \ -F77=$GCC_PATH/bin/gfortran \ -FFLAGS="-O -fPIC -pthread -m64 -ffixed-line-length-132 -mcmodel=large \ - -fdec-structure -fdec -mlarge-data-threshold=90000000" -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/xerces-3.1.2" -ls -l $INSTALL_PREFIX/xerces-3.1.2 -echo diff --git a/base/scripts/zlib-1.2.11.sh b/base/scripts/zlib-1.2.11.sh deleted file mode 100755 index d6f9570..0000000 --- a/base/scripts/zlib-1.2.11.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# wget https://www.zlib.net/fossils/zlib-1.2.11.tar.gz -# -tar zxf $SOURCES_PATH/zlib-1.2.11.tar.gz -cd zlib-1.2.11 -CC="/opt/gcc/gcc-8.2.0/bin/gcc" \ -CFLAGS="-m64 -fPIC -pthread -s -mcmodel=large -Wall -Wno-unused-variable \ - -Wmissing-prototypes -Wmissing-declarations -m128bit-long-double -mlarge-data-threshold=90000000" -./configure --prefix=$INSTALL_PREFIX/zlib-1.2.11 \ --64 -make -j $NUM_COMPILE_JOBS -make install -echo -echo "$ ls -l $INSTALL_PREFIX/zlib-1.2.11" -ls -l $INSTALL_PREFIX/zlib-1.2.11 diff --git a/base/sources/BUFRLIB_v11-3-0.tar.gz b/base/sources/BUFRLIB_v11-3-0.tar.gz deleted file mode 100644 index ecd8a8c..0000000 --- a/base/sources/BUFRLIB_v11-3-0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6140449aa4fe2b86aab938c6977a139c637cc05254fe4c46d8b0ef25c3837a4d -size 271073 diff --git a/base/sources/HDF-EOS2.20v1.00.tar.Z b/base/sources/HDF-EOS2.20v1.00.tar.Z deleted file mode 100644 index 5db38ad..0000000 --- a/base/sources/HDF-EOS2.20v1.00.tar.Z +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb0f900d2732ab01e51284d6c9e90d0e852d61bba9bce3b43af0430ab5414903 -size 7699996 diff --git a/base/sources/HDF-EOS5.1.16.tar.Z b/base/sources/HDF-EOS5.1.16.tar.Z deleted file mode 100644 index b48f12f..0000000 --- a/base/sources/HDF-EOS5.1.16.tar.Z +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7054de24b90b6d9533329ef8dc89912c5227c83fb447792103279364e13dd452 -size 8280847 diff --git a/base/sources/SDPTK5.2.20v1.01.tar.Z b/base/sources/SDPTK5.2.20v1.01.tar.Z deleted file mode 100644 index fafcf96..0000000 --- a/base/sources/SDPTK5.2.20v1.01.tar.Z +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a7ccbb33de2fddf1bafb718cd2d57b9f7ea0416cd80ccb4cf03bd1ec9080d96b -size 25269299 diff --git a/base/sources/blitz-1.0.1.tar.gz b/base/sources/blitz-1.0.1.tar.gz deleted file mode 100644 index bd89268..0000000 --- a/base/sources/blitz-1.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b62fc3f07b64b264307b01fec5e4f2793e09a68dcb5378984aedbc2e4b3adcef -size 4645082 diff --git a/base/sources/blitz-python2.patch b/base/sources/blitz-python2.patch deleted file mode 100644 index cb79e60..0000000 --- a/base/sources/blitz-python2.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -ur blitz-1.0.1/blitz/generate/genstencils.py blitz-1.0.1.py2/blitz/generate/genstencils.py ---- blitz-1.0.1/blitz/generate/genstencils.py 2017-10-02 18:04:43.000000000 +0200 -+++ blitz-1.0.1.py2/blitz/generate/genstencils.py 2019-07-16 14:06:42.460447316 +0200 -@@ -1,4 +1,4 @@ --#!/bin/env python -+#!/usr/bin/python2 - - # Generates stencil code. This replaces the macros in stencil-et.h, - # which make it impossible to debug the generated code. -diff -ur blitz-1.0.1/blitz/generate/Makefile.am blitz-1.0.1.py2/blitz/generate/Makefile.am ---- blitz-1.0.1/blitz/generate/Makefile.am 2017-10-02 18:04:43.000000000 +0200 -+++ blitz-1.0.1.py2/blitz/generate/Makefile.am 2019-07-16 14:05:50.761644402 +0200 -@@ -9,7 +9,7 @@ - EXTRA_PROGRAMS = - - $(top_srcdir)/blitz/array/stencil-classes.cc: genstencils.py -- python $< $@ -+ python2 $< $@ - - generate-headers: $(top_srcdir)/blitz/array/stencil-classes.cc - -diff -ur blitz-1.0.1/blitz/generate/Makefile.in blitz-1.0.1.py2/blitz/generate/Makefile.in ---- blitz-1.0.1/blitz/generate/Makefile.in 2017-10-02 18:04:43.000000000 +0200 -+++ blitz-1.0.1.py2/blitz/generate/Makefile.in 2019-07-16 14:06:10.073944335 +0200 -@@ -619,7 +619,7 @@ - - - $(top_srcdir)/blitz/array/stencil-classes.cc: genstencils.py -- python $< $@ -+ python2 $< $@ - - generate-headers: $(top_srcdir)/blitz/array/stencil-classes.cc - -diff -ur blitz-1.0.1/blitz/generate/makeloops.py blitz-1.0.1.py2/blitz/generate/makeloops.py ---- blitz-1.0.1/blitz/generate/makeloops.py 2017-10-02 18:04:43.000000000 +0200 -+++ blitz-1.0.1.py2/blitz/generate/makeloops.py 2019-07-16 14:06:25.665186477 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - # python version of the makeloops.cpp that generates the benchmark - # loops. diff --git a/base/sources/boost_1_58_0.tar.gz b/base/sources/boost_1_58_0.tar.gz deleted file mode 100644 index c992276..0000000 --- a/base/sources/boost_1_58_0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a004d9b3fa95e956383693b86fce1b68805a6f71c2e68944fa813de0fb8c8102 -size 83581760 diff --git a/base/sources/bufrlib-11.3.0.patch b/base/sources/bufrlib-11.3.0.patch deleted file mode 100644 index 77b03c7..0000000 --- a/base/sources/bufrlib-11.3.0.patch +++ /dev/null @@ -1,3 +0,0 @@ -2a3,4 -> CC=/opt/gcc/gcc-8.2.0/bin/gcc -> diff --git a/base/sources/coda-2.21.tar.gz b/base/sources/coda-2.21.tar.gz deleted file mode 100644 index 9da03fd..0000000 --- a/base/sources/coda-2.21.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8a5f16a74354c6d0d7dcabce6cd7e9fad3c1e38d04b8ea47cec28c2b3e2fd52 -size 1785763 diff --git a/base/sources/coda_zlib_mangle.h.patch b/base/sources/coda_zlib_mangle.h.patch deleted file mode 100644 index ab17969..0000000 --- a/base/sources/coda_zlib_mangle.h.patch +++ /dev/null @@ -1,5 +0,0 @@ -12a13,16 -> #define inflateValidate coda_inflateValidate -> #define inflateCodesUsed coda_inflateCodesUsed -> #define adler32_z coda_adler32_z -> #define crc32_z coda_crc32_z diff --git a/base/sources/cxxtest-4.4.tar.gz b/base/sources/cxxtest-4.4.tar.gz deleted file mode 100644 index 8786608..0000000 --- a/base/sources/cxxtest-4.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8 -size 330076 diff --git a/base/sources/g2clib-1.4.0.tar.gz b/base/sources/g2clib-1.4.0.tar.gz deleted file mode 100644 index 599693c..0000000 --- a/base/sources/g2clib-1.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1ee2012b57269f8d993eb335022bed65bcd2633e9dfa20b891de18b8f3562bf -size 83745 diff --git a/base/sources/gcc-8.2.0.tar.gz b/base/sources/gcc-8.2.0.tar.gz deleted file mode 100644 index 5e1d4ff..0000000 --- a/base/sources/gcc-8.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b0f36be1045ff58cbb9c83743835367b860810f17f0195a4e093458b372020f -size 113811063 diff --git a/base/sources/grib_api-1.9.18.tar.gz b/base/sources/grib_api-1.9.18.tar.gz deleted file mode 100644 index 04394b7..0000000 --- a/base/sources/grib_api-1.9.18.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13f02a48eac0fe59efde05d7ab33c44334b35f88cf259a92bd78ee5978b8a092 -size 6611700 diff --git a/base/sources/hdf-4.2.13.tar.gz b/base/sources/hdf-4.2.13.tar.gz deleted file mode 100644 index 40fe7a7..0000000 --- a/base/sources/hdf-4.2.13.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be9813c1dc3712c2df977d4960e1f13f20f447dfa8c3ce53331d610c1f470483 -size 4418314 diff --git a/base/sources/hdf5-1.8.16.tar.gz b/base/sources/hdf5-1.8.16.tar.gz deleted file mode 100644 index 509e689..0000000 --- a/base/sources/hdf5-1.8.16.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed17178abd9928a7237f30370189ba767b9e39e0db45917c2ac4665eb9cb4771 -size 12272400 diff --git a/base/sources/hdf5-1.8.19.tar.gz b/base/sources/hdf5-1.8.19.tar.gz deleted file mode 100644 index 1e8d012..0000000 --- a/base/sources/hdf5-1.8.19.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4335849f19fae88c264fd0df046bc321a78c536b2548fc508627a790564dc38 -size 12396238 diff --git a/base/sources/jasper-1.900.1-security_fixes-2.patch b/base/sources/jasper-1.900.1-security_fixes-2.patch deleted file mode 100644 index 0019a2a..0000000 --- a/base/sources/jasper-1.900.1-security_fixes-2.patch +++ /dev/null @@ -1,1302 +0,0 @@ -Submitted By: Armin K. -Date: 2015-01-28 -Initial Package Version: 1.900.1 -Upstream Status: Unknown -Origin: Archlinux -Description: Fixes multiple security issues, including: - CVE-2008-3520, CVE-2008-3522, CVE-2011-4516, CVE-2011-4517, - CVE-2014-8137, CVE-2014-8138, CVE-2014-8157, CVE-2014-8158 and - CVE-2014-9029. Filename buffer overflow and Stepsizes overflow. - ---- a/src/libjasper/base/jas_cm.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_cm.c 2015-01-28 17:57:34.114045370 +0100 -@@ -704,8 +704,7 @@ - { - jas_cmpxform_t **p; - assert(n >= pxformseq->numpxforms); -- p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) : -- jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *)); -+ p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *)); - if (!p) { - return -1; - } -@@ -889,13 +888,13 @@ - jas_cmshapmatlut_cleanup(lut); - if (curv->numents == 0) { - lut->size = 2; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - lut->data[0] = 0.0; - lut->data[1] = 1.0; - } else if (curv->numents == 1) { - lut->size = 256; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - gamma = curv->ents[0] / 256.0; - for (i = 0; i < lut->size; ++i) { -@@ -903,7 +902,7 @@ - } - } else { - lut->size = curv->numents; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - for (i = 0; i < lut->size; ++i) { - lut->data[i] = curv->ents[i] / 65535.0; -@@ -953,7 +952,7 @@ - return -1; - } - } -- if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t)))) -+ if (!(invlut->data = jas_alloc2(n, sizeof(jas_cmreal_t)))) - return -1; - invlut->size = n; - for (i = 0; i < invlut->size; ++i) { ---- a/src/libjasper/base/jas_icc.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_icc.c 2015-01-28 17:58:32.874025377 +0100 -@@ -373,7 +373,7 @@ - jas_icctagtab_t *tagtab; - - tagtab = &prof->tagtab; -- if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs * -+ if (!(tagtab->ents = jas_alloc2(prof->attrtab->numattrs, - sizeof(jas_icctagtabent_t)))) - goto error; - tagtab->numents = prof->attrtab->numattrs; -@@ -522,7 +522,7 @@ - } - if (jas_iccgetuint32(in, &tagtab->numents)) - goto error; -- if (!(tagtab->ents = jas_malloc(tagtab->numents * -+ if (!(tagtab->ents = jas_alloc2(tagtab->numents, - sizeof(jas_icctagtabent_t)))) - goto error; - tagtabent = tagtab->ents; -@@ -743,8 +743,7 @@ - { - jas_iccattr_t *newattrs; - assert(maxents >= tab->numattrs); -- newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents * -- sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t)); -+ newattrs = jas_realloc2(tab->attrs, maxents, sizeof(jas_iccattr_t)); - if (!newattrs) - return -1; - tab->attrs = newattrs; -@@ -999,7 +998,7 @@ - - if (jas_iccgetuint32(in, &curv->numents)) - goto error; -- if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t)))) -+ if (!(curv->ents = jas_alloc2(curv->numents, sizeof(jas_iccuint16_t)))) - goto error; - for (i = 0; i < curv->numents; ++i) { - if (jas_iccgetuint16(in, &curv->ents[i])) -@@ -1011,7 +1010,6 @@ - return 0; - - error: -- jas_icccurv_destroy(attrval); - return -1; - } - -@@ -1100,7 +1098,7 @@ - if (jas_iccgetuint32(in, &txtdesc->uclangcode) || - jas_iccgetuint32(in, &txtdesc->uclen)) - goto error; -- if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2))) -+ if (!(txtdesc->ucdata = jas_alloc2(txtdesc->uclen, 2))) - goto error; - if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) != - JAS_CAST(int, txtdesc->uclen * 2)) -@@ -1129,7 +1127,6 @@ - #endif - return 0; - error: -- jas_icctxtdesc_destroy(attrval); - return -1; - } - -@@ -1208,8 +1205,6 @@ - goto error; - return 0; - error: -- if (txt->string) -- jas_free(txt->string); - return -1; - } - -@@ -1292,17 +1287,17 @@ - jas_iccgetuint16(in, &lut8->numouttabents)) - goto error; - clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans; -- if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) || -- !(lut8->intabsbuf = jas_malloc(lut8->numinchans * -- lut8->numintabents * sizeof(jas_iccuint8_t))) || -- !(lut8->intabs = jas_malloc(lut8->numinchans * -+ if (!(lut8->clut = jas_alloc2(clutsize, sizeof(jas_iccuint8_t))) || -+ !(lut8->intabsbuf = jas_alloc3(lut8->numinchans, -+ lut8->numintabents, sizeof(jas_iccuint8_t))) || -+ !(lut8->intabs = jas_alloc2(lut8->numinchans, - sizeof(jas_iccuint8_t *)))) - goto error; - for (i = 0; i < lut8->numinchans; ++i) - lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents]; -- if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans * -- lut8->numouttabents * sizeof(jas_iccuint8_t))) || -- !(lut8->outtabs = jas_malloc(lut8->numoutchans * -+ if (!(lut8->outtabsbuf = jas_alloc3(lut8->numoutchans, -+ lut8->numouttabents, sizeof(jas_iccuint8_t))) || -+ !(lut8->outtabs = jas_alloc2(lut8->numoutchans, - sizeof(jas_iccuint8_t *)))) - goto error; - for (i = 0; i < lut8->numoutchans; ++i) -@@ -1330,7 +1325,6 @@ - goto error; - return 0; - error: -- jas_icclut8_destroy(attrval); - return -1; - } - -@@ -1461,17 +1455,17 @@ - jas_iccgetuint16(in, &lut16->numouttabents)) - goto error; - clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans; -- if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) || -- !(lut16->intabsbuf = jas_malloc(lut16->numinchans * -- lut16->numintabents * sizeof(jas_iccuint16_t))) || -- !(lut16->intabs = jas_malloc(lut16->numinchans * -+ if (!(lut16->clut = jas_alloc2(clutsize, sizeof(jas_iccuint16_t))) || -+ !(lut16->intabsbuf = jas_alloc3(lut16->numinchans, -+ lut16->numintabents, sizeof(jas_iccuint16_t))) || -+ !(lut16->intabs = jas_alloc2(lut16->numinchans, - sizeof(jas_iccuint16_t *)))) - goto error; - for (i = 0; i < lut16->numinchans; ++i) - lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents]; -- if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans * -- lut16->numouttabents * sizeof(jas_iccuint16_t))) || -- !(lut16->outtabs = jas_malloc(lut16->numoutchans * -+ if (!(lut16->outtabsbuf = jas_alloc3(lut16->numoutchans, -+ lut16->numouttabents, sizeof(jas_iccuint16_t))) || -+ !(lut16->outtabs = jas_alloc2(lut16->numoutchans, - sizeof(jas_iccuint16_t *)))) - goto error; - for (i = 0; i < lut16->numoutchans; ++i) -@@ -1499,7 +1493,6 @@ - goto error; - return 0; - error: -- jas_icclut16_destroy(attrval); - return -1; - } - ---- a/src/libjasper/base/jas_image.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_image.c 2015-01-28 17:57:34.116045403 +0100 -@@ -142,7 +142,7 @@ - image->inmem_ = true; - - /* Allocate memory for the per-component information. */ -- if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ * -+ if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_, - sizeof(jas_image_cmpt_t *)))) { - jas_image_destroy(image); - return 0; -@@ -774,8 +774,7 @@ - jas_image_cmpt_t **newcmpts; - int cmptno; - -- newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) : -- jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *)); -+ newcmpts = jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *)); - if (!newcmpts) { - return -1; - } ---- a/src/libjasper/base/jas_malloc.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_malloc.c 2015-01-28 17:57:34.116045403 +0100 -@@ -76,6 +76,9 @@ - - /* We need the prototype for memset. */ - #include -+#include -+#include -+#include - - #include "jasper/jas_malloc.h" - -@@ -113,18 +116,50 @@ - - void *jas_realloc(void *ptr, size_t size) - { -- return realloc(ptr, size); -+ return ptr ? realloc(ptr, size) : malloc(size); - } - --void *jas_calloc(size_t nmemb, size_t size) -+void *jas_realloc2(void *ptr, size_t nmemb, size_t size) -+{ -+ if (!ptr) -+ return jas_alloc2(nmemb, size); -+ if (nmemb && SIZE_MAX / nmemb < size) { -+ errno = ENOMEM; -+ return NULL; -+ } -+ return jas_realloc(ptr, nmemb * size); -+ -+} -+ -+void *jas_alloc2(size_t nmemb, size_t size) -+{ -+ if (nmemb && SIZE_MAX / nmemb < size) { -+ errno = ENOMEM; -+ return NULL; -+ } -+ -+ return jas_malloc(nmemb * size); -+} -+ -+void *jas_alloc3(size_t a, size_t b, size_t c) - { -- void *ptr; - size_t n; -- n = nmemb * size; -- if (!(ptr = jas_malloc(n * sizeof(char)))) { -- return 0; -+ -+ if (a && SIZE_MAX / a < b) { -+ errno = ENOMEM; -+ return NULL; - } -- memset(ptr, 0, n); -+ -+ return jas_alloc2(a*b, c); -+} -+ -+void *jas_calloc(size_t nmemb, size_t size) -+{ -+ void *ptr; -+ -+ ptr = jas_alloc2(nmemb, size); -+ if (ptr) -+ memset(ptr, 0, nmemb*size); - return ptr; - } - ---- a/src/libjasper/base/jas_seq.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_seq.c 2015-01-28 17:57:34.116045403 +0100 -@@ -114,7 +114,7 @@ - matrix->datasize_ = numrows * numcols; - - if (matrix->maxrows_ > 0) { -- if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ * -+ if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_, - sizeof(jas_seqent_t *)))) { - jas_matrix_destroy(matrix); - return 0; -@@ -122,7 +122,7 @@ - } - - if (matrix->datasize_ > 0) { -- if (!(matrix->data_ = jas_malloc(matrix->datasize_ * -+ if (!(matrix->data_ = jas_alloc2(matrix->datasize_, - sizeof(jas_seqent_t)))) { - jas_matrix_destroy(matrix); - return 0; -@@ -220,7 +220,7 @@ - mat0->numrows_ = r1 - r0 + 1; - mat0->numcols_ = c1 - c0 + 1; - mat0->maxrows_ = mat0->numrows_; -- mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *)); -+ mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)); - for (i = 0; i < mat0->numrows_; ++i) { - mat0->rows_[i] = mat1->rows_[r0 + i] + c0; - } ---- a/src/libjasper/base/jas_stream.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/base/jas_stream.c 2015-01-28 17:57:57.483434550 +0100 -@@ -212,7 +212,7 @@ - if (buf) { - obj->buf_ = (unsigned char *) buf; - } else { -- obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char)); -+ obj->buf_ = jas_malloc(obj->bufsize_); - obj->myalloc_ = 1; - } - if (!obj->buf_) { -@@ -553,7 +553,7 @@ - int ret; - - va_start(ap, fmt); -- ret = vsprintf(buf, fmt, ap); -+ ret = vsnprintf(buf, sizeof buf, fmt, ap); - jas_stream_puts(stream, buf); - va_end(ap); - return ret; -@@ -992,7 +992,7 @@ - unsigned char *buf; - - assert(m->buf_); -- if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) { -+ if (!(buf = jas_realloc(m->buf_, bufsize))) { - return -1; - } - m->buf_ = buf; ---- a/src/libjasper/bmp/bmp_dec.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/bmp/bmp_dec.c 2015-01-28 17:57:34.117045420 +0100 -@@ -283,7 +283,7 @@ - } - - if (info->numcolors > 0) { -- if (!(info->palents = jas_malloc(info->numcolors * -+ if (!(info->palents = jas_alloc2(info->numcolors, - sizeof(bmp_palent_t)))) { - bmp_info_destroy(info); - return 0; ---- a/src/libjasper/include/jasper/jas_malloc.h 2007-01-19 22:43:04.000000000 +0100 -+++ b/src/libjasper/include/jasper/jas_malloc.h 2015-01-28 17:57:34.118045437 +0100 -@@ -95,6 +95,9 @@ - #define jas_free MEMFREE - #define jas_realloc MEMREALLOC - #define jas_calloc MEMCALLOC -+#define jas_alloc2(a, b) MEMALLOC((a)*(b)) -+#define jas_alloc3(a, b, c) MEMALLOC((a)*(b)*(c)) -+#define jas_realloc2(p, a, b) MEMREALLOC((p), (a)*(b)) - #endif - - /******************************************************************************\ -@@ -115,6 +118,12 @@ - /* Allocate a block of memory and initialize the contents to zero. */ - void *jas_calloc(size_t nmemb, size_t size); - -+/* size-checked double allocation .*/ -+void *jas_alloc2(size_t, size_t); -+ -+void *jas_alloc3(size_t, size_t, size_t); -+ -+void *jas_realloc2(void *, size_t, size_t); - #endif - - #ifdef __cplusplus ---- a/src/libjasper/jp2/jp2_cod.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/jp2/jp2_cod.c 2015-01-28 17:57:34.118045437 +0100 -@@ -247,7 +247,7 @@ - box = 0; - tmpstream = 0; - -- if (!(box = jas_malloc(sizeof(jp2_box_t)))) { -+ if (!(box = jas_calloc(1, sizeof(jp2_box_t)))) { - goto error; - } - box->ops = &jp2_boxinfo_unk.ops; -@@ -372,7 +372,7 @@ - jp2_bpcc_t *bpcc = &box->data.bpcc; - unsigned int i; - bpcc->numcmpts = box->datalen; -- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) { -+ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) { - return -1; - } - for (i = 0; i < bpcc->numcmpts; ++i) { -@@ -416,7 +416,7 @@ - break; - case JP2_COLR_ICC: - colr->iccplen = box->datalen - 3; -- if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) { -+ if (!(colr->iccp = jas_alloc2(colr->iccplen, sizeof(uint_fast8_t)))) { - return -1; - } - if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) { -@@ -453,7 +453,7 @@ - if (jp2_getuint16(in, &cdef->numchans)) { - return -1; - } -- if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) { -+ if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) { - return -1; - } - for (channo = 0; channo < cdef->numchans; ++channo) { -@@ -766,7 +766,7 @@ - unsigned int i; - - cmap->numchans = (box->datalen) / 4; -- if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) { -+ if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) { - return -1; - } - for (i = 0; i < cmap->numchans; ++i) { -@@ -828,10 +828,10 @@ - return -1; - } - lutsize = pclr->numlutents * pclr->numchans; -- if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) { -+ if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) { - return -1; - } -- if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) { -+ if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) { - return -1; - } - for (i = 0; i < pclr->numchans; ++i) { ---- a/src/libjasper/jp2/jp2_dec.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/jp2/jp2_dec.c 2015-01-28 18:01:07.082617636 +0100 -@@ -291,7 +291,10 @@ - case JP2_COLR_ICC: - iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, - dec->colr->data.colr.iccplen); -- assert(iccprof); -+ if (!iccprof) { -+ jas_eprintf("error: failed to parse ICC profile\n"); -+ goto error; -+ } - jas_iccprof_gethdr(iccprof, &icchdr); - jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); - jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); -@@ -336,7 +339,7 @@ - } - - /* Allocate space for the channel-number to component-number LUT. */ -- if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) { -+ if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) { - jas_eprintf("error: no memory\n"); - goto error; - } -@@ -354,7 +357,7 @@ - if (cmapent->map == JP2_CMAP_DIRECT) { - dec->chantocmptlut[channo] = channo; - } else if (cmapent->map == JP2_CMAP_PALETTE) { -- lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t)); -+ lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t)); - for (i = 0; i < pclrd->numlutents; ++i) { - lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans]; - } -@@ -386,6 +389,11 @@ - /* Determine the type of each component. */ - if (dec->cdef) { - for (i = 0; i < dec->numchans; ++i) { -+ /* Is the channel number reasonable? */ -+ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) { -+ jas_eprintf("error: invalid channel number in CDEF box\n"); -+ goto error; -+ } - jas_image_setcmpttype(dec->image, - dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], - jp2_getct(jas_image_clrspc(dec->image), ---- a/src/libjasper/jp2/jp2_enc.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/jp2/jp2_enc.c 2015-01-28 17:57:34.119045453 +0100 -@@ -191,7 +191,7 @@ - } - bpcc = &box->data.bpcc; - bpcc->numcmpts = jas_image_numcmpts(image); -- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * -+ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, - sizeof(uint_fast8_t)))) { - goto error; - } -@@ -285,7 +285,7 @@ - } - cdef = &box->data.cdef; - cdef->numchans = jas_image_numcmpts(image); -- cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)); -+ cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)); - for (i = 0; i < jas_image_numcmpts(image); ++i) { - cdefchanent = &cdef->ents[i]; - cdefchanent->channo = i; ---- a/src/libjasper/jpc/jpc_cs.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_cs.c 2015-01-28 17:57:34.120045470 +0100 -@@ -502,7 +502,7 @@ - !siz->tileheight || !siz->numcomps) { - return -1; - } -- if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) { -+ if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) { - return -1; - } - for (i = 0; i < siz->numcomps; ++i) { -@@ -982,8 +982,11 @@ - compparms->numstepsizes = (len - n) / 2; - break; - } -- if (compparms->numstepsizes > 0) { -- compparms->stepsizes = jas_malloc(compparms->numstepsizes * -+ if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) { -+ jpc_qcx_destroycompparms(compparms); -+ return -1; -+ } else if (compparms->numstepsizes > 0) { -+ compparms->stepsizes = jas_alloc2(compparms->numstepsizes, - sizeof(uint_fast16_t)); - assert(compparms->stepsizes); - for (i = 0; i < compparms->numstepsizes; ++i) { -@@ -1091,7 +1094,7 @@ - - ppm->len = ms->len - 1; - if (ppm->len > 0) { -- if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) { -+ if (!(ppm->data = jas_malloc(ppm->len))) { - goto error; - } - if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) { -@@ -1160,7 +1163,7 @@ - } - ppt->len = ms->len - 1; - if (ppt->len > 0) { -- if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) { -+ if (!(ppt->data = jas_malloc(ppt->len))) { - goto error; - } - if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) { -@@ -1223,7 +1226,7 @@ - uint_fast8_t tmp; - poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) : - (ms->len / 7); -- if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) { -+ if (!(poc->pchgs = jas_alloc2(poc->numpchgs, sizeof(jpc_pocpchg_t)))) { - goto error; - } - for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno, -@@ -1328,7 +1331,7 @@ - jpc_crgcomp_t *comp; - uint_fast16_t compno; - crg->numcomps = cstate->numcomps; -- if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) { -+ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) { - return -1; - } - for (compno = 0, comp = crg->comps; compno < cstate->numcomps; -@@ -1467,7 +1470,7 @@ - cstate = 0; - - if (ms->len > 0) { -- if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) { -+ if (!(unk->data = jas_malloc(ms->len))) { - return -1; - } - if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) { ---- a/src/libjasper/jpc/jpc_dec.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_dec.c 2015-01-28 17:59:44.748230228 +0100 -@@ -449,7 +449,7 @@ - - if (dec->state == JPC_MH) { - -- compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t)); -+ compinfos = jas_alloc2(dec->numcomps, sizeof(jas_image_cmptparm_t)); - assert(compinfos); - for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos; - cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) { -@@ -489,7 +489,7 @@ - dec->curtileendoff = 0; - } - -- if (JAS_CAST(int, sot->tileno) > dec->numtiles) { -+ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) { - jas_eprintf("invalid tile number in SOT marker segment\n"); - return -1; - } -@@ -692,7 +692,7 @@ - tile->realmode = 1; - } - tcomp->numrlvls = ccp->numrlvls; -- if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls * -+ if (!(tcomp->rlvls = jas_alloc2(tcomp->numrlvls, - sizeof(jpc_dec_rlvl_t)))) { - return -1; - } -@@ -764,7 +764,7 @@ - rlvl->cbgheightexpn); - - rlvl->numbands = (!rlvlno) ? 1 : 3; -- if (!(rlvl->bands = jas_malloc(rlvl->numbands * -+ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, - sizeof(jpc_dec_band_t)))) { - return -1; - } -@@ -797,7 +797,7 @@ - - assert(rlvl->numprcs); - -- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) { -+ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_dec_prc_t)))) { - return -1; - } - -@@ -834,7 +834,7 @@ - if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { - return -1; - } -- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) { -+ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_dec_cblk_t)))) { - return -1; - } - -@@ -1069,12 +1069,12 @@ - /* Apply an inverse intercomponent transform if necessary. */ - switch (tile->cp->mctid) { - case JPC_MCT_RCT: -- assert(dec->numcomps == 3); -+ assert(dec->numcomps >= 3); - jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data, - tile->tcomps[2].data); - break; - case JPC_MCT_ICT: -- assert(dec->numcomps == 3); -+ assert(dec->numcomps >= 3); - jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data, - tile->tcomps[2].data); - break; -@@ -1181,7 +1181,7 @@ - return -1; - } - -- if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) { -+ if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) { - return -1; - } - -@@ -1204,7 +1204,7 @@ - dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth); - dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight); - dec->numtiles = dec->numhtiles * dec->numvtiles; -- if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) { -+ if (!(dec->tiles = jas_calloc(dec->numtiles, sizeof(jpc_dec_tile_t)))) { - return -1; - } - -@@ -1228,7 +1228,7 @@ - tile->pkthdrstreampos = 0; - tile->pptstab = 0; - tile->cp = 0; -- if (!(tile->tcomps = jas_malloc(dec->numcomps * -+ if (!(tile->tcomps = jas_calloc(dec->numcomps, - sizeof(jpc_dec_tcomp_t)))) { - return -1; - } -@@ -1280,7 +1280,7 @@ - jpc_coc_t *coc = &ms->parms.coc; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, coc->compno) > dec->numcomps) { -+ if (JAS_CAST(int, coc->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in COC marker segment\n"); - return -1; - } -@@ -1306,7 +1306,7 @@ - jpc_rgn_t *rgn = &ms->parms.rgn; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, rgn->compno) > dec->numcomps) { -+ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in RGN marker segment\n"); - return -1; - } -@@ -1355,7 +1355,7 @@ - jpc_qcc_t *qcc = &ms->parms.qcc; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, qcc->compno) > dec->numcomps) { -+ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in QCC marker segment\n"); - return -1; - } -@@ -1489,7 +1489,7 @@ - cp->numlyrs = 0; - cp->mctid = 0; - cp->csty = 0; -- if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) { -+ if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) { - return 0; - } - if (!(cp->pchglist = jpc_pchglist_create())) { -@@ -2048,7 +2048,7 @@ - } - streamlist->numstreams = 0; - streamlist->maxstreams = 100; -- if (!(streamlist->streams = jas_malloc(streamlist->maxstreams * -+ if (!(streamlist->streams = jas_alloc2(streamlist->maxstreams, - sizeof(jas_stream_t *)))) { - jas_free(streamlist); - return 0; -@@ -2068,8 +2068,8 @@ - /* Grow the array of streams if necessary. */ - if (streamlist->numstreams >= streamlist->maxstreams) { - newmaxstreams = streamlist->maxstreams + 1024; -- if (!(newstreams = jas_realloc(streamlist->streams, -- (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) { -+ if (!(newstreams = jas_realloc2(streamlist->streams, -+ (newmaxstreams + 1024), sizeof(jas_stream_t *)))) { - return -1; - } - for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) { -@@ -2155,8 +2155,7 @@ - { - jpc_ppxstabent_t **newents; - if (tab->maxents < maxents) { -- newents = (tab->ents) ? jas_realloc(tab->ents, maxents * -- sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *)); -+ newents = jas_realloc2(tab->ents, maxents, sizeof(jpc_ppxstabent_t *)); - if (!newents) { - return -1; - } ---- a/src/libjasper/jpc/jpc_enc.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_enc.c 2015-01-28 17:57:34.122045503 +0100 -@@ -403,7 +403,7 @@ - vsteplcm *= jas_image_cmptvstep(image, cmptno); - } - -- if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) { -+ if (!(cp->ccps = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_ccp_t)))) { - goto error; - } - for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno, -@@ -656,7 +656,7 @@ - - if (ilyrrates && numilyrrates > 0) { - tcp->numlyrs = numilyrrates + 1; -- if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) * -+ if (!(tcp->ilyrrates = jas_alloc2((tcp->numlyrs - 1), - sizeof(jpc_fix_t)))) { - goto error; - } -@@ -940,7 +940,7 @@ - siz->tilewidth = cp->tilewidth; - siz->tileheight = cp->tileheight; - siz->numcomps = cp->numcmpts; -- siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)); -+ siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)); - assert(siz->comps); - for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) { - siz->comps[i].prec = cp->ccps[i].prec; -@@ -977,7 +977,7 @@ - return -1; - } - crg = &enc->mrk->parms.crg; -- crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t)); -+ crg->comps = jas_alloc2(crg->numcomps, sizeof(jpc_crgcomp_t)); - if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { - jas_eprintf("cannot write CRG marker\n"); - return -1; -@@ -1955,7 +1955,7 @@ - tile->mctid = cp->tcp.mctid; - - tile->numlyrs = cp->tcp.numlyrs; -- if (!(tile->lyrsizes = jas_malloc(tile->numlyrs * -+ if (!(tile->lyrsizes = jas_alloc2(tile->numlyrs, - sizeof(uint_fast32_t)))) { - goto error; - } -@@ -1964,7 +1964,7 @@ - } - - /* Allocate an array for the per-tile-component information. */ -- if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) { -+ if (!(tile->tcmpts = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_tcmpt_t)))) { - goto error; - } - /* Initialize a few members critical for error recovery. */ -@@ -2110,7 +2110,7 @@ - jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data), - jas_seq2d_yend(tcmpt->data), bandinfos); - -- if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) { -+ if (!(tcmpt->rlvls = jas_alloc2(tcmpt->numrlvls, sizeof(jpc_enc_rlvl_t)))) { - goto error; - } - for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; -@@ -2213,7 +2213,7 @@ - rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn); - rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs; - -- if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) { -+ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, sizeof(jpc_enc_band_t)))) { - goto error; - } - for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; -@@ -2290,7 +2290,7 @@ - band->synweight = bandinfo->synenergywt; - - if (band->data) { -- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) { -+ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_enc_prc_t)))) { - goto error; - } - for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, -@@ -2422,7 +2422,7 @@ - goto error; - } - -- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) { -+ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_enc_cblk_t)))) { - goto error; - } - for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ---- a/src/libjasper/jpc/jpc_mqdec.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_mqdec.c 2015-01-28 17:57:34.126045570 +0100 -@@ -118,7 +118,7 @@ - mqdec->in = in; - mqdec->maxctxs = maxctxs; - /* Allocate memory for the per-context state information. */ -- if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) { -+ if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) { - goto error; - } - /* Set the current context to the first context. */ ---- a/src/libjasper/jpc/jpc_mqenc.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_mqenc.c 2015-01-28 17:57:34.126045570 +0100 -@@ -197,7 +197,7 @@ - mqenc->maxctxs = maxctxs; - - /* Allocate memory for the per-context state information. */ -- if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) { -+ if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) { - goto error; - } - ---- a/src/libjasper/jpc/jpc_qmfb.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_qmfb.c 2015-01-28 18:00:17.753785538 +0100 -@@ -306,11 +306,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numcols, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; --#else -- jpc_fix_t splitbuf[bufsize]; --#endif - jpc_fix_t *buf = splitbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; -@@ -318,15 +314,13 @@ - register int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numcols >= 2) { - hstartcol = (numcols + 1 - parity) >> 1; -@@ -360,12 +354,10 @@ - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -374,11 +366,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; --#else -- jpc_fix_t splitbuf[bufsize]; --#endif - jpc_fix_t *buf = splitbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; -@@ -386,15 +374,13 @@ - register int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -428,12 +414,10 @@ - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -442,11 +426,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE]; --#endif - jpc_fix_t *buf = splitbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -457,15 +437,13 @@ - int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -517,12 +495,10 @@ - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -531,11 +507,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t splitbuf[bufsize * numcols]; --#endif - jpc_fix_t *buf = splitbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -546,15 +518,13 @@ - int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -606,12 +576,10 @@ - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -619,26 +587,20 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numcols, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; --#else -- jpc_fix_t joinbuf[bufsize]; --#endif - jpc_fix_t *buf = joinbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; - register int n; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numcols + 1 - parity) >> 1; - -@@ -670,12 +632,10 @@ - ++srcptr; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -684,26 +644,20 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; --#else -- jpc_fix_t joinbuf[bufsize]; --#endif - jpc_fix_t *buf = joinbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; - register int n; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -735,12 +689,10 @@ - ++srcptr; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -749,11 +701,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE]; --#endif - jpc_fix_t *buf = joinbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -763,15 +711,13 @@ - register int i; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -821,12 +767,10 @@ - srcptr += JPC_QMFB_COLGRPSIZE; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -835,11 +779,7 @@ - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t joinbuf[bufsize * numcols]; --#endif - jpc_fix_t *buf = joinbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -849,15 +789,13 @@ - register int i; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -907,12 +845,10 @@ - srcptr += numcols; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - ---- a/src/libjasper/jpc/jpc_t1enc.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_t1enc.c 2015-01-28 17:57:34.128045603 +0100 -@@ -219,7 +219,7 @@ - - cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0; - if (cblk->numpasses > 0) { -- cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t)); -+ cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t)); - assert(cblk->passes); - } else { - cblk->passes = 0; ---- a/src/libjasper/jpc/jpc_t2cod.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_t2cod.c 2015-01-28 17:57:34.128045603 +0100 -@@ -573,7 +573,7 @@ - } - if (pchglist->numpchgs >= pchglist->maxpchgs) { - newmaxpchgs = pchglist->maxpchgs + 128; -- if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) { -+ if (!(newpchgs = jas_realloc2(pchglist->pchgs, newmaxpchgs, sizeof(jpc_pchg_t *)))) { - return -1; - } - pchglist->maxpchgs = newmaxpchgs; ---- a/src/libjasper/jpc/jpc_t2dec.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_t2dec.c 2015-01-28 17:57:34.129045620 +0100 -@@ -478,7 +478,7 @@ - return 0; - } - pi->numcomps = dec->numcomps; -- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { -+ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) { - jpc_pi_destroy(pi); - return 0; - } -@@ -490,7 +490,7 @@ - for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps; - compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { - picomp->numrlvls = tcomp->numrlvls; -- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * -+ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls, - sizeof(jpc_pirlvl_t)))) { - jpc_pi_destroy(pi); - return 0; -@@ -503,7 +503,7 @@ - rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { - /* XXX sizeof(long) should be sizeof different type */ - pirlvl->numprcs = rlvl->numprcs; -- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * -+ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs, - sizeof(long)))) { - jpc_pi_destroy(pi); - return 0; ---- a/src/libjasper/jpc/jpc_t2enc.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_t2enc.c 2015-01-28 17:57:34.129045620 +0100 -@@ -565,7 +565,7 @@ - } - pi->pktno = -1; - pi->numcomps = cp->numcmpts; -- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { -+ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) { - jpc_pi_destroy(pi); - return 0; - } -@@ -577,7 +577,7 @@ - for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps; - compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { - picomp->numrlvls = tcomp->numrlvls; -- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * -+ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls, - sizeof(jpc_pirlvl_t)))) { - jpc_pi_destroy(pi); - return 0; -@@ -591,7 +591,7 @@ - /* XXX sizeof(long) should be sizeof different type */ - pirlvl->numprcs = rlvl->numprcs; - if (rlvl->numprcs) { -- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * -+ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs, - sizeof(long)))) { - jpc_pi_destroy(pi); - return 0; ---- a/src/libjasper/jpc/jpc_tagtree.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_tagtree.c 2015-01-28 17:57:34.130045636 +0100 -@@ -125,7 +125,7 @@ - ++numlvls; - } while (n > 1); - -- if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) { -+ if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) { - return 0; - } - ---- a/src/libjasper/jpc/jpc_util.c 2007-01-19 22:43:07.000000000 +0100 -+++ b/src/libjasper/jpc/jpc_util.c 2015-01-28 17:57:34.130045636 +0100 -@@ -109,7 +109,7 @@ - } - - if (n) { -- if (!(vs = jas_malloc(n * sizeof(double)))) { -+ if (!(vs = jas_alloc2(n, sizeof(double)))) { - return -1; - } - ---- a/src/libjasper/mif/mif_cod.c 2007-01-19 22:43:05.000000000 +0100 -+++ b/src/libjasper/mif/mif_cod.c 2015-01-28 17:57:34.131045653 +0100 -@@ -438,8 +438,7 @@ - int cmptno; - mif_cmpt_t **newcmpts; - assert(maxcmpts >= hdr->numcmpts); -- newcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) : -- jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *)); -+ newcmpts = jas_realloc2(hdr->cmpts, maxcmpts, sizeof(mif_cmpt_t *)); - if (!newcmpts) { - return -1; - } diff --git a/base/sources/jasper-1.900.1.zip b/base/sources/jasper-1.900.1.zip deleted file mode 100644 index 9d9f4fe..0000000 --- a/base/sources/jasper-1.900.1.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494 -size 1415752 diff --git a/base/sources/jpegsrc.v9b.tar.gz b/base/sources/jpegsrc.v9b.tar.gz deleted file mode 100644 index 7e34e21..0000000 --- a/base/sources/jpegsrc.v9b.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:240fd398da741669bf3c90366f58452ea59041cacc741a489b99f2f6a0bad052 -size 1022609 diff --git a/base/sources/lapack-3.5.0.tgz b/base/sources/lapack-3.5.0.tgz deleted file mode 100644 index 6c807d2..0000000 --- a/base/sources/lapack-3.5.0.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ad8f0d3f3fb5521db49f2dd716463b8fb2b6bc9dc386a9956b8c6144f726352 -size 6313139 diff --git a/base/sources/libgeotiff-1.4.0.tar.gz b/base/sources/libgeotiff-1.4.0.tar.gz deleted file mode 100644 index aee65a5..0000000 --- a/base/sources/libgeotiff-1.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0acb8d341fd6a8f2c673456e09fdb8f50f91e3166ac934719fe05b30d328329 -size 1517881 diff --git a/base/sources/netcdf-c-4.7.4.tar.gz b/base/sources/netcdf-c-4.7.4.tar.gz deleted file mode 100644 index e0062fb..0000000 --- a/base/sources/netcdf-c-4.7.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99930ad7b3c4c1a8e8831fb061cb02b2170fc8e5ccaeda733bd99c3b9d31666b -size 19711158 diff --git a/base/sources/netcdf-cxx4-4.3.1.tar.gz b/base/sources/netcdf-cxx4-4.3.1.tar.gz deleted file mode 100644 index 2bb9172..0000000 --- a/base/sources/netcdf-cxx4-4.3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3fe3d2ec06c1c2772555bf1208d220aab5fee186d04bd265219b0bc7a978edc -size 607679 diff --git a/base/sources/netcdf-fortran-4.4.5.patch b/base/sources/netcdf-fortran-4.4.5.patch deleted file mode 100644 index edf3c11..0000000 --- a/base/sources/netcdf-fortran-4.4.5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure 2019-01-09 17:02:05.000000000 -0800 -+++ configure.new 2020-03-09 13:05:42.713897877 -0700 -@@ -22533,7 +22533,7 @@ - _ACEOF - nc_build_v4=yes - else -- nc_build_v4=no -+ nc_build_v4=yes - fi - done - diff --git a/base/sources/netcdf-fortran-4.4.5.tar.gz b/base/sources/netcdf-fortran-4.4.5.tar.gz deleted file mode 100644 index b82ddcc..0000000 --- a/base/sources/netcdf-fortran-4.4.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01643461ac42d1986e38a052eb021135bae5b6cd592373fb44cf832236791c03 -size 1344430 diff --git a/base/sources/proj-4.8.0.tar.gz b/base/sources/proj-4.8.0.tar.gz deleted file mode 100644 index 99472b2..0000000 --- a/base/sources/proj-4.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5 -size 785279 diff --git a/base/sources/szip-2.1.1.tar.gz b/base/sources/szip-2.1.1.tar.gz deleted file mode 100644 index 55f2918..0000000 --- a/base/sources/szip-2.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412 -size 415774 diff --git a/base/sources/tiff-4.0.6.tar.gz b/base/sources/tiff-4.0.6.tar.gz deleted file mode 100644 index cd2677b..0000000 --- a/base/sources/tiff-4.0.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c -size 2192991 diff --git a/base/sources/tinyxml-2.6.2.tar.gz b/base/sources/tinyxml-2.6.2.tar.gz deleted file mode 100644 index 06a96f9..0000000 --- a/base/sources/tinyxml-2.6.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:532d7bd9cc5493de453cc809af0f3b0adb917c405cbba4581892e5a801c60647 -size 210114 diff --git a/base/sources/xerces-c-3.1.2.tar.gz b/base/sources/xerces-c-3.1.2.tar.gz deleted file mode 100644 index 6a266e7..0000000 --- a/base/sources/xerces-c-3.1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:743bd0a029bf8de56a587c270d97031e0099fe2b7142cef03e0da16e282655a0 -size 6959894 diff --git a/base/sources/zlib-1.2.11.tar.gz b/base/sources/zlib-1.2.11.tar.gz deleted file mode 100644 index 3b38281..0000000 --- a/base/sources/zlib-1.2.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -size 607698 diff --git a/spss/cwl/l1a_package.cwl b/cwl/l1a_package.cwl similarity index 100% rename from spss/cwl/l1a_package.cwl rename to cwl/l1a_package.cwl diff --git a/spss/cwl/l1a_package.yml b/cwl/l1a_package.yml similarity index 100% rename from spss/cwl/l1a_package.yml rename to cwl/l1a_package.yml diff --git a/spss/cwl/l1b_package.cwl b/cwl/l1b_package.cwl similarity index 100% rename from spss/cwl/l1b_package.cwl rename to cwl/l1b_package.cwl diff --git a/spss/cwl/l1b_package.yml b/cwl/l1b_package.yml similarity index 100% rename from spss/cwl/l1b_package.yml rename to cwl/l1b_package.yml diff --git a/spss/ephemeris/README b/ephemeris/README similarity index 100% rename from spss/ephemeris/README rename to ephemeris/README diff --git a/spss/ephemeris/leapsec.dat b/ephemeris/leapsec.dat similarity index 100% rename from spss/ephemeris/leapsec.dat rename to ephemeris/leapsec.dat diff --git a/spss/ephemeris/utcpole.dat b/ephemeris/utcpole.dat similarity index 100% rename from spss/ephemeris/utcpole.dat rename to ephemeris/utcpole.dat diff --git a/spss/interface/run_l1a_pge.ipynb b/interface/run_l1a_pge.ipynb similarity index 100% rename from spss/interface/run_l1a_pge.ipynb rename to interface/run_l1a_pge.ipynb diff --git a/spss/interface/run_l1b_pge.ipynb b/interface/run_l1b_pge.ipynb similarity index 100% rename from spss/interface/run_l1b_pge.ipynb rename to interface/run_l1b_pge.ipynb diff --git a/spss/src b/spss/src deleted file mode 160000 index d749fbc..0000000 --- a/spss/src +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d749fbcc4b62f4f4c7449418041a2a5153266dbe diff --git a/spss/test/common/copy_l1a_input.sh b/test/common/copy_l1a_input.sh similarity index 100% rename from spss/test/common/copy_l1a_input.sh rename to test/common/copy_l1a_input.sh diff --git a/spss/test/common/copy_l1b_input.sh b/test/common/copy_l1b_input.sh similarity index 100% rename from spss/test/common/copy_l1b_input.sh rename to test/common/copy_l1b_input.sh diff --git a/spss/test/common/setup_env.sh b/test/common/setup_env.sh similarity index 100% rename from spss/test/common/setup_env.sh rename to test/common/setup_env.sh diff --git a/spss/test/launch_l1a_jupyter.sh b/test/launch_l1a_jupyter.sh similarity index 100% rename from spss/test/launch_l1a_jupyter.sh rename to test/launch_l1a_jupyter.sh diff --git a/spss/test/launch_l1b_jupyter.sh b/test/launch_l1b_jupyter.sh similarity index 100% rename from spss/test/launch_l1b_jupyter.sh rename to test/launch_l1b_jupyter.sh diff --git a/spss/test/run_l1a_test.sh b/test/run_l1a_test.sh similarity index 100% rename from spss/test/run_l1a_test.sh rename to test/run_l1a_test.sh diff --git a/spss/test/run_l1b_test.sh b/test/run_l1b_test.sh similarity index 100% rename from spss/test/run_l1b_test.sh rename to test/run_l1b_test.sh