diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/octave |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/octave')
-rw-r--r-- | extra/octave/PKGBUILD | 49 | ||||
-rw-r--r-- | extra/octave/imread.patch | 29 | ||||
-rw-r--r-- | extra/octave/octave-3.2.0_as_needed.patch | 11 | ||||
-rw-r--r-- | extra/octave/octave-3.2.0_parallel_make.patch | 12 | ||||
-rw-r--r-- | extra/octave/octave.install | 18 |
5 files changed, 119 insertions, 0 deletions
diff --git a/extra/octave/PKGBUILD b/extra/octave/PKGBUILD new file mode 100644 index 000000000..f7a6000e6 --- /dev/null +++ b/extra/octave/PKGBUILD @@ -0,0 +1,49 @@ +# $Id: PKGBUILD 103149 2010-12-15 21:12:17Z ronald $ +# Maintainer: Ronald van Haren <ronald.archlinux.org> +# Contributor : shining <shiningxc.at.gmail.com> +# Contributor : cyberdune <cyberdune@gmail.com> + +pkgname=octave +pkgver=3.2.4 +pkgrel=2 +pkgdesc="A high-level language, primarily intended for numerical computations." +arch=('i686' 'x86_64') +url="http://www.octave.org" +license=('GPL') +depends=('fftw' 'pcre' 'curl' 'lapack' 'libx11' 'graphicsmagick' 'glpk' 'hdf5' 'gcc-libs') +makedepends=('texinfo' 'graphicsmagick' 'gcc-fortran' 'umfpack') +optdepends=('texinfo: for help-support in octave' + 'gnuplot: alternative plotting' + 'umfpack: LU decomposition of some large sparse matrices') +source=("ftp://ftp.octave.org/pub/octave/octave-$pkgver.tar.bz2" + 'octave-3.2.0_as_needed.patch' 'octave-3.2.0_parallel_make.patch' 'imread.patch') +options=('!emptydirs') +install=octave.install +md5sums=('608196657f4fa010420227b77333bb71' + '33c8886cd908ace40f8b60334df1c34f' + 'd59d783a8d7e8d8306caed4b2b8671a4' + '72d33ba1a862244f970cf259923815d9') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + # gentoo patches + patch -Np1 -i ${srcdir}/octave-3.2.0_as_needed.patch + patch -Np1 -i ${srcdir}/octave-3.2.0_parallel_make.patch + patch -Np0 -i ${srcdir}/imread.patch + + # http://www.nabble.com/Random-rounding-errors-td16010966.html + FFLAGS="-O -ffloat-store" \ + + ./configure --prefix=/usr --libexecdir=/usr/lib \ + --enable-shared --disable-static + + make +} + +package(){ + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR="${pkgdir}" install + +} diff --git a/extra/octave/imread.patch b/extra/octave/imread.patch new file mode 100644 index 000000000..4a7b73ea0 --- /dev/null +++ b/extra/octave/imread.patch @@ -0,0 +1,29 @@ +--- src/DLD-FUNCTIONS/__magick_read__.cc.orig 2010-03-06 08:05:25.000000000 +0000 ++++ src/DLD-FUNCTIONS/__magick_read__.cc 2009-08-25 09:26:01.000000000 +0100 +@@ -30,6 +30,7 @@ + #include "defun-dld.h" + #include "error.h" + #include "ov-struct.h" ++#include "oct-env.h" + + #ifdef HAVE_MAGICK + +@@ -359,6 +358,18 @@ + + #ifdef HAVE_MAGICK + ++ static bool initialized = false; ++ ++ if (! initialized) ++ { ++ std::string program_name = octave_env::get_program_invocation_name (); ++ ++ Magick::InitializeMagick (program_name.c_str ()); ++ ++ initialized = true; ++ } ++ ++ + if (args.length () > 2 || args.length () < 1 || ! args(0).is_string () + || nargout > 3) + { diff --git a/extra/octave/octave-3.2.0_as_needed.patch b/extra/octave/octave-3.2.0_as_needed.patch new file mode 100644 index 000000000..bce3e01a3 --- /dev/null +++ b/extra/octave/octave-3.2.0_as_needed.patch @@ -0,0 +1,11 @@ +diff -Naur octave-3.2.0/liboctave/Makefile.in octave-3.2.0.new/liboctave/Makefile.in +--- octave-3.2.0/liboctave/Makefile.in 2009-05-25 02:04:59.000000000 -0400 ++++ octave-3.2.0.new/liboctave/Makefile.in 2009-07-10 10:32:09.000000000 -0400 +@@ -35,6 +35,7 @@ + DLL_CXXDEFS = @OCTAVE_DLL_DEFS@ + + LINK_DEPS = \ ++ -lpthread \ + -L../libcruft -L. $(RLD_FLAG) \ + $(LIBCRUFT) $(CHOLMOD_LIBS) $(UMFPACK_LIBS) $(AMD_LIBS) \ + $(CAMD_LIBS) $(COLAMD_LIBS) $(CCOLAMD_LIBS) $(CXSPARSE_LIBS) \ diff --git a/extra/octave/octave-3.2.0_parallel_make.patch b/extra/octave/octave-3.2.0_parallel_make.patch new file mode 100644 index 000000000..bcc2f7d29 --- /dev/null +++ b/extra/octave/octave-3.2.0_parallel_make.patch @@ -0,0 +1,12 @@ +diff -Naur octave-3.2.0/doc/Makefile.in octave-3.2.0.new/doc/Makefile.in +--- octave-3.2.0/doc/Makefile.in 2009-06-03 07:55:40.000000000 -0400 ++++ octave-3.2.0.new/doc/Makefile.in 2009-07-07 18:20:14.000000000 -0400 +@@ -30,6 +30,8 @@ + all: conf.texi $(SUBDIRS) + .PHONY: all + ++$(SUBDIRS): conf.texi ++ + conf.texi: conf.texi.in $(TOPDIR)/Makeconf + @$(do-subst-texinfo-vals) + diff --git a/extra/octave/octave.install b/extra/octave/octave.install new file mode 100644 index 000000000..8ee77c430 --- /dev/null +++ b/extra/octave/octave.install @@ -0,0 +1,18 @@ +info_dir=/usr/share/info +info_files=(octave.info octave.info-1 octave.info-2 octave.info-3 octave.info-4 octave.info-5) + +post_install() { + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} |