the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: odepkg%type_pkg[-atlas]-oct%type_pkg[oct]
Version: 0.8.2
Type: oct (3.6.0 3.6.1), forge (odepkg), -atlas (boolean), gcc (4.7)
Revision: 3
Architecture: <<
i386,
(%type_raw[-atlas] = -atlas) x86_64
<<
Maintainer: Alexander Hansen
# unfortunately, Homepage won't do types
Homepage: http://octave.sourceforge.net/odepkg/index.html
Description: ODE solver for Octave
DescDetail: <<
A package for solving ordinary differential equations and more.
The following additional functions are provided:
OdePkg Tutorial:
odepkg
OdePkg ODE Solver Functions:
ode23
ode45
ode54
ode78
OdePkg DAE Solver Functions:
ode2r
ode5r
odebda
odebwe
oders
odesx
OdePkg IDE Solver Functions:
odebdi
odekdi
OdePkg DDE Solver Functions:
ode23d
ode45d
ode54d
ode78d
OdePkg Options Functions:
odeset
odeget
OdePkg Output Functions:
odeplot
odeprint
odephas2
odephas3
OdePkg Example Functions:
odeexamples
odepkg_examples_dae
odepkg_examples_dde
odepkg_examples_ide
odepkg_examples_ode
OdePkg Testsuite Functions:
odepkg_testsuite_calcscd
odepkg_testsuite_calcmescd
odepkg_testsuite_chemakzo
odepkg_testsuite_hires
odepkg_testsuite_implakzo
odepkg_testsuite_implrober
odepkg_testsuite_impltrans
odepkg_testsuite_oregonator
odepkg_testsuite_pollution
odepkg_testsuite_robertson
odepkg_testsuite_transistor
OdePkg Internal Functions:
odepkg_event_handle
odepkg_structure_check
OdePkg Other Functions:
bvp4c
<<
License: GPL2+
# All octave-forge packages have to have the following BuildDepends:
# liboctave%type_pkg[oct]-gcc%type_pkg[gcc]-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: <<
(%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,
liboctave%type_pkg[oct]-gcc%type_pkg[gcc]-dev,
fftw3,
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,
gcc%type_pkg[gcc]-shlibs
<<
Conflicts: <<
octave-forge,
%type_raw[forge]-atlas-oct%type_pkg[oct],
%type_raw[forge]-oct%type_pkg[oct]
<<
Replaces: <<
%type_raw[forge]-atlas-oct%type_pkg[oct],
%type_raw[forge]-oct%type_pkg[oct]
<<
Source-MD5: fb31d7376fae74eeec846b7b3d2bf635
DescPackaging: <<
This package:
Patch to ensure that the FFLAGS that we build Octave with
are passed along--important since the non-atlas variant uses Accelerate.
Upstream uses a 'mkoctfile' construction to get the BLAS and LAPACK libraries
which doesn't actually work right. :-) It's OK for Accelerate-based builds, though,
so we only patch for -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.
<<
#### Insert required changes here ####
PatchFile: %{ni}.patch
PatchFile-MD5: 91f3c0dde1ed1421f3746a8ebb9218ef
PatchScript: <<
#!/bin/sh -ev
%{default_script}
# mkoctfile doesn't actually do multiple variables with a -p
# The line is OK on non-atlas octaves, though, since we really
# just want one "-Wl,-framework,Accelerate".
if [ "%type_pkg[-atlas]" = "-atlas" ] ; then
perl -pi -e 's /(LAPACK_LIBS := \$\(shell mkoctfile \-p BLAS_LIBS)( LAPACK_LIBS\))/\1) \$(shell mkoctfile -p \2/' src/Makefile
fi
# clean up redundant LAPACK_LIBS
perl -pi -e 's/\$\(LAPACK_LIBS\) (\$\(FLIBS\) \$\(LAPACK_LIBS\))/\1/' src/Makefile
<<
######################################
# 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
UseMaxBuildJobs: false
BuildAsNobody: false
CompileScript: <<
#!/bin/sh -ev
if [ $UID -ne 0 ]
then
echo "%n cannot be built with --build-as-nobody"
exit 1
fi
export OCTAVE=%p/bin/octave-%type_raw[oct]
srcdir=%type_raw[forge]-%v
# repack tarball, since octave-3.4.3+ appears not to want to install
# from directories
if [ %type_pkg[oct] -ge 343 ]
then
cd ..
tar -cf $srcdir.tar $srcdir
cd %b
pkgsrc=$srcdir.tar
else pkgsrc=$srcdir
fi
%p/share/octave/%type_raw[oct]/scripts/octave-forge-compile.sh $pkgsrc
<<
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
<<
diff -Nurd odepkg-0.8.0.patched.once/src/Makefile odepkg-0.8.0.patched.twice/src/Makefile
--- odepkg-0.8.0.patched.once/src/Makefile 2012-04-01 15:20:15.000000000 -0700
+++ odepkg-0.8.0.patched.twice/src/Makefile 2012-04-01 15:29:02.000000000 -0700
@@ -10,15 +10,8 @@
# MKOCTFILE = $(MKOCTFILE) has already been defined in Makeconf
# MKMEXFILE = $(MKOCTFILE) --mex
MKOCTFILE = mkoctfile
-ifeq (gfortran,$(findstring gfortran,$(F77)))
- MKF77FILE = FFLAGS="-fno-automatic $(FFLAGS)" $(MKOCTFILE)
-endif
-ifeq (g95,$(findstring g95,$(F77)))
- MKF77FILE = FFLAGS="-fstatic $(FFLAGS)" $(MKOCTFILE)
-else
- # eg. the combination f2c with fort77
- MKF77FILE = FFLAGS="$(FFLAGS)" $(MKOCTFILE)
-endif
+MKFFLAGS := $(shell mkoctfile -p FFLAGS)
+MKF77FILE = FFLAGS="-fno-automatic $(MKFFLAGS)" $(MKOCTFILE)
LAPACK_LIBS := $(shell mkoctfile -p LAPACK_LIBS)
FLIBS := $(shell mkoctfile -p FLIBS)