Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > de0301a291e470c0c6f4ef64b7da5136 > files > 15

ncl-6.5.0-5.mga7.src.rpm

Name:           ncl
Version:        6.5.0
Release:        %mkrel 5
Summary:        NCAR Command Language and NCAR Graphics

Group:          Sciences/Mathematics
License:        BSD
URL:            http://www.ncl.ucar.edu
Source0:        https://www.earthsystemgrid.org/download/fileDownload.htm?logicalFileId=bec58cb3-cd9b-11e4-bb80-00c0f03d5b7c#/ncl_ncarg-%{version}.tar.gz
Source1:        Site.local.ncl
Source2:        ncarg.csh
Source3:        ncarg.sh

# ymake uses cpp with some defines on the command line to generate a 
# Makefile which consists in:
#  Template: command line defines
#  Site.conf
#  LINUX
#  Site.conf
#  Template: generic defaults, including default paths
#  Project
#  Rules
#  yMakefile
#  Template: some rules
#
# install paths are set up in Project. Paths used in code are also in 
# Project, in NGENV_DESCRIPT.
Patch0:         ncl-5.1.0-paths.patch
Patch1:         ncarg-4.4.1-deps.patch
Patch2:         ncl-5.1.0-ppc64.patch
# Add needed -lm to ictrans build, remove unneeded -lrx -lidn -ldl from ncl
Patch3:         ncl-libs.patch
# Fix build without EOS
#(eatdirt) not applied, seems Makefile has been changed to put it as optional
Patch4:         ncl-eos.patch

# don't have the installation target depends on the build target since
# for library it implies running ranlib and modifying the library timestamp
Patch10:        ncl-5.0.0-no_install_dep.patch
# put install and build rules before script rules such that the default rule
# is all
Patch11:        ncl-5.0.0-build_n_scripts.patch
Patch12:        ncl-5.1.0-netcdff.patch
Patch13:        ncl-5.1.0-includes.patch
# Add Fedora secondary arches
Patch16:        ncl-5.2.1-secondary.patch
Patch18:        ncl-6.1.2-mga-parallel-make.patch

BuildRequires:  /bin/csh
BuildRequires:  makedepend
BuildRequires:  gcc-gfortran
BuildRequires:  pkgconfig(netcdf-fortran)
BuildRequires:  pkgconfig(gsl)
#BuildRequires:  libatlas-devel
BuildRequires:  lapack-devel
BuildRequires:  pkgconfig(cairo)
BuildRequires:  hdf-static
BuildRequires:  hdf-devel >= 4.2r2
BuildRequires:  g2clib-devel
BuildRequires:  pkgconfig(gdal)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(proj)
# imake needed for makedepend
BuildRequires:  imake
BuildRequires:  pkgconfig(xt)
BuildRequires:  pkgconfig(xaw7)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xpm)
BuildRequires:  byacc
BuildRequires:  flex
BuildRequires:  udunits2-devel
BuildRequires:  libgomp-devel
Requires:       %{name}-common = %{version}-%{release}
Requires:       udunits2

Provides:       ncarg = %{version}-%{release}
Obsoletes:      ncarg < %{version}-%{release}


%description
The NCAR Command Language (NCL) is a free interpreted language designed
specifically for scientific data processing and visualization. NCL has robust
file input and output. It can read and write netCDF-3, netCDF-4 classic (as
of version 4.3.1), HDF4, binary, and ASCII data, and read HDF-EOS2, GRIB1 and
GRIB2 (as of version 4.3.0). The graphics are world class and highly
customizable.

As of version 5.0.0, NCL and NCAR Graphics are released as one package.

The software comes with a couple of useful command line tools:

  * ncl_filedump - prints the contents of supported files (netCDF, HDF,
    GRIB1, GRIB2, HDF-EOS2, and CCM History Tape)
  * ncl_convert2nc - converts one or more GRIB1, GRIB2, HDF and/or HDF-EOS
    files to netCDF formatted files. 


%package common
Summary:        Common files for NCL and NCAR Graphics
Group:          Sciences/Mathematics
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description common
%{summary}.


