Update of /cvsroot/fink/experimental/alexkhansen/common/finkinfo/sci
In directory vz-cvs-3.sog:/tmp/cvs-serv30095

Added Files:
        octave-10.7.patch octave-3.0.5.info octave-3.2.4.info 
        octave-3.2.4.patch octave.patch 
Log Message:
-ff2c for non-atlas variant

--- NEW FILE: octave-3.2.4.patch ---
diff -Nurd octave-3.2.4.orig/src/Makefile.in octave-3.2.4/src/Makefile.in
--- octave-3.2.4.orig/src/Makefile.in   2009-06-03 08:32:49.000000000 -0400
+++ octave-3.2.4/src/Makefile.in        2011-08-30 18:51:07.000000000 -0400
@@ -67,7 +67,7 @@
        cellfun.cc chol.cc ccolamd.cc colamd.cc colloc.cc \
        conv2.cc convhulln.cc daspk.cc dasrt.cc dassl.cc det.cc \
        dispatch.cc dlmread.cc dmperm.cc eig.cc eigs.cc fft.cc \
-       fft2.cc fftn.cc fftw.cc filter.cc find.cc fltk_backend.cc \
+       fft2.cc fftn.cc fftw.cc filter.cc find.cc  \
        gammainc.cc gcd.cc getgrent.cc getpwent.cc getrusage.cc \
        givens.cc hess.cc hex2num.cc inv.cc kron.cc lookup.cc \
        lsode.cc lu.cc luinc.cc matrix_type.cc max.cc md5sum.cc \
@@ -327,9 +327,6 @@
 $(DLD_PICOBJ): \
        ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS))
 
-fltk_backend.o pic/fltk_backend.o: \
-       ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS) 
$(GRAPHICS_CFLAGS))
-
 XERBLA = ../libcruft/blas-xtra/xerbla.o
 ifdef FPICFLAG
   PIC_XERBLA = ../libcruft/blas-xtra/pic/xerbla.o
@@ -669,7 +666,6 @@
 regexp.oct: OCT_LINK_DEPS += $(REGEX_LIBS)
 urlwrite.oct: OCT_LINK_DEPS += $(CURL_LIBS)
 __glpk__.oct: OCT_LINK_DEPS += $(GLPK_LIBS)
-fltk_backend.oct: OCT_LINK_DEPS += $(GRAPHICS_LIBS) $(FT2_LIBS)
 
 check: all
 .PHONY: check

--- NEW FILE: octave.patch ---
diff -Nurd -x'*~' octave-@[email protected]/src/DLD-FUNCTIONS/__glpk__.cc 
octave-@OCTVERSION@/src/DLD-FUNCTIONS/__glpk__.cc
--- octave-@[email protected]/src/DLD-FUNCTIONS/__glpk__.cc      2009-01-16 
01:46:23.000000000 -0500
+++ octave-@OCTVERSION@/src/DLD-FUNCTIONS/__glpk__.cc   2010-10-15 
17:50:25.000000000 -0400
@@ -59,8 +59,20 @@
 
 #else
 
-void _glp_lib_print_hook (int (*func)(void *info, char *buf), void *info);
-void _glp_lib_fault_hook (int (*func)(void *info, char *buf), void *info);
+void _glp_lib_print_hook (int (*func)(void *info, char *buf), void *info)
+{ /* stolen from glpk-4.26 */
+      int (*hook)(void *, const char *) = (int(*)(void *, const char *))
+         (func);
+      glp_term_hook(hook, info);
+      return;
+}
+
+void _glp_lib_fault_hook (int (*func)(void *info, char *buf), void *info)
+{ /* stolen from glpk-4.26 */
+      assert(func == func);
+      assert(info == info);
+      return;
+}
 
 #endif
 }
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-comp 
octave-@[email protected]//octave-forge-comp
--- octave-@OCTVERSION@//octave-forge-comp      1969-12-31 19:00:00.000000000 
-0500
+++ octave-@[email protected]//octave-forge-comp      2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,4 @@
+#!@FINKPREFIX@/bin/octave-@OCTVERSION@ -V
+pkg prefix bld/share/octave/@OCTVERSION@/packages 
bld/lib/octave/@OCTVERSION@/packages
+pkg global_list bld/share/octave/@OCTVERSION@/octave_packages
+pkg install -verbose -nodeps ./@PKGNAME@/
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-compile.sh 
octave-@[email protected]//octave-forge-compile.sh
--- octave-@OCTVERSION@//octave-forge-compile.sh        1969-12-31 
19:00:00.000000000 -0500
+++ octave-@[email protected]//octave-forge-compile.sh        2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,7 @@
+#!/bin/sh -ev
+cd ..
+mkdir -p bld/share/octave/@OCTVERSION@/packages 
bld/lib/octave/@OCTVERSION@/packages
+cp @FINKPREFIX@/share/octave/@OCTVERSION@/scripts/octave-forge-comp 
@FINKPREFIX@/share/octave/@OCTVERSION@/scripts/octave-forge-inst bld
+chmod a+x bld/octave-forge*
+sed -i.bak -e "s/@PKGNAME@/$1/" bld/octave-forge*
+bld/octave-forge-comp
\ No newline at end of file
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-inst 
octave-@[email protected]//octave-forge-inst
--- octave-@OCTVERSION@//octave-forge-inst      1969-12-31 19:00:00.000000000 
-0500
+++ octave-@[email protected]//octave-forge-inst      2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,7 @@
+#!@FINKPREFIX@/bin/octave-@OCTVERSION@ -q
+load share/octave/@OCTVERSION@/octave_packages;
+apfx = global_packages {1}.archprefix;
+global_packages {1}.archprefix = regexprep(apfx,'.*bld','@FINKPREFIX@');
+dr = global_packages {1}.dir;
+global_packages {1}.dir = regexprep(dr,'.*bld','@FINKPREFIX@');
+save -text share/octave/@OCTVERSION@/octave_packages global_packages
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-install.sh 
octave-@[email protected]//octave-forge-install.sh
--- octave-@OCTVERSION@//octave-forge-install.sh        1969-12-31 
19:00:00.000000000 -0500
+++ octave-@[email protected]//octave-forge-install.sh        2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,5 @@
+#!/bin/sh -ev
+cd $2
+cp -r $3/../bld/{share,lib} .
+$3/../bld/octave-forge-inst
+mv share/octave/@OCTVERSION@/octave_packages 
share/octave/@OCTVERSION@/packages/$1/.
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-postinst 
octave-@[email protected]//octave-forge-postinst
--- octave-@OCTVERSION@//octave-forge-postinst  1969-12-31 19:00:00.000000000 
-0500
+++ octave-@[email protected]//octave-forge-postinst  2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,6 @@
+#!@FINKPREFIX@/bin/octave-@OCTVERSION@ -q
+load @FINKPREFIX@/share/octave/@OCTVERSION@/packages/@PKGNAME@/octave_packages
+newpackage = global_packages;
+load @FINKPREFIX@/var/octave/@OCTVERSION@/octave_packages
+global_packages = {global_packages{:},newpackage{:}};
+save -text @FINKPREFIX@/var/octave/@OCTVERSION@/octave_packages global_packages
diff -Nurd '-x*~' octave-@OCTVERSION@//octave-forge-prerm 
octave-@[email protected]//octave-forge-prerm
--- octave-@OCTVERSION@//octave-forge-prerm     1969-12-31 19:00:00.000000000 
-0500
+++ octave-@[email protected]//octave-forge-prerm     2011-08-11 
20:23:10.000000000 -0400
@@ -0,0 +1,9 @@
+#!@FINKPREFIX@/bin/octave-@OCTVERSION@ -q
+load @FINKPREFIX@/var/octave/@OCTVERSION@/octave_packages
+for i = 1:length(global_packages)
+  if strcmp(global_packages{i}.name,'@PKGNAME@')
+    global_packages(i) = [];
+    break
+  endif
+endfor
+save -text @FINKPREFIX@/var/octave/@OCTVERSION@/octave_packages global_packages
diff -Naur startup/octaverc.null startup/octaverc
--- startup/octaverc.null       2011-08-12 14:21:47.000000000 -0400
+++ startup/octaverc    2011-08-12 12:32:41.000000000 -0400
@@ -0,0 +1,24 @@
+## System-wide startup file for Octave.
+##
+## This file should contain any commands that should be executed each
+## time Octave starts for every user at this site.
+
+## Configure readline using the file inputrc in the Octave startup
+## directory.
+
+read_readline_init_file (sprintf ("%s%s%s",
+                                 octave_config_info ("startupfiledir"),
+                                 filesep, "inputrc"));
+
+if (strcmp (PAGER (), "less") && isempty (getenv ("LESS")))
+  PAGER_FLAGS ('-e -X -P"-- less ?pB(%pB\\%):--. (f)orward, (b)ack, (q)uit$"');
+endif
+
+## This appears here instead of in the pkg/PKG_ADD file so that --norc
+## will also skip automatic loading of packages.
+
+try 
+       pkg global_list @FINKPREFIX@/var/octave/@OCTVERSION@/octave_packages
+catch
+end_try_catch
+pkg ("load", "auto");
diff -Nurd '-x*~' octave-@OCTVERSION@/doc/interpreter/mkoctfile-@[email protected] 
octave-@[email protected]/doc/interpreter/mkoctfile-@[email protected]
--- octave-@OCTVERSION@/doc/interpreter/mkoctfile-@[email protected]        
2011-08-12 22:01:38.000000000 -0400
+++ octave-@[email protected]/doc/interpreter/mkoctfile-@[email protected]        
2011-08-12 22:18:42.000000000 -0400
@@ -19,11 +19,11 @@
 .\"
 .\" This page was contributed by Dirk Eddelbuettel <[email protected]>
 .\"
