Info2: <<
Package: general-oct%type_pkg[oct]
Version: 1.3.4
Type: oct (3.8.2), forge (general), gcc (11)
Revision: 3
Maintainer: Alexander Hansen <alexkhansen@users.sourceforge.net>
Homepage: http://octave.sourceforge.net/general/index.html 
Description: General tools for Octave
DescDetail: <<
General tools for octave. String dictionary, parallel computing.
This package provides the following additional functions:
Dictionaries:
        @dict/dict
        @dict/get
        @dict/has
        @dict/isempty
        @dict/join
        @dict/length
        @dict/struct
Input check:
        @inputParser/addOptional
        @inputParser/addRequired
        @inputParser/addParamValue
        @inputParser/addSwitch
        @inputParser/createCopy
        @inputParser/inputParser
        @inputParser/parse
Parallel Computing:
        pararrayfun
        parcellfun
Various Functions:
        adresamp2
        majle
        mark_for_deletion
        packfields
        safeprod
        SHA1
        tablify
        unpackfields
        unresamp2
        unvech
        ztvals
<<
License: OSI-Approved

BuildDepends: <<
  liboctave%type_pkg[oct]-gcc%type_pkg[gcc]-dev,
  fink-octave-scripts (>= 0.3.0-1),
  fftw3, 
  hdf5.9
 <<
Depends: << 
  octave%type_pkg[oct]-interpreter
<<
Conflicts: octave-forge

Source: mirror:sourceforge:octave/%type_raw[forge]-%v.tar.gz
Source-Checksum: SHA256(50bc3b17d72a719f82bf124af20b4bdd4d12459d4685eee2035303d01e4f511f)
SourceDirectory: %type_raw[forge]

NoSetCPPFLAGS: true
NoSetLDFLAGS: true
UseMaxBuildJobs: false
BuildAsNobody: false

CompileScript: <<
#!/bin/sh -ev
export OCTAVE=%p/bin/octave-%type_raw[oct]
pkgsrc=%type_raw[forge]

##### Invariant stuff begins here #####
%p/share/fink-octave-scripts/octave-forge-patch.sh %type_raw[forge] %v %type_raw[oct] %b %i $pkgsrc
./octave-forge-compile.sh
<<

InstallScript: ./octave-forge-install.sh
PostInstScript:  %p/share/octave/%type_raw[oct]/%type_raw[forge]/octave-forge-postinst.sh
PreRmScript: %p/share/octave/%type_raw[oct]/%type_raw[forge]/octave-forge-prerm.sh

DescPackaging: <<
This package:
Listed license is "GPLv3+, modified BSD, public domain", and the validator can't cope
currently with that.

Upstream claims that this works with Octave-3.4.3-3.6.4, but I see the following error:

untar (./general.tar, /var/tmp/oct-bqhq0r)
unpackfields.cc:92:39: error: no member named 'assign' in 'symbol_table'
                        symbol_table::assign (fld_names(i), map.content...
                        ~~~~~~~~~~~~~~^
unpackfields.cc:117:35: error: no member named 'assign' in 'symbol_table'
                    symbol_table::assign (fld_names(i), val);
                    ~~~~~~~~~~~~~~^
2 errors generated.
make: *** [unpackfields.oct] Error 1


Common for all octave-forge packages:
Preinst and postinst scripts are dynamically set up via 
%p/share/fink-octave-scripts/octave-forge-patch.sh 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.
<<
<<