Info2: << Package: nan%type_pkg[-atlas]-oct%type_pkg[oct] Version: 2.5.1 Type: oct (3.0.5 3.2.4 3.4.3), forge (nan), -atlas (boolean) Revision: 1 Maintainer: Alexander Hansen # unfortunately, Homepage won't do types Homepage: http://octave.sourceforge.net/nan/index.html Description: Missing value statistical toolbox for Octave DescDetail: << A statistics and machine learning toolbox for Octave for data with and without missing values. This package provides the following additional functions: coefficient_of_variation geomean meansq skewness covm cor cov corrcoef harmmean median statistic detrend kurtosis moment std mad naninsttest nantest nansum nanstd normpdf normcdf norminv meandev percentile quantile rankcorr ranks rms sumskipnan var mean sem spearman trimean tpdf tcdf tinv zscore conv2nan flag_implicit_significance xcovf train_sc test_sc xval classify train_lda_sparse decovm gscatter mahal cdfplot hist2res fss cat2bin ttest ttest2 xptopen bland_altmann cumsumskipnan << License: GPL3+ # Most octave-forge packages have to have the following BuildDepends: # liboctave%type_pkg[oct]-dev, # fftw3, # ( %type_pkg[oct] = 305 ) hdf5.7-oldapi, # ( %type_pkg[oct] != 305 ) hdf5.7 # # Packages which serve only Octave-3.0.5 or only Octave > 3.0.5 need # not use the conditional, of course. BuildDepends: << fink (>= 0.24.12), (%type_raw[-atlas] = -atlas) atlas, (%type_raw[-atlas] = -atlas) liboctave%type_pkg[oct]-atlas-dev, (%type_raw[-atlas] != -atlas) liboctave%type_pkg[oct]-veclib-dev, fftw3, gcc46-compiler, ( %type_pkg[oct] = 305 ) hdf5.7-oldapi, ( %type_pkg[oct] != 305 ) hdf5.7 << Depends: << (%type_raw[-atlas] = -atlas) atlas-shlibs, (%type_raw[-atlas] = -atlas) octave%type_pkg[oct]-interpreter-atlas, (%type_raw[-atlas] != -atlas) octave%type_pkg[oct]-interpreter-veclib, gcc46-shlibs << Conflicts: << octave-forge, octave-forge-%type_raw[forge] (<< 1.0.7-999), %type_raw[forge]-atlas-oct%type_pkg[oct], %type_raw[forge]-oct%type_pkg[oct] << Replaces: << octave-forge-%type_raw[forge] (<< 1.0.7-999), %type_raw[forge]-atlas-oct%type_pkg[oct], %type_raw[forge]-oct%type_pkg[oct] << Source-MD5: 7a3bc518e8549a96a2c2d1a2e684c23b #### Insert required changes here #### SourceDirectory: NaN PatchFile: %{Ni}.patch PatchFile-MD5: 09de119428b771c3218eb8b2d7505b5c PatchScript: << #!/bin/sh -ev sed -e 's|@FINKPREFIX@|%p|g' -e 's|@OCTVERSION@|%type_raw[oct]|' %{PatchFile} | patch -p1 if [ "%type_raw[-atlas]" = "-atlas" ] then sed -i.bak -e 's|\-lblas|-L%p/lib -lcblas|g' src/Makefile else sed -i.bak -e 's|\-lblas|-L/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/ -lBLAS|g' src/Makefile fi << SetLIBS: -L%p/lib/gcc4.6/lib/ DescPort: << Wants libgomp; we use gcc46-compiler to avoid mixing clang and llvm stuff on 10.7, and just to keep things in sync we follow suit here. src/Makefile: patch in the locations of the gcc46-compiler executables and the gcc46-enabled mkoctfile executable from octaveN-dev; also set LIBS. src/xptopen.cpp: OS X defines __DARWIN_BYTE_ORDER, __DARWIN_BIG_ENDIAN, and __DARWIN_LITTLE_ENDIAN rather than just __BYTE_ORDER, __BIG_ENDIAN, and __LITTLE_ENDIAN, respectively, so we #define the latter as their __DARWIN_ counterparts. << CompileScript: << #!/bin/sh -ev export OCTAVE=%p/bin/octave-%type_raw[oct] # patch out misnamed file mv inst/nanconv2.m inst/conv2nan.m # repack tarball, since octave-3.4.3 appears not to want to install # from directories pushd .. tar -cf %type_raw[forge].tar NaN pkgsrc=%type_raw[forge].tar popd %p/share/octave/%type_raw[oct]/scripts/octave-forge-compile.sh $pkgsrc << ###################################### # Do not change anything from this point down, unless absolutely necessary, # since the foo-oct%type_pkg[oct] packages are designed to be built/installed # in the same way. Source: mirror:sourceforge:octave/%type_raw[forge]-%v.tar.gz NoSetCPPFLAGS: true NoSetLDFLAGS: true SetLIBRARY_PATH: /usr/X11R6/lib:%p/lib SetMAKEFLAGS: -j1 InstallScript: << #!/bin/sh -ev %p/share/octave/%type_raw[oct]/scripts/octave-forge-install.sh %type_raw[forge]-%v %i %b mkdir -p %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v # copy template scripts cp %p/share/octave/%type_raw[oct]/scripts/octave-forge-prerm %p/share/octave/%type_raw[oct]/scripts/octave-forge-postinst %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v cd %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v sed -i -e 's/@PKGNAME@/%type_raw[forge]-%v/' octave-forge-postinst sed -i -e 's/@PKGNAME@/%type_raw[forge]/' octave-forge-prerm chmod a+x octave-forge* << PostInstScript: << if [ -s %p/var/octave/%type_raw[oct]/octave_packages ] && [ -f %p/var/octave/%type_raw[oct]/octave_packages ] then %p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-postinst else mv %p/share/octave/%type_raw[oct]/packages/%type_raw[forge]-%v/octave_packages %p/var/octave/%type_raw[oct]/octave_packages fi << PreRmScript: %p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-prerm DescPackaging: << This package: Rename nanconv2.m to conv2nan.m to match the function name Point the -atlas variant to the BLAS library from atlas. Common for all octave-forge packages: We read in postinst and prerm template scripts installed by octaveN and modify them to use the name of this package because Octave's package manager can't cope with non-literal arguments. The Type: forge (pkgname) is used to minimize what needs to be changed when using this .info file as a template. << <<