summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/scilab/ChangeLog11
-rw-r--r--sci-mathematics/scilab/files/digest-scilab-4.13
-rw-r--r--sci-mathematics/scilab/files/scilab-4.1-examples.patch223
-rw-r--r--sci-mathematics/scilab/files/scilab-4.1-header-fix.patch113
-rw-r--r--sci-mathematics/scilab/scilab-4.1.ebuild154
5 files changed, 502 insertions, 2 deletions
diff --git a/sci-mathematics/scilab/ChangeLog b/sci-mathematics/scilab/ChangeLog
index 4cd623102c63..463fd245e82a 100644
--- a/sci-mathematics/scilab/ChangeLog
+++ b/sci-mathematics/scilab/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-mathematics/scilab
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/ChangeLog,v 1.30 2006/12/21 06:44:06 compnerd Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/ChangeLog,v 1.31 2007/02/11 20:26:21 markusle Exp $
+
+*scilab-4.1 (11 Feb 2007)
+
+ 11 Feb 2007; Markus Dittrich <markusle@gentoo.org>
+ +files/scilab-4.1-header-fix.patch, +scilab-4.1.ebuild:
+ Version bump. Thanks much to Michael Frank <mfrank@franksys.de>
+ for his ebuild (see bug #157508).
21 Dec 2006; Saleem Abdulrasool <compnerd@gentoo.org>
-files/scilab-2.7-configure.patch, -scilab-2.7-r3.ebuild:
diff --git a/sci-mathematics/scilab/files/digest-scilab-4.1 b/sci-mathematics/scilab/files/digest-scilab-4.1
new file mode 100644
index 000000000000..fdf7c7d568df
--- /dev/null
+++ b/sci-mathematics/scilab/files/digest-scilab-4.1
@@ -0,0 +1,3 @@
+MD5 3003fe63088558b931a11127fb8d8ccc scilab-4.1-src.tar.gz 13164450
+RMD160 6ed27ce7dcfb9231b5f3042cb7b830015d102df7 scilab-4.1-src.tar.gz 13164450
+SHA256 e2b36f6095b824feec3489c30f640bd809b3dc55bd5487319cbd641ac14fac80 scilab-4.1-src.tar.gz 13164450
diff --git a/sci-mathematics/scilab/files/scilab-4.1-examples.patch b/sci-mathematics/scilab/files/scilab-4.1-examples.patch
new file mode 100644
index 000000000000..6da3407b4fc8
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-4.1-examples.patch
@@ -0,0 +1,223 @@
+diff -Naur examples/callsci/Makefile examples-new/callsci/Makefile
+--- examples/callsci/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/callsci/Makefile 2007-02-11 12:38:26.000000000 -0500
+@@ -1,7 +1,7 @@
+ SHELL = /bin/sh
+
+-SCIDIR=../../
+-include ../../Makefile.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Makefile.incl
+
+ all :: info
+
+diff -Naur examples/interface-general/Makefile examples-new/interface-general/Makefile
+--- examples/interface-general/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-general/Makefile 2007-02-11 12:38:52.000000000 -0500
+@@ -1,6 +1,7 @@
+
+ include Path.incl
+
++SCIDIR= gentoo-scidir
+ include $(SCIDIR)/Makefile.incl
+
+ all :: Makelib
+diff -Naur examples/interface-general/lib/Makefile examples-new/interface-general/lib/Makefile
+--- examples/interface-general/lib/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-general/lib/Makefile 2007-02-11 12:39:04.000000000 -0500
+@@ -1,4 +1,4 @@
+-SCIDIR=../../../
++SCIDIR= gentoo-scidir
+
+ include $(SCIDIR)/Makefile.incl
+
+diff -Naur examples/interface-lapack/Makefile examples-new/interface-lapack/Makefile
+--- examples/interface-lapack/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-lapack/Makefile 2007-02-11 12:39:23.000000000 -0500
+@@ -1,6 +1,6 @@
+ SHELL = /bin/sh
+
+-SCIDIR = ../..
++SCIDIR= gentoo-scidir
+
+ LIBRARY = lapackscilab.a
+
+diff -Naur examples/interface-multi-so/Makefile examples-new/interface-multi-so/Makefile
+--- examples/interface-multi-so/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-multi-so/Makefile 2007-02-11 12:39:50.000000000 -0500
+@@ -1,5 +1,5 @@
+ SHELL = /bin/sh
+-SCIDIR=../..
++SCIDIR= gentoo-scidir
+
+ include Path.incl
+
+diff -Naur examples/interface-multi-so/lib/Makefile examples-new/interface-multi-so/lib/Makefile
+--- examples/interface-multi-so/lib/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-multi-so/lib/Makefile 2007-02-11 12:40:04.000000000 -0500
+@@ -1,4 +1,4 @@
+-SCIDIR=../../../
++SCIDIR= gentoo-scidir
+
+ include $(SCIDIR)/Makefile.incl
+
+diff -Naur examples/interface-tour/Makefile examples-new/interface-tour/Makefile
+--- examples/interface-tour/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-tour/Makefile 2007-02-11 12:40:21.000000000 -0500
+@@ -1,6 +1,6 @@
+ SHELL = /bin/sh
+
+-SCIDIR = ../..
++SCIDIR= gentoo-scidir
+
+ LIBRARY = examples.a
+
+diff -Naur examples/interface-tour-so/Makefile examples-new/interface-tour-so/Makefile
+--- examples/interface-tour-so/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-tour-so/Makefile 2007-02-11 12:40:32.000000000 -0500
+@@ -1,4 +1,4 @@
+-SCIDIR=../../
++SCIDIR= gentoo-scidir
+
+ include $(SCIDIR)/Makefile.incl
+
+diff -Naur examples/interface-tutorial/Makefile examples-new/interface-tutorial/Makefile
+--- examples/interface-tutorial/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-tutorial/Makefile 2007-02-11 12:40:47.000000000 -0500
+@@ -1,6 +1,6 @@
+ SHELL = /bin/sh
+
+-SCIDIR = ../..
++SCIDIR= gentoo-scidir
+
+ LIBRARY = tutorial.a
+
+diff -Naur examples/interface-tutorial-so/Makefile examples-new/interface-tutorial-so/Makefile
+--- examples/interface-tutorial-so/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/interface-tutorial-so/Makefile 2007-02-11 12:40:57.000000000 -0500
+@@ -1,4 +1,4 @@
+-SCIDIR=../../
++SCIDIR= gentoo-scidir
+
+ include $(SCIDIR)/Makefile.incl
+
+diff -Naur examples/intersci-examples/Makefile examples-new/intersci-examples/Makefile
+--- examples/intersci-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/intersci-examples/Makefile 2007-02-11 12:41:21.000000000 -0500
+@@ -1,9 +1,9 @@
+ SHELL = /bin/sh
+
+-SCIDIR=../..
++SCIDIR= gentoo-scidir
+ INTERSCI = $(SCIDIR)/bin/intersci
+
+-include ../../Makefile.incl
++include $(SCIDIR)/Makefile.incl
+
+ all:: info
+
+diff -Naur examples/intersci-examples-so/Makefile examples-new/intersci-examples-so/Makefile
+--- examples/intersci-examples-so/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/intersci-examples-so/Makefile 2007-02-11 12:41:32.000000000 -0500
+@@ -2,10 +2,10 @@
+
+ SHELL = /bin/sh
+
+-SCIDIR=../..
++SCIDIR= gentoo-scidir
+ INTERSCI = $(SCIDIR)/bin/intersci-n
+
+-include ../../Makefile.incl
++include $(SCIDIR)/Makefile.incl
+
+ CFLAGS = $(CC_OPTIONS) $(CC_PICFLAGS) -I$(SCIDIR)/routines
+ FFLAGS = $(FC_OPTIONS) $(FC_PICFLAGS) -I$(SCIDIR)/routines
+diff -Naur examples/link-examples/Makefile examples-new/link-examples/Makefile
+--- examples/link-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/link-examples/Makefile 2007-02-11 12:41:46.000000000 -0500
+@@ -1,6 +1,6 @@
+ SHELL = /bin/sh
+-SCIDIR=../..
+-include ../../Makefile.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Makefile.incl
+
+ all:: info
+
+diff -Naur examples/link-examples-so/Makefile examples-new/link-examples-so/Makefile
+--- examples/link-examples-so/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/link-examples-so/Makefile 2007-02-11 12:41:57.000000000 -0500
+@@ -1,5 +1,5 @@
+ SHELL = /bin/sh
+-SCIDIR=../..
++SCIDIR= gentoo-scidir
+
+ include $(SCIDIR)/Makefile.incl
+
+diff -Naur examples/macros-examples/Makefile examples-new/macros-examples/Makefile
+--- examples/macros-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/macros-examples/Makefile 2007-02-11 12:42:10.000000000 -0500
+@@ -2,7 +2,7 @@
+
+ # SCIDIR must be bound to your running Scilab directory
+ # SCIDIR1 also for msvc Makfile
+-SCIDIR=../..
++SCIDIR= gentoo-scidir
+ SCIDIR1=..\..
+
+ include $(SCIDIR)/Makefile.incl
+diff -Naur examples/man-examples/Makefile examples-new/man-examples/Makefile
+--- examples/man-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/man-examples/Makefile 2007-02-11 12:42:23.000000000 -0500
+@@ -1,10 +1,11 @@
+ SHELL = /bin/sh
+ # just to know where is scilab
+-include ../../Path.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Path.incl
+
+ # to get FILES_TO_CLEAN
+ # include $(SCIDIR)/Makefile.incl
+-include ../../Makefile.incl
++include $(SCIDIR)/Makefile.incl
+
+ # provide the list of sub-directories and format request
+ # in format.sci
+diff -Naur examples/man-examples-xml/Makefile examples-new/man-examples-xml/Makefile
+--- examples/man-examples-xml/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/man-examples-xml/Makefile 2007-02-11 12:42:34.000000000 -0500
+@@ -1,6 +1,7 @@
+ SHELL = /bin/sh
+ # just to know where is scilab
+-include ../../Path.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Path.incl
+
+ # to get FILES_TO_CLEAN
+ include $(SCIDIR)/Makefile.incl
+diff -Naur examples/mex-examples/Makefile examples-new/mex-examples/Makefile
+--- examples/mex-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/mex-examples/Makefile 2007-02-11 12:42:47.000000000 -0500
+@@ -1,7 +1,7 @@
+ SHELL = /bin/sh
+
+-SCIDIR=../../
+-include ../../Makefile.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Makefile.incl
+
+
+ SUBDIRS = cmex fmex mexglx mexdll
+diff -Naur examples/misc-examples/Makefile examples-new/misc-examples/Makefile
+--- examples/misc-examples/Makefile 2007-02-11 12:00:41.000000000 -0500
++++ examples-new/misc-examples/Makefile 2007-02-11 12:43:00.000000000 -0500
+@@ -1,7 +1,7 @@
+ SHELL = /bin/sh
+
+-SCIDIR=../..
+-include ../../Makefile.incl
++SCIDIR= gentoo-scidir
++include $(SCIDIR)/Makefile.incl
+
+ all:: info
+
diff --git a/sci-mathematics/scilab/files/scilab-4.1-header-fix.patch b/sci-mathematics/scilab/files/scilab-4.1-header-fix.patch
new file mode 100644
index 000000000000..6beab26d6fc8
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-4.1-header-fix.patch
@@ -0,0 +1,113 @@
+diff -Naur scilab-4.1/pvm3/pvmgs/pvmgsu_aux.c scilab-4.1-new/pvm3/pvmgs/pvmgsu_aux.c
+--- scilab-4.1/pvm3/pvmgs/pvmgsu_aux.c 2002-10-14 10:28:41.000000000 -0400
++++ scilab-4.1-new/pvm3/pvmgs/pvmgsu_aux.c 2007-02-10 14:56:41.000000000 -0500
+@@ -53,6 +53,8 @@
+ #include "pvmgsd.h"
+ #include "pvmproto.h"
+
++#include <strings.h>
++
+ extern int pvm_errno;
+ extern int pvmmytid;
+ extern int pvmtoplvl;
+diff -Naur scilab-4.1/pvm3/src/hoster.c scilab-4.1-new/pvm3/src/hoster.c
+--- scilab-4.1/pvm3/src/hoster.c 2005-11-23 05:12:27.000000000 -0500
++++ scilab-4.1-new/pvm3/src/hoster.c 2007-02-10 23:33:45.000000000 -0500
+@@ -263,6 +263,7 @@
+ #include "bfunc.h"
+ #include <pvmtev.h>
+ #include "global.h"
++#include <unistd.h>
+
+ #ifdef IMA_BEOSCYLD
+ #include <string.h>
+diff -Naur scilab-4.1/pvm3/src/lpvm.c scilab-4.1-new/pvm3/src/lpvm.c
+--- scilab-4.1/pvm3/src/lpvm.c 2002-10-15 03:40:21.000000000 -0400
++++ scilab-4.1-new/pvm3/src/lpvm.c 2007-02-10 23:34:09.000000000 -0500
+@@ -607,6 +607,7 @@
+ #include "waitc.h"
+ #include "global.h"
+ #include "lmsg.h"
++#include "unistd.h"
+
+ #ifdef IMA_MPP
+ #include "pvmmimd.h"
+diff -Naur scilab-4.1/pvm3/tracer/cmd.c scilab-4.1-new/pvm3/tracer/cmd.c
+--- scilab-4.1/pvm3/tracer/cmd.c 2002-10-14 11:00:41.000000000 -0400
++++ scilab-4.1-new/pvm3/tracer/cmd.c 2007-02-10 14:54:48.000000000 -0500
+@@ -31,6 +31,8 @@
+
+ #include "trcglob.h"
+
++#include <stdlib.h>
++
+ #ifdef SYSVSTR
+ #include <string.h>
+ #else
+diff -Naur scilab-4.1/pvm3/tracer/tracer.c scilab-4.1-new/pvm3/tracer/tracer.c
+--- scilab-4.1/pvm3/tracer/tracer.c 2002-10-14 11:00:41.000000000 -0400
++++ scilab-4.1-new/pvm3/tracer/tracer.c 2007-02-10 14:54:08.000000000 -0500
+@@ -31,6 +31,8 @@
+
+ #include "trcglob.h"
+
++#include <stdlib.h>
++
+ #ifdef NEEDSSELECTH
+ #include <sys/select.h>
+ #endif
+diff -Naur scilab-4.1/pvm3/tracer/trccompat.c scilab-4.1-new/pvm3/tracer/trccompat.c
+--- scilab-4.1/pvm3/tracer/trccompat.c 2002-10-14 11:00:41.000000000 -0400
++++ scilab-4.1-new/pvm3/tracer/trccompat.c 2007-02-10 14:56:02.000000000 -0500
+@@ -28,6 +28,7 @@
+ /* Tracer Headers */
+
+ #include "trclib.h"
++#include <stdlib.h>
+
+ #include "trccompat.h"
+
+diff -Naur scilab-4.1/pvm3/tracer/trcsort.c scilab-4.1-new/pvm3/tracer/trcsort.c
+--- scilab-4.1/pvm3/tracer/trcsort.c 2002-10-15 08:09:48.000000000 -0400
++++ scilab-4.1-new/pvm3/tracer/trcsort.c 2007-02-10 14:55:01.000000000 -0500
+@@ -28,6 +28,7 @@
+ /* Tracer Headers */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+diff -Naur scilab-4.1/pvm3/tracer/trcutil.c scilab-4.1-new/pvm3/tracer/trcutil.c
+--- scilab-4.1/pvm3/tracer/trcutil.c 2002-10-14 11:00:41.000000000 -0400
++++ scilab-4.1-new/pvm3/tracer/trcutil.c 2007-02-10 14:55:25.000000000 -0500
+@@ -26,6 +26,7 @@
+
+
+ #include "trclib.h"
++#include <stdlib.h>
+
+ #ifdef WIN32
+ #include <winsock.h>
+diff -Naur scilab-4.1/routines/graphics/Events.c scilab-4.1-new/routines/graphics/Events.c
+--- scilab-4.1/routines/graphics/Events.c 2005-12-07 04:31:48.000000000 -0500
++++ scilab-4.1-new/routines/graphics/Events.c 2007-02-10 14:33:06.000000000 -0500
+@@ -3,6 +3,7 @@
+ * jpc@cermics.enpc.fr
+ --------------------------------------------------------------------------*/
+ #include <stdio.h>
++#include <string.h>
+ #include "bcg.h"
+
+ typedef struct but
+diff -Naur scilab-4.1/routines/scicos/matscicos.h scilab-4.1-new/routines/scicos/matscicos.h
+--- scilab-4.1/routines/scicos/matscicos.h 2005-11-05 16:19:15.000000000 -0500
++++ scilab-4.1-new/routines/scicos/matscicos.h 2007-02-10 23:32:45.000000000 -0500
+@@ -10,6 +10,7 @@
+ #include <stdio.h>
+ #endif
+
++#include <string.h>
+ #include "../machine.h"
+ #include "../stack-c.h"
+
diff --git a/sci-mathematics/scilab/scilab-4.1.ebuild b/sci-mathematics/scilab/scilab-4.1.ebuild
new file mode 100644
index 000000000000..d986da5c3391
--- /dev/null
+++ b/sci-mathematics/scilab/scilab-4.1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/scilab-4.1.ebuild,v 1.1 2007/02/11 20:26:21 markusle Exp $
+
+inherit eutils fortran toolchain-funcs multilib autotools java-pkg-opt-2
+
+DESCRIPTION="Scientific software package for numerical computations (Matlab lookalike)"
+LICENSE="scilab"
+SRC_URI="http://scilabsoft.inria.fr/download/stable/${P}-src.tar.gz"
+HOMEPAGE="http://www.scilab.org/"
+
+SLOT="0"
+IUSE="ocaml tk gtk Xaw3d java"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="virtual/blas
+ virtual/lapack
+ sys-libs/ncurses
+ gtk? (
+ media-libs/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ >=x11-libs/gtk+-2
+ >=x11-libs/libzvt-2
+ x11-libs/vte
+ =gnome-extra/gtkhtml-2*
+ )
+ tk? ( >=dev-lang/tk-8.4
+ >=dev-lang/tcl-8.4 )
+ Xaw3d? ( x11-libs/Xaw3d )
+ ocaml? ( dev-lang/ocaml )
+ java? ( >=virtual/jdk-1.4 )"
+
+DEPEND="${RDEPEND}
+ app-text/sablotron"
+
+pkg_setup() {
+ if ! use gtk && ! use tk; then
+ echo
+ eerror 'scilab must be built with either USE="gtk" or USE="tk"'
+ die
+ fi
+
+ if use gtk && use tk; then
+ echo
+ ewarn "You have selected both gtk and tk support which"
+ ewarn "are mutually exclusive. In this case, the gtk "
+ ewarn "interface will be built."
+ epause 5
+ fi
+
+ java-pkg-opt-2_pkg_setup
+ need_fortran gfortran g77
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-4.0-makefile.patch
+ epatch "${FILESDIR}"/${PN}-4.0-java-pic.patch
+ epatch "${FILESDIR}"/${P}-header-fix.patch
+ epatch "${FILESDIR}"/${P}-examples.patch
+
+ sed -e '/^ATLAS_LAPACKBLAS\>/s,=.*,= $(ATLASDIR)/liblapack.so $(ATLASDIR)/libblas.so $(ATLASDIR)/libcblas.so,' \
+ -e 's,$(SCIDIR)/libs/lapack.a,,' \
+ -i Makefile.OBJ.in || die "Failed to fix Makefile.OBJ.in"
+
+ sed -e "s:\$(PREFIX):\${D}/\$(PREFIX):g" \
+ -e "s:\$(PREFIX)/lib:\$(PREFIX)/$(get_libdir):g" \
+ -i Makefile.in || die "Failed to fix Makefile.in"
+
+ sed -e "s:@CC_OPTIONS@:${CFLAGS}:" \
+ -e "s:@FC_OPTIONS@:${FFLAGS}:" \
+ -e "s:@LD_LDFLAGS@:${LDFLAGS} -lpthread:" \
+ -i Makefile.incl.in || die "Failed to fix Makefile.incl.in"
+
+ # fix bad C practices by failure of scilab build system to
+ # include proper headers
+ sed -e "s:-DNOTMPNAM:-DNOTMPNAM -DSYSVSTR -DHASSTDLIB:" \
+ -i pvm3/conf/LINUX.def -i pvm3/conf/LINUX64.def || \
+ die "Failed to fix pvm3 conf scripts."
+
+ # fix examples
+ local MAKE_TO_FIX="callsci inter* link* m* interface-multi-so/lib interface-general/lib"
+ cd examples/
+ for name in ${MAKE_TO_FIX}; do
+ sed -e "s:gentoo-scidir:/usr/$(get_libdir)/${P}:" \
+ -i ${name}/Makefile || die "Failed to fix examples"
+ done
+}
+
+src_compile() {
+ cd "${S}"
+ local myopts
+ myopts="${myopts} --with-atlas-library=/usr/$(get_libdir)"
+
+ if [[ ${FORTRANC} == gfortran ]]; then
+ myopts="${myopts} --with-gfortran"
+ fi
+
+ econf $(use_with tk) \
+ $(use_with Xaw3d xaw3d) \
+ $(use_with gtk gtk2 ) \
+ $(use_with ocaml) \
+ $(use_with java ) \
+ ${myopts} || die "econf failed"
+ env HOME="${S}" emake -j1 all || die "emake failed"
+}
+
+src_install() {
+ DESTDIR="${D}" make install || die "installation failed"
+
+ # some postinstall fixes
+ echo "SCIDIR=/usr/$(get_libdir)/${P}" > \
+ "${D}/usr/$(get_libdir)/${P}/Path.incl"
+ strip "${D}/usr/$(get_libdir)/${P}/bin/scilex"
+
+ # install docs
+ dodoc ACKNOWLEDGEMENTS CHANGES README_Unix RELEASE_NOTES \
+ Readme_Visual.txt || die "failed to install docs"
+
+ # install examples
+ insinto /usr/share/${PN}/
+ doins -r examples/ || die "failed to install examples"
+
+ insinto /usr/$(get_libdir)/${P}
+ doins Makefile.incl || die "failed to install Makefile.incl"
+
+ # The compile and install process causes the work folder
+ # to be registered as the runtime folder in many files.
+ # This is corrected here.
+ BAD_REF="${WORKDIR}/${P}"
+ FIXED_REF="/usr/$(get_libdir)/${P}"
+ local BIN_TO_FIX="Blpr BEpsf Blatexpr2 Blatexprs Blatexpr scilab"
+ for i in ${BIN_TO_FIX}; do
+ sed -e "s%${BAD_REF}%${FIXED_REF}%" -i \
+ "${D}"/usr/$(get_libdir)/${P}/bin/${i} || \
+ die "Failed to fix wrapper scripts"
+ done
+ local MISC_TO_FIX="util/Blatdoc util/Blatdocs"
+ for i in ${MISC_TO_FIX}; do
+ sed -e "s%${BAD_REF}%${FIXED_REF}%" -i \
+ "${D}"/usr/$(get_libdir)/${P}/${i} || \
+ die "Failed to fix Blatdocs"
+ done
+}
+
+pkg_postinst() {
+ einfo "To tell Scilab about your printers, set the environment"
+ einfo "variable PRINTERS in the form:"
+ einfo
+ einfo "PRINTERS=\"firstPrinter:secondPrinter:anotherPrinter\""
+}