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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Mar 15 03:46:59 2006 UTC (13 years, 7 months ago) by ribosome
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Removed obsolete versions
(Portage version: 2.0.54)

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

  ViewVC Help
Powered by ViewVC 1.1.20