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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20