/[gentoo-x86]/sci-mathematics/scilab/scilab-3.1.1-r3.ebuild
Gentoo

Contents of /sci-mathematics/scilab/scilab-3.1.1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Mar 1 23:10:55 2007 UTC (12 years, 7 months ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Removed old version and dependency on libzvt for 4.x ebuilds (see bug #147550).
(Portage version: 2.1.2-r11)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/scilab-3.1.1-r3.ebuild,v 1.3 2006/01/19 20:23:51 spyderous Exp $
4
5 inherit eutils fortran
6
7 DESCRIPTION="Scientific software package for numerical computations (Matlab lookalike)"
8 LICENSE="scilab"
9 SRC_URI="http://scilabsoft.inria.fr/download/stable/${P}-src.tar.gz"
10 HOMEPAGE="http://www.scilab.org/"
11
12 SLOT="0"
13 IUSE="ifc ocaml tcltk gtk Xaw3d"
14 KEYWORDS="~x86 ~ppc"
15
16 RDEPEND="virtual/blas
17 virtual/lapack
18 sys-libs/ncurses
19 gtk? (
20 media-libs/jpeg
21 media-libs/libpng
22 sys-libs/zlib
23 >=x11-libs/gtk+-2
24 >=x11-libs/libzvt-2
25 =gnome-extra/gtkhtml-2*
26 )
27 tcltk? ( >=dev-lang/tk-8.4
28 >=dev-lang/tcl-8.4 )
29 Xaw3d? ( x11-libs/Xaw3d )
30 ocaml? ( dev-lang/ocaml )"
31
32 DEPEND="${RDEPEND}
33 ifc? ( dev-lang/ifc )
34 app-text/sablotron"
35
36 pkg_setup() {
37 need_fortran g77
38 if ! use gtk && ! use tcltk; then
39 echo
40 eerror 'scilab must be built with either USE="gtk" or USE="tcltk"'
41 die
42 fi
43 }
44
45 src_unpack() {
46 unpack ${A}
47 cd "${S}"
48
49 sed -i \
50 -e '/^ATLAS_LAPACKBLAS\>/s,=.*,= $(ATLASDIR)/liblapack.so $(ATLASDIR)/libblas.so $(ATLASDIR)/libcblas.so,' \
51 -e 's,$(SCIDIR)/libs/lapack.a,,' \
52 Makefile.OBJ.in
53
54 # fix scilab script causing problems (#67905)
55 # epatch ${FILESDIR}/${P}-initialization.patch
56
57 # Doesn't include the directories etc for gtk
58 epatch ${FILESDIR}/gzvt2-add-gtk2-flags.patch
59 }
60
61 src_compile() {
62 local myopts
63 use tcltk || myopts="${myopts} --without-tk"
64 use Xaw3d || myopts="${myopts} --without-xaw3d"
65 myopts="${myopts} --with-atlas-library=/usr/lib"
66 if use gtk; then
67 myopts="${myopts} --with-gtk2"
68 fi
69 if ! use ocaml; then
70 myopts="${myopts} --without-ocaml"
71 fi
72
73 econf ${myopts} || die
74 env HOME="${S}" make all || die
75 }
76
77 src_install() {
78 # These instructions come from the file ${P}/Makefile, mostly section
79 # install. Make sure files have not been removed or added to these list
80 # when you use this ebuild as a template for future versions.
81 PVMBINDISTFILES="\
82 ${P}/pvm3/Readme \
83 ${P}/pvm3/lib/pvm \
84 ${P}/pvm3/lib/pvmd \
85 ${P}/pvm3/lib/pvmtmparch \
86 ${P}/pvm3/lib/pvmgetarch \
87 ${P}/pvm3/lib/LINUX/pvmd3 \
88 ${P}/pvm3/lib/LINUX/pvmgs \
89 ${P}/pvm3/lib/LINUX/pvm \
90 ${P}/pvm3/bin/LINUX/*"
91 BINDISTFILES="\
92 ${P}/.binary \
93 ${P}/.pvmd.conf \
94 ${P}/ACKNOWLEDGEMENTS \
95 ${P}/CHANGES \
96 ${P}/Makefile \
97 ${P}/Makefile.OBJ \
98 ${P}/Makefile.incl \
99 ${P}/Makemex \
100 ${P}/Path.incl \
101 ${P}/README_Unix \
102 ${P}/Version.incl \
103 ${P}/configure \
104 ${P}/libtool \
105 ${P}/license.txt \
106 ${P}/licence.txt \
107 ${P}/scilab.quit \
108 ${P}/scilab.star \
109 ${P}/X11_defaults \
110 ${P}/bin \
111 ${P}/config \
112 ${P}/contrib \
113 ${P}/demos \
114 ${P}/examples \
115 ${P}/imp/NperiPos.ps \
116 ${P}/imp/giffonts \
117 ${P}/macros \
118 ${P}/man/eng/ \
119 ${P}/man/fr/ \
120 ${P}/man/*.dtd \
121 ${P}/man/*/*.xsl \
122 ${P}/maple \
123 ${P}/routines/*.h \
124 ${P}/routines/Make.lib \
125 ${P}/routines/default/FCreate \
126 ${P}/routines/default/Flist \
127 ${P}/routines/default/README \
128 ${P}/routines/default/fundef \
129 ${P}/routines/default/*.c \
130 ${P}/routines/default/*.f \
131 ${P}/routines/default/*.h \
132 ${P}/routines/graphics/Math.h \
133 ${P}/routines/graphics/Graphics.h \
134 ${P}/routines/graphics/Entities.h \
135 ${P}/routines/interf/*.h \
136 ${P}/routines/intersci/sparse.h \
137 ${P}/routines/menusX/*.h \
138 ${P}/routines/scicos/scicos.h \
139 ${P}/routines/scicos/scicos_block.h \
140 ${P}/routines/sun/*.h \
141 ${P}/routines/xsci/*.h \
142 ${P}/scripts \
143 ${P}/tcl \
144 ${P}/tests \
145 ${P}/util"
146
147 touch .binary
148 strip bin/scilex
149 cd "${S}"/tests && make distclean
150 cd "${S}"/examples && make distclean
151 cd "${S}"/man && make man
152
153 dodir /usr/lib
154 (cd "${S}"/.. && tar cf - ${BINDISTFILES} ${PVMBINDISTFILES} | (cd "${D}"/usr/lib; tar xf -))
155 rm .binary
156
157 dodir /usr/bin
158 dosym /usr/lib/${P}/bin/scilab /usr/bin/scilab
159 dosym /usr/lib/${P}/bin/intersci /usr/bin/intersci
160 dosym /usr/lib/${P}/bin/intersci-n /usr/bin/intersci-n
161
162 # The compile and install process causes the work folder to be registered
163 # as the runtime folder in many files. This is corrected here.
164 BAD_REF="${WORKDIR}/${P}"
165 FIXED_REF="/usr/lib/${P}"
166 BIN_TO_FIX="Blpr BEpsf Blatexpr2 Blatexprs Blatexpr scilab"
167 for i in ${BIN_TO_FIX}; do
168 sed -e "s%${BAD_REF}%${FIXED_REF}%" -i "${D}"/usr/lib/${P}/bin/${i} \
169 || die
170 done
171 MAN_TO_FIX="eng fr"
172 for i in ${MAN_TO_FIX}; do
173 for j in "${D}"/usr/lib/${P}/man/${i}/*.h*; do
174 sed -e "s%${BAD_REF}%${FIXED_REF}%" -i ${j} || die
175 done
176 done
177 MISC_TO_FIX="util/Blatdoc util/Blatdocs"
178 for i in ${MISC_TO_FIX}; do
179 sed -e "s%${BAD_REF}%${FIXED_REF}%" -i "${D}"/usr/lib/${P}/${i} || die
180 done
181 }
182
183 pkg_postinst() {
184 einfo "To tell Scilab about your printers, set the environment"
185 einfo "variable PRINTERS in the form:"
186 einfo
187 einfo "PRINTERS=\"firstPrinter:secondPrinter:anotherPrinter\""
188 }

  ViewVC Help
Powered by ViewVC 1.1.20