%package devel
Summary:        Development files for NCL and NCAR Graphics
Group:          Development/C
Requires:       %{name} = %{version}-%{release}
Requires:       libxext-devel
Provides:       ncl-static = %{version}-%{release}
Provides:       ncarg-devel = %{version}-%{release}
Obsoletes:      ncarg-devel < %{version}-%{release}

%description devel
%{summary}.


%package examples
Summary:        Example programs and data using NCL
Group:          Development/C
Requires:       %{name}-devel = %{version}-%{release}
BuildArch:      noarch

%description examples
Example programs and data using NCL.


%prep
%setup -q -n ncl_ncarg-%{version}
%patch0 -p1 -b .paths
%patch1 -p1 -b .deps
%patch2 -p1 -b .ppc64
%patch3 -p1 -b .libs

#patch4 -p1 -b .eos

%patch10 -p1 -b .no_install_dep
%patch11 -p1 -b .build_n_scripts
%patch12 -p1 -b .netcdff
%patch13 -p1 -b .includes
%patch16 -p1 -b .secondary
#patch18 -p1 -b .parallel

# Build against lapack
#%global atlasblaslib -lcblas -lf77blas -lptf77blas -latlas
#%global atlaslapacklib -llapack -latlas
#sed -ri -e 's,-lblas_ncl,%{atlasblaslib},' \
#        -e 's,-llapack_ncl,%{atlaslapacklib},' \
#        -e 's,-L\$\((BLAS|LAPACK)SRC\),-L%{_libdir}/atlas,' config/Project

# use standard lapack since atlas is messing dgesvd_

%global blaslib -lblas
%global lapacklib -llapack 
sed -ri -e 's,-lblas_ncl,%{blaslib},' \
        -e 's,-llapack_ncl,%{lapacklib},' config/Project


#Spurrious exec permissions
find -name '*.[fh]' -exec chmod -x {} +

#Use ppc config if needed
%ifarch ppc ppc64
cp config/LINUX.ppc32.GNU config/LINUX
%endif

#Fixup LINUX config (to expose vsnprintf prototype)
sed -i -e '/StdDefines/s/-DSYSV/-D_ISOC99_SOURCE/' config/LINUX

rm -rf external/blas external/lapack

# fix the install directories
sed -e 's;@prefix@;%{_prefix};' \
 -e 's;@mandir@;%{_mandir};' \
 -e 's;@datadir@;%{_datadir};' \
 -e 's;@libdir@;%{_libdir};' \
 %{SOURCE1} > config/Site.local

#Setup the profile scripts
cp %{SOURCE2} %{SOURCE3} .
sed -i -e s,@LIB@,%{_lib},g ncarg.csh ncarg.sh

sed -i -e 's;load "\$NCARG_ROOT/lib/ncarg/nclex\([^ ;]*\);loadscript(ncargpath("nclex") + "\1);' \
    -e 's;"\$NCARG_ROOT/lib/ncarg/\(data\|database\);ncargpath("\1") + ";' \
    -e 's;\$NCARG_ROOT/lib/ncarg/nclscripts;$NCARG_ROOT/share/ncarg/nclscripts;' \
    `find ni/src -name \*.ncl`


%build
# short-cicuit:
./config/ymkmf

# ./config/ymkmf could be also short circuited, since it does:
# (cd ./config; make -f Makefile.ini clean all)
# ./config/ymake -config ./config -Curdir . -Topdir .

#make Build CCOPTIONS="$RPM_OPT_FLAGS -fPIC -Werror-implicit-function-declaration" F77=gfortran F77_LD=gfortran\

%make_build Build CCOPTIONS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -fopenmp -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" F77=gfortran F77_LD=gfortran\
 CTOFLIBS="-lgfortran" FCOPTIONS="$RPM_OPT_FLAGS -fPIC -fno-second-underscore -fno-range-check -fopenmp -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" \
 COPT= FOPT= LEXLIB=-lfl


%install
export NCARG=`pwd`
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m 0644 ncarg.csh ncarg.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
# database, fontcaps, and graphcaps are arch dependent
mv $RPM_BUILD_ROOT%{_datadir}/ncarg/{database,{font,graph}caps} \
   $RPM_BUILD_ROOT%{_libdir}/ncarg/
