summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2006-04-27 15:38:59 +0000
committerMarkus Dittrich <markusle@gentoo.org>2006-04-27 15:38:59 +0000
commit31cd45f357acbc0f086d70a1877aa81043a8f433 (patch)
tree33b6dd35ae2e0c42c80dedbb5723595460e325ff /sci-mathematics
parentFixing SHA256 digest, pass four (diff)
downloadgentoo-2-31cd45f357acbc0f086d70a1877aa81043a8f433.tar.gz
gentoo-2-31cd45f357acbc0f086d70a1877aa81043a8f433.tar.bz2
gentoo-2-31cd45f357acbc0f086d70a1877aa81043a8f433.zip
Added patch to fix gcc-4.x configure/compile problems on ppc (see bug #117490).
(Portage version: 2.1_pre9-r4)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/scilab/ChangeLog8
-rw-r--r--sci-mathematics/scilab/files/scilab-ppc-gcc4.patch32
-rw-r--r--sci-mathematics/scilab/scilab-4.0.ebuild16
3 files changed, 53 insertions, 3 deletions
diff --git a/sci-mathematics/scilab/ChangeLog b/sci-mathematics/scilab/ChangeLog
index 6d10a5a57338..ee05e98c4843 100644
--- a/sci-mathematics/scilab/ChangeLog
+++ b/sci-mathematics/scilab/ChangeLog
@@ -1,6 +1,12 @@
# 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.20 2006/04/25 16:52:44 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/ChangeLog,v 1.21 2006/04/27 15:38:59 markusle Exp $
+
+ 27 Apr 2006; Markus Dittrich <markusle@gentoo.org>
+ +files/scilab-ppc-gcc4.patch, scilab-4.0.ebuild:
+ Added patch to fix gcc-4.x configure/compile problems on ppc.
+ Thanks much to Francois Bissey <f.r.bissey@massey.ac.nz> for his
+ help in debugging this (see bug #117490).
*scilab-4.0 (25 Apr 2006)
diff --git a/sci-mathematics/scilab/files/scilab-ppc-gcc4.patch b/sci-mathematics/scilab/files/scilab-ppc-gcc4.patch
new file mode 100644
index 000000000000..820586638fcc
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-ppc-gcc4.patch
@@ -0,0 +1,32 @@
+--- scilab-4.0/configure.in 2006-01-27 10:13:17.000000000 -0600
++++ scilab-4.0-new/configure.in 2006-04-26 19:05:17.000000000 -0500
+@@ -894,13 +894,19 @@
+ [LIEEELIB=-lieee])
+ GCC=yes
+ CC=gcc
+- CC_OPTIONS='-O -DNDEBUG -D_GNU_SOURCE -Dlinux -fwritable-strings'
++ CC_OPTIONS='-O -DNDEBUG -D_GNU_SOURCE -Dlinux'
+ CC_LDFLAGS=$LIEEELIB
+ CC_PICFLAGS=-fPIC
+ # find Fortran compiler
+ # g77 already asked and found: good
+ if test "$WITH_G77" = yes; then
+ FC=g77
++ elif test "$WITH_GFORTRAN" = yes;then
++ FC=gfortran
++ FC_OPTIONS="-O -ff2c"
++ FC_OPTIONS_O0="-ff2c"
++ FC_PICFLAGS=-fPIC
++ AC_DEFINE(G95_FORTRAN)
+ # option with-f2c
+ elif test "$with_f2c" = yes; then
+ AC_CHECK_PROG(F2C,f2c,yes,no)
+@@ -932,7 +938,7 @@
+ LD=ld
+ LD_LDFLAGS=$LIEEELIB
+ if test "$enable_debug" = yes; then
+- CC_OPTIONS='-g -Dlinux -D_GNU_SOURCE -fwritable-strings'
++ CC_OPTIONS='-g -Dlinux -D_GNU_SOURCE'
+ FC_OPTIONS=-g
+ fi
+ MAKEFILE_TARGET=Makefile.linux
diff --git a/sci-mathematics/scilab/scilab-4.0.ebuild b/sci-mathematics/scilab/scilab-4.0.ebuild
index eb3585a228fb..c7a67083c9f4 100644
--- a/sci-mathematics/scilab/scilab-4.0.ebuild
+++ b/sci-mathematics/scilab/scilab-4.0.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/scilab-4.0.ebuild,v 1.1 2006/04/25 14:32:04 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/scilab-4.0.ebuild,v 1.2 2006/04/27 15:38:59 markusle Exp $
-inherit eutils fortran toolchain-funcs multilib
+inherit eutils fortran toolchain-funcs multilib autotools
DESCRIPTION="Scientific software package for numerical computations (Matlab lookalike)"
LICENSE="scilab"
@@ -39,6 +39,8 @@ pkg_setup() {
eerror 'scilab must be built with either USE="gtk" or USE="tcltk"'
die
fi
+
+ need_fortran gfortran g77
}
src_unpack() {
@@ -47,6 +49,12 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-makefile.patch
+ # fix gfortran problems on ppc
+ if [[ "${ARCH}" == "ppc" ]];then
+ epatch "${FILESDIR}"/${PN}-ppc-gcc4.patch
+ eautoconf || die "autoconf failed"
+ fi
+
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"
@@ -64,6 +72,10 @@ src_compile() {
local myopts
myopts="${myopts} --with-atlas-library=/usr/$(get_libdir)"
+ if [[ ${FORTRANC} == gfortran ]]; then
+ myopts="${myopts} --with-gfortran"
+ fi
+
econf $(use_with tcltk tk) \
$(use_with Xaw3d xaw3d) \
$(use_with gtk gtk2 ) \