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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20