# Compat links for what is left
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/ncarg
for x in $RPM_BUILD_ROOT%{_datadir}/ncarg/*
do
  ln -s ../../share/ncarg/$(basename $x) $RPM_BUILD_ROOT%{_prefix}/lib/ncarg/
done
# Use system udunits
rm -r $RPM_BUILD_ROOT%{_datadir}/ncarg/udunits
ln -s ../udunits $RPM_BUILD_ROOT%{_datadir}/ncarg/
# Don't conflict with allegro-devel (generic API names)
for manpage in $RPM_BUILD_ROOT%{_mandir}/man3/*
do
   manname=`basename $manpage`
   mv $manpage $RPM_BUILD_ROOT%{_mandir}/man3/%{name}_$manname
done

%files
%doc COPYING Copyright README
%config(noreplace) %{_sysconfdir}/profile.d/ncarg.*sh
%{_bindir}/ConvertMapData
%{_bindir}/WriteLineFile
%{_bindir}/WriteNameFile
%{_bindir}/WritePlotcharData
%{_bindir}/cgm2ncgm
%{_bindir}/ctlib
%{_bindir}/ctrans
%{_bindir}/ezmapdemo
%{_bindir}/fcaps
%{_bindir}/findg
%{_bindir}/fontc
%{_bindir}/gcaps
%{_bindir}/graphc
%{_bindir}/ictrans
%{_bindir}/idt
%{_bindir}/med
%{_bindir}/ncargfile
%{_bindir}/ncargpath
%{_bindir}/ncargrun
%{_bindir}/ncargversion
%{_bindir}/ncargworld
%{_bindir}/ncarlogo2ps
%{_bindir}/ncarvversion
%{_bindir}/ncgm2cgm
%{_bindir}/ncgmstat
%{_bindir}/ncl
%{_bindir}/ncl_convert2nc
%{_bindir}/ncl_filedump
%{_bindir}/ncl_grib2nc
%{_bindir}/nnalg
%{_bindir}/pre2ncgm
%{_bindir}/pre2ncgm.prog
%{_bindir}/psblack
%{_bindir}/psplit
%{_bindir}/pswhite
%{_bindir}/pwritxnt
%{_bindir}/ras2ccir601
%{_bindir}/rascat
%{_bindir}/rasgetpal
%{_bindir}/rasls
%{_bindir}/rassplit
%{_bindir}/rasstat
%{_bindir}/rasview
%{_bindir}/tdpackdemo
%{_bindir}/tgks0a
%{_bindir}/tlocal

%{_libdir}/ncarg/database/
%{_libdir}/ncarg/fontcaps/
%{_libdir}/ncarg/graphcaps/

%files common
%dir %{_datadir}/ncarg
%{_datadir}/ncarg/colormaps/
%{_datadir}/ncarg/data/
%{_datadir}/ncarg/grib2_codetables/
%{_datadir}/ncarg/grib2_codetables.previous/
%{_datadir}/ncarg/nclscripts/
%{_datadir}/ncarg/ngwww/
%{_datadir}/ncarg/sysresfile
%{_datadir}/ncarg/udunits
%{_datadir}/ncarg/xapp/
%dir %{_prefix}/lib/ncarg
%{_prefix}/lib/ncarg/colormaps
%{_prefix}/lib/ncarg/data
%{_prefix}/lib/ncarg/grib2_codetables
%{_prefix}/lib/ncarg/grib2_codetables.previous
%{_prefix}/lib/ncarg/nclscripts
%{_prefix}/lib/ncarg/ngwww
%{_prefix}/lib/ncarg/sysresfile
%{_prefix}/lib/ncarg/udunits
%{_prefix}/lib/ncarg/xapp
%{_mandir}/man1/*1.*
%{_mandir}/man5/*5.*
%{_bindir}/scrip_check_input

%files devel
%{_bindir}/MakeNcl
%{_bindir}/WRAPIT
%{_bindir}/ncargcc
%{_bindir}/ncargf77
%{_bindir}/ncargf90
%{_bindir}/nhlcc
%{_bindir}/nhlf77
%{_bindir}/nhlf90
%{_bindir}/wrapit77
%{_includedir}/ncarg/
%dir %{_libdir}/ncarg
%{_libdir}/ncarg/libcgm.a
%{_libdir}/ncarg/libfftpack5_dp.a
%{_libdir}/ncarg/libhlu.a
%{_libdir}/ncarg/libncarg.a
%{_libdir}/ncarg/libncarg_c.a
%{_libdir}/ncarg/libncarg_gks.a
%{_libdir}/ncarg/libncarg_ras.a
%{_libdir}/ncarg/libncl.a
%{_libdir}/ncarg/libnclapi.a
%{_libdir}/ncarg/libngmath.a
%{_libdir}/ncarg/libnfp.a
%{_libdir}/ncarg/libnfpfort.a
%{_libdir}/ncarg/libnio.a
%{_libdir}/ncarg/libsphere3.1_dp.a
%{_libdir}/ncarg/ncarg/
%{_mandir}/man3/*3.*

%files examples
%{_bindir}/ncargex
%{_bindir}/ng4ex
%{_datadir}/ncarg/examples/
%{_datadir}/ncarg/hluex/
%{_datadir}/ncarg/nclex/
%{_datadir}/ncarg/resfiles/
%{_datadir}/ncarg/tests/
%{_datadir}/ncarg/tutorial/
%{_prefix}/lib/ncarg/examples
%{_prefix}/lib/ncarg/hluex
%{_prefix}/lib/ncarg/nclex
%{_prefix}/lib/ncarg/resfiles
%{_prefix}/lib/ncarg/tests
%{_prefix}/lib/ncarg/tutorial



%changelog
* Tue Apr 23 2019 joequant <joequant> 6.5.0-5.mga7
+ Revision: 1394900
- rebuild with new libraries

* Fri Mar 08 2019 eatdirt <eatdirt> 6.5.0-4.mga7
+ Revision: 1372898
- Rebuild for new libproj 6.0

* Fri Nov 09 2018 daviddavid <daviddavid> 6.5.0-3.mga7
+ Revision: 1329079
- rebuild for new hdf5 1.10.4

* Sun Sep 23 2018 umeabot <umeabot> 6.5.0-2.mga7
+ Revision: 1299683
- Mageia 7 Mass Rebuild

* Tue Aug 14 2018 eatdirt <eatdirt> 6.5.0-1.mga7
+ Revision: 1251505
- Upgrade to version 6.5.0

* Mon Apr 16 2018 daviddavid <daviddavid> 6.3.0-6.mga7
+ Revision: 1219293
- rebuild for new jasper 2.0.14

* Sat Mar 17 2018 daviddavid <daviddavid> 6.3.0-5.mga7
+ Revision: 1210093
- rebuild for new proj 5.0.0

* Tue Nov 21 2017 tv <tv> 6.3.0-4.mga7
+ Revision: 1178361
- rebuild for new libproj

* Mon Sep 11 2017 tv <tv> 6.3.0-3.mga7
+ Revision: 1152749
- rebuild for new libgfortran

* Tue Jun 07 2016 joequant <joequant> 6.3.0-2.mga6
+ Revision: 1020505
- use standard lapack since atlas is missing calls.  use openmp
- bump for blas/lapack rebuild
+ tv <tv>
- BR proj-devel
- new release
- rebuild for new atlas
- fix building with atlas: remove tests for FC version...

* Sun Jan 10 2016 wally <wally> 6.1.2-8.mga6
+ Revision: 920923
- rebuild for new gdal

* Tue Jul 21 2015 daviddavid <daviddavid> 6.1.2-7.mga6
+ Revision: 855903
- rebuild with new hdf5

* Mon Apr 13 2015 spuhler <spuhler> 6.1.2-6.mga5
+ Revision: 820096
- changed from parallel build to make it build
  * when parallel build, we miss two files, /usr/bin/fontc and /usr/bin/graphc
+ umeabot <umeabot>
- Second Mageia 5 Mass Rebuild
- Mageia 5 Mass Rebuild
- Mageia 4 Mass Rebuild
+ joequant <joequant>
- add parallel make

* Thu Sep 26 2013 joequant <joequant> 6.1.2-2.mga4
+ Revision: 486531
- change groups
- add atlas dependency
- fix libext-devel dependency
- imported package ncl