-.TH MKOCTFILE 1 "1 November 2002" "GNU Octave"
+.TH mkoctfile-@OCTVERSION@ 1 "1 November 2002" "GNU Octave"
 .SH NAME
-mkoctfile \- Compile dynamic-load modules for GNU Octave
+mkoctfile-@OCTVERSION@ \- Compile dynamic-load modules for GNU Octave
 .SH SYNOPSIS
-.BR mkoctfile\  [\-IDIR]\ [\-DDEF]\ [\-lLIB]\ [\-LDIR]\ [\-M|\-\-depend]\ 
+.BR mkoctfile-@OCTVERSION@\  [\-IDIR]\ [\-DDEF]\ [\-lLIB]\ [\-LDIR]\ 
[\-M|\-\-depend]\ 
 [\-c]\ [\-o FILE|\-\-output FILE]\ [\-p VAR|\-\-print VAR]\ [\-s|\-\-strip]\ 
 [\-v|\-\-verbose]\ [\-h|\-?|\-\-help]\ \fIfile\fP .\|.\|.  
 .SH DESCRIPTION
diff -Nurd '-x*~' octave-@OCTVERSION@/doc/interpreter/octave-@[email protected] 
octave-@[email protected]/doc/interpreter/octave-@[email protected]
--- octave-@OCTVERSION@/doc/interpreter/octave-@[email protected]   2011-08-12 
22:00:40.000000000 -0400
+++ octave-@[email protected]/doc/interpreter/octave-@[email protected]   
2011-08-12 22:18:40.000000000 -0400
@@ -16,19 +16,19 @@
 .\" along with Octave; see the file COPYING.  If not, see
 .\" <http://www.gnu.org/licenses/>.
 .\"
-.TH Octave 1 "Jan 8 1996"
+.TH Octave-@OCTVERSION@ 1 "Jan 8 1996"
 .SH NAME
-octave \- A high-level interactive language for numerical computations.
+octave-@OCTVERSION@ \- A high-level interactive language for numerical 
computations.
 .SH SYNOPSIS
 .nf
-octave [options]
+octave-@OCTVERSION@ [options]
 .fi
 .SH OPTIONS
-The complete set of command-line options for octave is available by
+The complete set of command-line options for octave-@OCTVERSION@ is available 
by
 running the command
 .nf
 
-    octave \-\-help
+    octave-@OCTVERSION@ \-\-help
 
 .fi
 .SH DESCRIPTION
diff -Nurd '-x*~' octave-@OCTVERSION@/doc/interpreter/octave-bug-@[email protected] 
octave-@[email protected]/doc/interpreter/octave-bug-@[email protected]
--- octave-@OCTVERSION@/doc/interpreter/octave-bug-@[email protected]       
2011-08-12 22:01:04.000000000 -0400
+++ octave-@[email protected]/doc/interpreter/octave-bug-@[email protected]       
2011-08-12 22:13:25.000000000 -0400
@@ -18,18 +18,18 @@
 .\"
 .\" This page was contributed by Dirk Eddelbuettel <[email protected]>
 .\" 
-.TH octave-bug 1 "6 March 2000" GNU
+.TH octave-bug-@OCTVERSION@ 1 "6 March 2000" GNU
 .SH NAME
-octave-bug \- report a bug in GNU Octave
+octave-bug-@OCTVERSION@ \- report a bug in GNU Octave
 .SH SYNOPSIS
-.B octave-bug
+.B octave-bug-@OCTVERSION@
 .RB [\| \-s
 .IR subject \|]
 .SH DESCRIPTION
-.B octave-bug
+.B octave-bug-@OCTVERSION@
 is a shell script to help the user compose and mail bug reports
 concerning Octave in a standard format.  
-.B octave-bug
+.B octave-bug-@OCTVERSION@
 is typically invoked by the Octave command
 .B bug_report
 which is intended to be called interactively from within Octave. This
@@ -37,7 +37,7 @@
 template bug report file and starts an editor on that file.  The bug report
 will be sent to the bug-octave mailing list once the editing has been
 completed (this assumes of course that your system can use email). However,
-the user could also call \fBoctave-bug\fR outside of Octave.
+the user could also call \fBoctave-bug-@OCTVERSION@\fR outside of Octave.
 .PP
 Please read the `Bugs' chapter in the Octave manual to find out how to submit
 a bug report that will enable the Octave maintainers to fix the problem.  If
@@ -50,7 +50,7 @@
 be quoted.
 .SH ENVIRONMENT VARIABLES
 .B 
-octave-bug 
+octave-bug-@OCTVERSION@ 
 uses the environment variables
 .BR USER, 
 .BR EDITOR, 
@@ -60,7 +60,7 @@
 .SH VERSION
 This document was last revised for Octave version 2.0.16.
 .SH SEE ALSO
-.BR octave (1),
+.BR octave-@OCTVERSION@ (1),
 .BR bashbug (1)     
 .SH AUTHOR
 .nf
diff -Nurd '-x*~' 
octave-@OCTVERSION@/doc/interpreter/octave-config-@[email protected] 
octave-@[email protected]/doc/interpreter/octave-config-@[email protected]
--- octave-@OCTVERSION@/doc/interpreter/octave-config-@[email protected]    
2011-08-12 22:01:22.000000000 -0400
+++ octave-@[email protected]/doc/interpreter/octave-config-@[email protected]    
2011-08-12 22:18:38.000000000 -0400
@@ -18,23 +18,23 @@
 .\"
 .\" This page was contributed by Dirk Eddelbuettel <[email protected]>.
 .\" 
-.TH OCTAVE-CONFIG 1 "19 February 2003" "GNU Octave"
+.TH OCTAVE-CONFIG-@OCTVERSION@ 1 "19 February 2003" "GNU Octave"
 .SH NAME
-octave-config - GNU Octave component and library information retrieval
+octave-config-@OCTVERSION@ - GNU Octave component and library information 
retrieval
 .SH SYNOPSIS
-.B octave-config
+.B octave-config-@OCTVERSION@
 .RI [ options ]
 .SH DESCRIPTION
 .PP
-.B octave-config
+.B octave-config-@OCTVERSION@
 is a tool to obtain directory information for 
 .I .oct
 and 
 .I .m
 files for
-.BR octave (1).
+.BR octave-@OCTVERSION@ (1).
 .SH OPTIONS
-.B octave-config
+.B octave-config-@OCTVERSION@
 accepts the following options:
 .TP 8
 .B \--m-site-dir
@@ -72,7 +72,7 @@
 .TP 8
 .B \-h|-?|--help
 Display a help page about
-.B octave-config
+.B octave-config-@OCTVERSION@
 .SH AUTHOR
 John W. Eaton <[email protected]>
 
diff -Naur octave-3.2.4/mkoctfile.in octave-3.2.4.patched/mkoctfile.in
--- octave-3.2.4/mkoctfile.in   2009-05-25 02:04:59.000000000 -0400
+++ octave-3.2.4.patched/mkoctfile.in   2011-09-05 14:13:08.000000000 -0400
@@ -71,10 +71,10 @@
 : ${F77=%OCTAVE_CONF_F77%}
 : ${FFLAGS=%OCTAVE_CONF_FFLAGS%}
 : ${FPICFLAG=%OCTAVE_CONF_FPICFLAG%}
-: ${CC=%OCTAVE_CONF_CC%}
+: ${CC=@WHICH_CC@}
 : ${CFLAGS=%OCTAVE_CONF_CFLAGS%}
 : ${CPICFLAG=%OCTAVE_CONF_CPICFLAG%}
-: ${CXX=%OCTAVE_CONF_CXX%}
+: ${CXX=@WHICH_CXX@}
 : ${CXXFLAGS=%OCTAVE_CONF_CXXFLAGS%}
 : ${CXXPICFLAG=%OCTAVE_CONF_CXXPICFLAG%}
 : ${XTRA_CFLAGS=%OCTAVE_CONF_XTRA_CFLAGS%}
@@ -83,7 +83,7 @@
 : ${DEPEND_FLAGS=%OCTAVE_CONF_DEPEND_FLAGS%}
 : ${DEPEND_EXTRA_SED_PATTERN=%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%}
 
-: ${DL_LD=%OCTAVE_CONF_DL_LD%}
+: ${DL_LD=@WHICH_CXX@}
 : ${DL_LDFLAGS=%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%}
 
 : ${RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%}
@@ -96,7 +96,7 @@
 : ${FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%}
 : ${LIBS=%OCTAVE_CONF_LIBS%}
 : ${FLIBS=%OCTAVE_CONF_FLIBS%}
-: ${LD_CXX=%OCTAVE_CONF_LD_CXX%}
+: ${LD_CXX=@WHICH_CXX@}
 : ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%}
 : ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%}
 : ${LFLAGS=$DEFAULT_LFLAGS}
 

--- NEW FILE: octave-3.2.4.info ---
Info2: <<
Package: octave%type_pkg[-atlas]
Type: -atlas (.), oct(3.2.4)
Version: 3.2.4
Revision: 23
Maintainer: Alexander Hansen <[email protected]>

# disable atlas on 10.7 distro file until atlas is available

Source: mirror:gnu:%{Ni}/%{Ni}-%v.tar.gz
Source-MD5: 90c39fa9e241ad2e978bcee4682a2ba9

BuildDepends: <<
        arpack (>= 96patched-5), glpk-dev, hdf5.7, readline5, libncurses5, 
fftw3 (>= 3.1.1-7), 
        libcurl4, libftgl2, qhull6-dev, flag-sort,
        pcre, gcc46-compiler, suitesparse-metis, fink (>= 0.30.0), 
fink-package-precedence, sed, 
        graphicsmagick-dev, freetype219,
        (%type_raw[-atlas] = atlas) atlas, 
        (%type_raw[-atlas] = atlas) qrupdate-atlas (>=1.1.1-3) 
        (%type_raw[-atlas] != atlas) qrupdate (>=1.1.1-3) 
<<
Depends: %{Ni}%type_pkg[oct]%type_pkg[-atlas] (=%v-%r)
BuildConflicts: coot-dev, broken-gcc, lammpi-dev, fort77, 4ti2-dev
Suggests: %{Ni}%type_pkg[oct]-docs
GCC: 4.0

Conflicts: <<
        (%type_raw[-atlas] = atlas) %{Ni}, (%type_raw[-atlas] != -atlas) 
%{Ni}-atlas, 
        %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5) 
        <<
Replaces: %{Ni}, %{Ni}-atlas, %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 
3.0.2-5)
UseMaxBuildJobs: false

PatchFile: %{ni}.patch
PatchFile-MD5: ce167f65e283dccf624e888c1a0a8725
PatchFile2: %{ni}-%v.patch
PatchFile2-MD5: 28dea047c7b3e51539a35b76249c8f67
PatchFile3: %{ni}-10.7.patch
PatchFile3-MD5: adf5439f08870b6f7ba0d9be7e85bb22
PatchScript: <<
        #!/bin/sh -ev
        cp doc/interpreter/%{Ni}.1 doc/interpreter/%{Ni}-%v.1
        cp doc/interpreter/%{Ni}-bug.1 doc/interpreter/%{Ni}-bug-%v.1
        cp doc/interpreter/%{Ni}-config.1 doc/interpreter/%{Ni}-config-%v.1
        cp doc/interpreter/mkoctfile.1 doc/interpreter/mkoctfile-%v.1
        sed -e 's/@OCTVERSION@/%v/g' %{PatchFile} | patch -p1 
        sed -i -e 's|@FINKPREFIX@|%p|g'   %{Ni}-forge* %{Ni}rc 
doc/interpreter/*.1 mkoctfile.in
        # fix lib name for qhull6
        perl -pi -e 's|(qhull[/.])|lib\1|g ; s|lqhull|lqhull6|' configure
        # wrong include dir for qhull6
        for f in `grep -l -r "qhull_a\.h" src`
                do sed -i.orig -e '/include/s|qhull/|lib&|' $f
        done
        # more patching by fangism
        # silence some warnings
        sed -i.orig -e '/ibasea/s|\*ibasea, ||' \
                -e '/ibasea/s| ibasea =.*||' \
                liboctave/oct-sort.cc
        # should this accompany -D_THREAD_SAFE? in CFLAGS,CXXFLAGS
        sed -i.orig -e '/#include.*Range\.h/i\
#define _REENTRANT' liboctave/lo-specfun.cc
        # need size_t from <cstddef>
        sed -i.orig -e '/#define octave_oct_alloc_h/a\
using std::size_t;' liboctave/oct-alloc.h
        # needed by clang++, safe for g++: using-declaration as typedef
        for f in liboctave/DiagArray2.h liboctave/intNDArray.h
        do sed -i.orig -e '/using.*element_type;/s|using|& typename|' $f
        done
        # missing qualifier to dependent-name member-function
        sed -i.orig -e '/truncate_int/s|\(return\) \(truncate_int\)|\1 
octave_int_base<T>::\2|' liboctave/oct-inttypes.h
        # disable FLTK backend
        patch -p1 < %{PatchFile2}
        # fix lack of CGDisplayBitsPerPixel
        patch -p1 < %{PatchFile3}
    perl -pi -e 's/scripts doc/scripts/; s/INSTALL.OCTAVE//' Makefile
<<

SetCC: flag-sort -r gcc
SetCXX: flag-sort -r g++
SetLDFLAGS: -Wl,-dead_strip_dylibs
SetLIBS: -lGraphicsMagick -lmetis
ConfigureParams: <<
        F77=%p/bin/gfortran-fsf-4.6 --host=%m-apple-darwin 
--build=%m-apple-darwin \
        --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' 
--libexecdir='${prefix}/lib' \
        --enable-shared --enable-dl --disable-static --without-mpi --with-hdf5 
--with-fftw \
        --x-libraries=/usr/X11/lib --x-includes=/usr/X11/include
<<
CompileScript: <<
 #!/bin/sh -ev
 export CFLAGS='-O3'
 export CXXFLAGS='-O3'
 export FFLAGS='-O3'
 if [ "%type_pkg[-atlas]" == "" ]
 then 
        
a='--with-lapack=-Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
 
--with-blas=-Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib'
        export FFLAGS='-O3 -ff2c'
 else 
        a='--with-lapack=%p/lib/liblapack.dylib 
--with-blas=%p/lib/libf77blas.dylib'
    export FFLAGS='-O3'
 fi
 FLIBDIR="%p/lib/gcc4.6/lib"
 ./configure FLIBS="${FLIBDIR}/libgfortran.dylib" %c $a
 make
 fink-package-precedence --depfile-ext='\.d$' 
--prohibit-bdep=%{Ni},%{Ni}-atlas,%{Ni}%type_raw[oct]-dev,%{Ni}%type_raw[oct]-atlas-dev,%{Ni}305-dev,%{Ni}305-atlas-dev,saclib-gcc46,saclib
 src
<<

InfoTest: <<
        TestScript: <<
                mv scripts/image/imread.m scripts/image/imread.m.testfails
                make check || exit 2    
                mv scripts/image/imread.m.testfails scripts/image/imread.m
        <<
<<

InstallScript: <<
 #!/bin/sh -ev
 export MAKEFLAGS=-j1
 make install DESTDIR=%d
 # install Fink-specific octaverc which points at our oct-versioned
 # package directory
 cp %b/%{Ni}rc %i/share/%{Ni}/%v/m/startup
 mkdir -p %i/var/%{Ni}/%v/
 # install examples
 mkdir -p %i/share/%{Ni}/%v/doc/examples
 cp -R examples %i/share/%{Ni}/%v/doc/examples
 pushd %i/bin 
 # clear out hardcoded Fink sed
 for file in mkoctfile-%v %{Ni}-bug-%v %{Ni}-config-%v 
 do
        perl -pi -e 's|%p/bin/sed|/usr/bin/sed|g' $file
 done
 popd 
 # remove autogenerated freedesktop.org desktop file
 rm -f %i/share/applications/www.%{Ni}.org-%{Ni}.desktop
 mkdir -p %i/share/%{Ni}/%v/scripts
 # install the octave-forge helper scripts
 cp %{Ni}-forge* %i/share/%{Ni}/%v/scripts
 chmod a+x %i/share/%{Ni}/%v/scripts/*
 # oct-conf.h and octave-bug need to use Fink's compiler wrappers, too
 sed -i.bak -e 's|flag-sort -r gcc|@WHICH_CC@|g' \
                        -e 's|flag-sort -r g++|@WHICH_CXX@|g' \
                        %i/include/%{Ni}-%v/%{Ni}/oct-conf.h %i/bin/%{Ni}-bug-%v
 # for the -atlas variant, add libcblas.dylib to BLAS_LIBS:
 perl -pi -e 's|(%p/lib/liblapack.dylib %p/lib/libf77blas.dylib)|$1 
%p/lib/libcblas.dylib|' \
 %i/bin/mkoctfile-%v %i/include/%{ni}-%v/%{ni}/oct-conf.h %i/bin/%{ni}-bug-%v
<<
InfoDocs: %{Ni}.info
RuntimeVars: <<
 GNUTERM: aqua
<<
DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING

SplitOff: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]-shlibs
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-shlibs, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-shlibs, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-shlibs, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-shlibs, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<      
        Depends: << 
                fftw3-shlibs, gcc46-shlibs, hdf5.7-shlibs, readline5-shlibs, 
                (%type_raw[-atlas] = -atlas) atlas-shlibs (>= 3.8.1-1),
                (%type_raw[-atlas] = -atlas) qrupdate-atlas-shlibs (>= 
1.1.1-3), 
                (%type_raw[-atlas] != -atlas) qrupdate-shlibs (>= 1.1.1-3)
        <<
        Files: <<
                lib/%{Ni}-%v
        <<
        Shlibs: <<
                %p/lib/%{Ni}-%v/libcruft.dylib 0.0.0 %n (>=3.2.4-1)
                %p/lib/%{Ni}-%v/lib%{Ni}.dylib 0.0.0 %n (>=3.2.4-1)
                %p/lib/%{Ni}-%v/liboctinterp.dylib 0.0.0 %n (>=3.2.4-1)
        <<
        DescDetail: <<
        This package contains shared libraries which are used by the Octave
        interpreter itself, as well as for packages that build against Octave, 
        such as the various octave-forge packages.
        <<
        DescUsage: <<
        To use mkoctfile to build dynamically loadable modules, you will need 
        to install the hdf5-oldapi and fftw3 packages, as well as 
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
        It cannot Depend on them since they are BuildDependsOnly.

        Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or 
        installs an extension should Depend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend
        on %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need 
to BuildDepend on
        hdf5-oldapi and fftw3.
        <<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<
SplitOff2: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]-dev
        Depends: octave%type_pkg[oct]%type_pkg[-atlas]-shlibs (=%v-%r), 
gcc46-compiler, (%type_raw[-atlas] = atlas) atlas (>= 3.8.1-1)
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5),
                %{Ni}305-dev, %{Ni}305-atlas-dev,  %{Ni}342-dev, 
%{Ni}342-atlas-dev
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5),
                %{Ni}305-dev, %{Ni}305-atlas-dev,  %{Ni}342-dev, 
%{Ni}342-atlas-dev
        <<
        BuildDependsOnly: true
        Files: <<
                include/%{Ni}-%v
                bin/mkoctfile*
                bin/octave-config*
                share/man/man1/mkoctfile.1
                share/man/man1/octave-config.1
        <<
        PostInstScript: <<
                finkpath=`fink dumpinfo -ePATH %N`
                fink_cc=`export $finkpath; which gcc`
                fink_cxx=`export $finkpath; which g++`
                sed -i.bak      -e "s|@WHICH_CC@|$fink_cc|g" \
                                        -e "s|@WHICH_CXX@|$fink_cxx|g" \
                                        %p/bin/mkoctfile-%type_raw[oct] \
                                        %p/include/%{Ni}-%v/%{Ni}/oct-conf.h
        <<
        DescDetail: <<
        This package contains files needed to build against Octave, including
        headers and the mkoctfile executable.
        
        Note: mkoctfile encodes the compiler wrappers that Fink uses.  
        Use "fink reinstall %n" if you update your OS in-place
        and it will be updated for your new OS version.
        <<
        DescUsage: <<
        To use mkoctfile to build dynamically loadable modules, you will need   
        to install the hdf5-oldapi and fftw3 packages, as well as 
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
        It cannot Depend on them since they are BuildDependsOnly.

        Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or 
        installs an extension should Depend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend
        on %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need 
to BuildDepend on
        hdf5-oldapi and fftw3.
        <<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<

Splitoff3: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]
        Depends: <<
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs (=%v-%r),
        arpack-shlibs(>= 96patched-5), fftw3-shlibs (>= 3.1.1-7), glpk-shlibs,
        graphicsmagick-shlibs, libcurl4-shlibs, 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs, pcre-shlibs, 
        qhull6-shlibs, (%type_raw[-atlas] = -atlas) atlas-shlibs (>= 3.8.1-1),
        ncurses, gnuplot | gnuplot-nox | gnuplot-nogtk,
        fltk-backend-aqua-oct%type_pkg[oct] | fltk-backend-x11-oct%type_pkg[oct]
        <<
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct], 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Files: <<
                share/%{Ni}/%v
                lib/%{Ni}/%v
                bin/%{Ni}-%v
                bin/%{Ni}-bug-%v
                var/%{Ni}/%v
        <<
        PostInstScript: <<
                finkpath=`fink dumpinfo -ePATH %N`
                fink_cc=`export $finkpath; which gcc`
                fink_cxx=`export $finkpath; which g++`
                sed -i.bak      -e "s|@WHICH_CC@|$fink_cc|g" \
                                        -e "s|@WHICH_CXX@|$fink_cxx|g" \
                                         %p/bin/%{Ni}-bug-%v
        <<
        DescDetail: <<
        The %{Ni}%type_pkg[oct]%type_pkg[-atlas] package contains versioned 
executables, as well as all of the 
        core functionality of the Octave interpreter.  Note that the GNU info 
file, 
        which provides the core documentation, is installed as part of the %{Ni}
    package.
    
        Octave provides a convenient command line interface for solving linear 
and 
        nonlinear problems numerically, and for performing other numerical 
        experiments using a language that is mostly compatible with Matlab.
        It may also be used as a batch-oriented language.

        Octave has extensive tools for solving common numerical linear algebra
        problems, finding the roots of nonlinear equations, integrating ordinary
        functions, manipulating polynomials, and integrating ordinary 
differential
        and differential-algebraic equations. It is easily extensible and 
        customizable via user-defined functions written in Octave's own 
language, 
        or using dynamically loaded modules written in C++, C, Fortran, 
        or other languages.
        <<
        DescUsage: <<
        By default the plotting output (via gnuplot) is directed to AquaTerm. 
        This can be overidden in your startup scripts, e.g.
 
                export GNUTERM=x11
 
        in bash
 
        or
 
                setenv GNUTERM x11
 
        in tcsh.
 
        Note:  Fink's Octave implementation modifies one of the startup files,
        %p/share/%{Ni}/%v/m/startup/octaverc,
        to initialize octave sessions to know about Fink's octave-versioned 
        install location for octave-forge packages.  If you use the '--norc' 
        or '-f' flags in your Octave script, these packages won't be visible.  
        You'll need torun the following command in your script:
 
                pkg global_list %p/var/octave/%v/octave_packages
<<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<

Description: MATLAB-like language for computations
DescDetail: <<
The %{Ni}%type_pkg[-atlas] package contains unversioned executables and an 
unversioned directory tree.  

Octave provides a convenient command line interface for solving linear and 
nonlinear problems numerically, and for performing other numerical 
experiments using a language that is mostly compatible with Matlab.
It may also be used as a batch-oriented language.

Octave has extensive tools for solving common numerical linear algebra
problems, finding the roots of nonlinear equations, integrating ordinary
functions, manipulating polynomials, and integrating ordinary differential
and differential-algebraic equations. It is easily extensible and 
customizable via user-defined functions written in Octave's own language, 
or using dynamically loaded modules written in C++, C, Fortran, 
or other languages.
        
Note: mkoctfile encodes the compiler wrappers that Fink uses.  
Use "fink reinstall %{Ni}%v%type_pkg[atlas]" if you update your OS in-place
and it will be updated for your new OS version.

<<
DescUsage: << 
To use mkoctfile to build dynamically loadable modules, you will need 
to install the hdf5-oldapi and fftw3 packages, as well as 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
It cannot Depend on them since they are BuildDependsOnly.

Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or installs an extension should Depend on
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need to 
BuildDepend on hdf5-oldapi and fftw3.
 
By default the plotting output (via gnuplot) is directed to AquaTerm. 
This can be overidden in your startup scripts, e.g.
 
        export GNUTERM=x11
 
in bash
 
or
 
        setenv GNUTERM x11
 
in tcsh.
 
Note:  Fink's Octave implementation modifies one of the startup files,
%p/share/%{Ni}/%v/m/startup/octaverc,
to initialize octave sessions to know about Fink's octave-versioned 
install location for octave-forge packages.  If you use the '--norc' or '-f'
flags in your Octave script, these packages won't be visible.  You'll need to
run the following command in your script:
 
        pkg global_list %p/var/octave/%v/octave_packages
 
<<
DescPort: <<
Thanks to Per Persson for most (if not all) of the work on the macos X port.

Apply fix from 
http://lukassen.wordpress.com/2010/01/18/taming-snow-leopard-cgdisplaybitsperpixel-deprication/
 ,
with improvements from Peter O'Gorman and Daniel Macks, to display.cc to work 
around the lack of 
CGDisplayBitsPerPixel on 10.7.

Cleanups from David Fang to get the package to build using clang.
<<
DescPackaging:  <<
Not sane (and now not even compilable) to use private code
from glpk. Import the functions needed so can still use it
even when glpk stops exporting its internals. See:
        
http://octave.1599824.n4.nabble.com/GLPK-interface-was-Re-Multithreaded-Atlas-td1654632.html
 
Set the GNUTERM environment variable to AquaTerm because autodetection
of DISPLAY seems to cause options to be fed to our gnuplot that it doesn't 
understand.
AquaTerm seems to be a sensible default, particularly since gnuplot-nox is also 
a 
legal dependency.

Create manpages for the versioned executables.

Remove a desktop file that gets generated only for users with GNOME/KDE 
installed.

Patch mkoctfile.in so that it uses Fink's compiler wrappers
when building octave packages by hand.  This is critical for 10.6/i386 users.

We have split the package up into runtime, development, and library packages,
to make upgrades easier for us and for users.
        
We generate common octave-forge bash and octave scripts, 
based on the ones by Johnathan Stickel in the original octave-forge-foo 
packages, in _this_ package, so that any required changes can be made in 
a common location rather than spread out over many packages.
Unfortunately, Octave's 'pkg' tool doesn't seem to know how to deal with 
variables, and the individual octave-forge  packages have to make copies
of the octave scripts during their build process and edit them to use the
package's name.

We don't build the FLTK backend since we are allowing for Aqua and X11 variants
of that bundle in the fltk-backend-{aqua|x11}.

Patch mkoctfile-%v to use fink's compiler wrappers.  This is done via a 
two-stage patch 
in the PatchScript and then in the PostInstScript of octave%type_pkg[oct]-dev 
to allow for
OS upgrades.

Octave encodes the name of the compilers used to build it in oct-conf.h, and 
unfortunately
that includes "flag-sort gcc -r" and "flag-sort g++ -r".  To avoid forcing 
users to have
flag-sort, and so that it isn't required in our own Octave Forge package 
builds, we apply
a two-stage patch in the InstallScript and the PostInstScript of 
octave%type_pkg[oct]-dev
to use fink's compiler wrappers.
<<
Homepage: http://www.octave.org/
License: GPL
<<

--- NEW FILE: octave-10.7.patch ---
diff -Nurd octave-3.2.4.orig/src/display.cc octave-3.2.4/src/display.cc
--- octave-3.2.4.orig/src/display.cc    2009-08-13 01:56:02.000000000 -0400
+++ octave-3.2.4/src/display.cc 2011-08-31 10:55:44.000000000 -0400
@@ -37,6 +37,9 @@
 #include "display.h"
 #include "error.h"
 
+/* for 10.7 */
+size_t displayBitsPerPixel (CGDirectDisplayID displayId);
+
 display_info *display_info::instance = 0;
 
 void
@@ -70,7 +73,9 @@
 
       if (display)
        {
-         dp = CGDisplayBitsPerPixel (display);
+
+         /*dp = CGDisplayBitsPerPixel (display);*/
+         dp = displayBitsPerPixel (display);
 
          ht = CGDisplayPixelsHigh (display);
          wd = CGDisplayPixelsWide (display);
@@ -85,6 +90,7 @@
 
          rx = wd * 25.4 / wd_mm;
          ry = ht * 25.4 / ht_mm;
+
        }
       else
        warning ("no graphical display found");
@@ -149,6 +155,23 @@
 
   return retval;
 }
+      
+size_t displayBitsPerPixel (CGDirectDisplayID displayId) {
+       CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displayId);
+       size_t depth = 0;
+
+       CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode);
+       if(CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), 
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+               depth = 32;
+       else if(CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), 
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+               depth = 16;
+       else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), 
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+               depth = 8;
+
+       CFRelease(pixEnc);
+       CFRelease(mode);
+       return depth;
+}
 
 /*
 ;;; Local Variables: ***

--- NEW FILE: octave-3.0.5.info ---
Info2: <<
Package: octave%type_pkg[-atlas]
Type: -atlas (.), oct(3.0.5)
Version: 3.0.5
Revision: 23
Maintainer: Alexander Hansen <[email protected]>

# disable atlas on 10.7 distro file until atlas is available

Source: mirror:gnu:%{Ni}/%{Ni}-%v.tar.bz2
Source-MD5: bfba44eeda8fa6e29c2bbcd2604c34eb

BuildDepends: <<
        glpk-dev, hdf5.7-oldapi, readline5, libncurses5, fftw3 (>= 3.1.1-7), 
libcurl4, 
        pcre, gcc46-compiler, suitesparse-metis, metis, qhull6-dev, fink (>= 
0.28), fink-package-precedence, sed,
        (%type_raw[-atlas] = atlas) atlas, flag-sort
<<
Depends: %{Ni}%type_pkg[oct]%type_pkg[-atlas] (=%v-%r)
BuildConflicts: coot-dev, broken-gcc, lammpi-dev, fort77, 4ti2-dev
Suggests: %{Ni}%type_pkg[oct]-docs
GCC: 4.0

Conflicts: <<
        (%type_raw[-atlas] = atlas) %{Ni}, (%type_raw[-atlas] != -atlas) 
%{Ni}-atlas, 
        %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5) 
        <<
Replaces: %{Ni}, %{Ni}-atlas, %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 
3.0.2-5) 
UseMaxBuildJobs: false

PatchFile: %{ni}.patch
PatchFile-MD5: ce167f65e283dccf624e888c1a0a8725
PatchScript: <<
        #!/bin/sh -ev
        cp doc/interpreter/%{Ni}.1 doc/interpreter/%{Ni}-%v.1
        cp doc/interpreter/%{Ni}-bug.1 doc/interpreter/%{Ni}-bug-%v.1
        cp doc/interpreter/%{Ni}-config.1 doc/interpreter/%{Ni}-config-%v.1
        cp doc/interpreter/mkoctfile.1 doc/interpreter/mkoctfile-%v.1
        sed -e 's/@OCTVERSION@/%v/g' %{PatchFile} | patch -p1 
        sed -i -e 's|@FINKPREFIX@|%p|g'   %{Ni}-forge* %{Ni}rc 
doc/interpreter/*.1 mkoctfile.in
        # fix lib name for qhull6
        perl -pi -e 's|(qhull[/.])|lib\1|g ; s|lqhull|lqhull6|' configure
        # wrong include dir for qhull6
        for f in `grep -l -r "qhull_a\.h" src`
                do sed -i.orig -e '/include/s|qhull/|lib&|' $f
        done
<<

SetCC: flag-sort -r gcc
SetCXX: flag-sort -r g++
SetCPPFLAGS: -I%p/opt/hdf5v1.6/include
SetLDFLAGS: -Wl,-dead_strip_dylibs -L%p/opt/hdf5v1.6/lib
SetLIBS: -lmetis
ConfigureParams: <<
        F77=%p/bin/gfortran-fsf-4.6 --host=%m-apple-darwin 
--build=%m-apple-darwin \
        --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' 
--libexecdir='${prefix}/lib' \
        --enable-shared --enable-dl --disable-static --without-mpi --with-hdf5 
--with-fftw
<<
CompileScript: <<
 #!/bin/sh -ev
 export CFLAGS='-O3'
 export CXXFLAGS='-O3'
 export FFLAGS='-O3'
 if [ "%type_pkg[-atlas]" == "" ]
 then 
        
a='--with-lapack=-Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
 
--with-blas=-Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib'
        export FFLAGS='-O3 -ff2c'
 else 
        a='--with-lapack=%p/lib/liblapack.dylib 
--with-blas=%p/lib/libf77blas.dylib'
    export FFLAGS='-O3'
 fi
 FLIBDIR="%p/lib/gcc4.6/lib"
 ./configure FLIBS="${FLIBDIR}/libgfortran.dylib" %c $a
 make
 fink-package-precedence --depfile-ext='\.d$' 
--prohibit-bdep=%{Ni},%{Ni}-atlas,%{Ni}%type_raw[oct]-dev,%{Ni}%type_raw[oct]-atlas-dev,%{Ni}305-dev,%{Ni}305-atlas-dev,saclib-gcc46,saclib
 src
<<

InfoTest: <<
        TestScript: make check || exit 2        
<<

InstallScript: <<
 #!/bin/sh -ev
 export MAKEFLAGS=-j1
 make install DESTDIR=%d
 # install Fink-specific octaverc which points at our oct-versioned
 # package directory
 cp %b/%{Ni}rc %i/share/%{Ni}/%v/m/startup
 mkdir -p %i/var/%{Ni}/%v/
 # install examples
 mkdir -p %i/share/%{Ni}/%v/doc/examples
 cp -R examples %i/share/%{Ni}/%v/doc/examples
 pushd %i/bin 
 # clear out hardcoded Fink sed
 for file in mkoctfile-%v %{Ni}-bug-%v %{Ni}-config-%v 
 do
        perl -pi -e 's|%p/bin/sed|/usr/bin/sed|g' $file
 done
 popd 
 # remove TeX stuff which may have been generated:
 rm %i/share/%{Ni}/ls-R %i/lib/%{Ni}/ls-R
 # remove autogenerated freedesktop.org desktop file
 rm -f %i/share/applications/www.%{Ni}.org-%{Ni}.desktop
 mkdir -p %i/share/%{Ni}/%v/scripts
 # install the octave-forge helper scripts
 cp %{Ni}-forge* %i/share/%{Ni}/%v/scripts
 chmod a+x %i/share/%{Ni}/%v/scripts/*
 # oct-conf.h and octave-bug need to use Fink's compiler wrappers, too
 sed -i.bak -e 's|flag-sort -r gcc|@WHICH_CC@|g' \
                        -e 's|flag-sort -r g++|@WHICH_CXX@|g' \
                        %i/include/%{Ni}-%v/%{Ni}/oct-conf.h %i/bin/%{Ni}-bug-%v
 # for the -atlas variant, add libcblas.dylib to BLAS_LIBS:
 perl -pi -e 's|(%p/lib/liblapack.dylib %p/lib/libf77blas.dylib)|$1 
%p/lib/libcblas.dylib|' \
 %i/bin/mkoctfile-%v %i/include/%{ni}-%v/%{ni}/oct-conf.h %i/bin/%{ni}-bug-%v
<<
InfoDocs: %{Ni}.info
RuntimeVars: <<
 GNUTERM: aqua
<<
DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING

SplitOff: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]-shlibs
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-shlibs, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-shlibs, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-shlibs, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-shlibs, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<      
        Depends:  fftw3-shlibs, gcc46-shlibs, hdf5.7-oldapi-shlibs, 
readline5-shlibs,   (%type_raw[-atlas] = -atlas) atlas-shlibs (>= 3.8.1-1)
        Files: <<
                lib/%{Ni}-%v
        <<
        Shlibs: <<
                %p/lib/%{Ni}-%v/libcruft.dylib 0.0.0 %n (>=3.0.5-5)
                %p/lib/%{Ni}-%v/lib%{Ni}.dylib 0.0.0 %n (>=3.0.5-5)
                %p/lib/%{Ni}-%v/liboctinterp.dylib 0.0.0 %n (>=3.0.5-5)
        <<
        DescDetail: <<
        This package contains shared libraries which are used by the Octave
        interpreter itself, as well as for packages that build against Octave, 
        such as the various octave-forge packages.
        <<
        DescUsage: <<
        To use mkoctfile to build dynamically loadable modules, you will need 
        to install the hdf5-oldapi and fftw3 packages, as well as 
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
        It cannot Depend on them since they are BuildDependsOnly.

        Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or 
        installs an extension should Depend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend
        on %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need 
to BuildDepend on
        hdf5-oldapi and fftw3.
        <<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<
SplitOff2: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]-dev
        Depends: octave%type_pkg[oct]%type_pkg[-atlas]-shlibs (=%v-%r), 
gcc46-compiler, (%type_raw[-atlas] = atlas) atlas (>= 3.8.1-1)
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5),
                %{Ni}324-dev, %{Ni}324-atlas-dev, %{Ni}342-dev, 
%{Ni}342-atlas-dev
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5),
                %{Ni}324-dev, %{Ni}324-dev, %{Ni}324-atlas-dev, %{Ni}342-dev, 
%{Ni}342-atlas-dev
        <<
        BuildDependsOnly: true
        Files: <<
                include/%{Ni}-%v
                bin/mkoctfile*
                bin/octave-config*
                share/man/man1/mkoctfile.1
                share/man/man1/octave-config.1
        <<
        PostInstScript: <<
                finkpath=`fink dumpinfo -ePATH %N`
                fink_cc=`export $finkpath; which gcc`
                fink_cxx=`export $finkpath; which g++`
                sed -i.bak      -e "s|@WHICH_CC@|$fink_cc|g" \
                                        -e "s|@WHICH_CXX@|$fink_cxx|g" \
                                        %p/bin/mkoctfile-%type_raw[oct] \
                                        %p/include/%{Ni}-%v/%{Ni}/oct-conf.h
        <<
        DescDetail: <<
        This package contains files needed to build against Octave, including
        headers and the mkoctfile executable.
        
        Note: mkoctfile encodes the compiler wrappers that Fink uses.  
        Use "fink reinstall %n" if you update your OS in-place
        and it will be updated for your new OS version.
        <<
        DescUsage: <<
        To use mkoctfile to build dynamically loadable modules, you will need   
        to install the hdf5-oldapi and fftw3 packages, as well as 
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
        It cannot Depend on them since they are BuildDependsOnly.

        Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or 
        installs an extension should Depend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend
        on %{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need 
to BuildDepend on
        hdf5-oldapi and fftw3.
        <<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<

Splitoff3: <<
        Package: octave%type_pkg[oct]%type_pkg[-atlas]
        Depends: <<
        %{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs (=%v-%r),
        glpk-shlibs, gnuplot (>=4.2.0) | gnuplot-nox | gnuplot-nogtk,  
        fftw3-shlibs (>= 3.1.1-7), qhull6-shlibs,
        ncurses, aquaterm, libcurl4-shlibs, 
        pcre-shlibs,
        (%type_raw[-atlas] = -atlas) atlas-shlibs (>= 3.8.1-1)
        <<
        Conflicts: << 
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct], 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas, 
                (%type_raw[-atlas] = atlas) %{Ni} (<< 3.0.5-5), 
                (%type_raw[-atlas] != atlas) %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Replaces: <<
                (%type_raw[-atlas] = atlas) %{Ni}%type_pkg[oct]-dev, 
                (%type_raw[-atlas] != atlas) %{Ni}%type_pkg[oct]-atlas-dev, 
                %{Ni} (<< 3.0.5-5), %{Ni}-atlas (<< 3.0.5-5), 
                %{Ni}3.0.2 ( << 3.0.2-5), %{Ni}3.0.2-atlas ( << 3.0.2-5)
        <<
        Files: <<
                share/%{Ni}/%v
                lib/%{Ni}/%v
                bin/%{Ni}-%v
                bin/%{Ni}-bug-%v
                var/%{Ni}/%v
        <<
        PostInstScript: <<
                finkpath=`fink dumpinfo -ePATH %N`
                fink_cc=`export $finkpath; which gcc`
                fink_cxx=`export $finkpath; which g++`
                sed -i.bak      -e "s|@WHICH_CC@|$fink_cc|g" \
                                        -e "s|@WHICH_CXX@|$fink_cxx|g" \
                                         %p/bin/%{Ni}-bug-%v
        <<
        DescDetail: <<
        The %{Ni}%type_pkg[oct]%type_pkg[-atlas] package contains versioned 
executables, as well as all of the 
        core functionality of the Octave interpreter.  Note that the GNU info 
file, 
        which provides the core documentation, is installed as part of the %{Ni}
    package.
    
        Octave provides a convenient command line interface for solving linear 
and 
        nonlinear problems numerically, and for performing other numerical 
        experiments using a language that is mostly compatible with Matlab.
        It may also be used as a batch-oriented language.

        Octave has extensive tools for solving common numerical linear algebra
        problems, finding the roots of nonlinear equations, integrating ordinary
        functions, manipulating polynomials, and integrating ordinary 
differential
        and differential-algebraic equations. It is easily extensible and 
        customizable via user-defined functions written in Octave's own 
language, 
        or using dynamically loaded modules written in C++, C, Fortran, 
        or other languages.
        <<
        DescUsage: <<
        By default the plotting output (via gnuplot) is directed to AquaTerm. 
        This can be overidden in your startup scripts, e.g.
 
                export GNUTERM=x11
 
        in bash
 
        or
 
                setenv GNUTERM x11
 
        in tcsh.
 
        Note:  Fink's Octave implementation modifies one of the startup files,
        %p/share/%{Ni}/%v/m/startup/octaverc,
        to initialize octave sessions to know about Fink's octave-versioned 
        install location for octave-forge packages.  If you use the '--norc' 
        or '-f' flags in your Octave script, these packages won't be visible.  
        You'll need torun the following command in your script:
 
                pkg global_list %p/var/octave/%v/octave_packages
<<
        DocFiles: BUGS ChangeLog README ROADMAP SENDING-PATCHES COPYING
<<

Description: MATLAB-like language for computations
DescDetail: <<
The %{Ni}%type_pkg[-atlas] package contains unversioned executables and an 
unversioned directory tree.  

Octave provides a convenient command line interface for solving linear and 
nonlinear problems numerically, and for performing other numerical 
experiments using a language that is mostly compatible with Matlab.
It may also be used as a batch-oriented language.

Octave has extensive tools for solving common numerical linear algebra
problems, finding the roots of nonlinear equations, integrating ordinary
functions, manipulating polynomials, and integrating ordinary differential
and differential-algebraic equations. It is easily extensible and 
customizable via user-defined functions written in Octave's own language, 
or using dynamically loaded modules written in C++, C, Fortran, 
or other languages.
        
Note: mkoctfile encodes the compiler wrappers that Fink uses.  
Use "fink reinstall %{Ni}%v%type_pkg[atlas]" if you update your OS in-place
and it will be updated for your new OS version.

<<
DescUsage: << 
To use mkoctfile to build dynamically loadable modules, you will need 
to install the hdf5-oldapi and fftw3 packages, as well as 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  
It cannot Depend on them since they are BuildDependsOnly.

Any package that either links to the libraries in 
%{Ni}%type_pkg[-atlas]-shlibs or installs an extension should Depend on
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-shlibs and BuildDepend on 
%{Ni}%type_pkg[oct]%type_pkg[-atlas]-dev.  In addition, it will need to 
BuildDepend on hdf5-oldapi and fftw3.
 
By default the plotting output (via gnuplot) is directed to AquaTerm. 
This can be overidden in your startup scripts, e.g.
 
        export GNUTERM=x11
 
in bash
 
or
 
        setenv GNUTERM x11
 
in tcsh.
 
Note:  Fink's Octave implementation modifies one of the startup files,
%p/share/%{Ni}/%v/m/startup/octaverc,
to initialize octave sessions to know about Fink's octave-versioned 
install location for octave-forge packages.  If you use the '--norc' or '-f'
flags in your Octave script, these packages won't be visible.  You'll need to
run the following command in your script:
 
        pkg global_list %p/var/octave/%v/octave_packages
 
<<
DescPort: <<
 Thanks to Per Persson for most (if not all) of the work on the macos X port.
<<
DescPackaging:  <<
Set the GNUTERM environment variable to AquaTerm because autodetection
of DISPLAY seems to cause options to be fed to our gnuplot that it doesn't 
understand.
AquaTerm seems to be a sensible default, particularly since gnuplot-nox is also 
a 
legal dependency.

Not sane (and now not even compilable) to use private code
from glpk. Import the functions needed so can still use it
even when glpk stops exporting its internals. See:
        
http://octave.1599824.n4.nabble.com/GLPK-interface-was-Re-Multithreaded-Atlas-td1654632.html
 
Remove a desktop file that gets generated only for users with GNOME/KDE 
installed.

As of 3.0.5.>5, patch mkoctfile.in so that it uses Fink's compiler wrappers
when building octave packages by hand.  This is critical for 10.6/i386 users.

As of 3.0.5-5, we have split the package up into runtime, development, and 
library packages,
to make upgrades easier for us and for users.
        
As of 3.0.5-5:  generate common octave-forge bash and octave scripts, 
based on the ones by Johnathan Stickel in the original octave-forge-foo 
packages, in _this_ package, so that any required changes can be made in 
a common location rather than spread out over many packages.
Unfortunately, Octave's 'pkg' tool doesn't seem to know how to deal with 
variables, and the individual octave-forge  packages have to make copies
of the octave scripts during their build process and edit them to use the
package's name.
<<
Homepage: http://www.octave.org/
License: GPL
<<


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to