altivec fix
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 12 Nov 2005 03:12:15 +0000 (03:12 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 12 Nov 2005 03:12:15 +0000 (03:12 +0000)
Package-Manager: portage-2.0.53_rc6

sci-libs/fftw/ChangeLog
sci-libs/fftw/Manifest
sci-libs/fftw/fftw-3.0.1-r2.ebuild
sci-libs/fftw/files/fftw-3.0.1-altivec.patch [new file with mode: 0644]

index 171249d5eca9ebb3fef3b379e141f0e391d83459..adf3f15be7dc9f6b13d0a1a156eae601e9eea553 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for sci-libs/fftw
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.24 2005/08/26 00:11:51 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.25 2005/11/12 03:12:15 lu_zero Exp $
+
+  12 Nov 2005; Luca Barbato <lu_zero@gentoo.org>
+  +files/fftw-3.0.1-altivec.patch, fftw-3.0.1-r2.ebuild:
+  Altivec support for gcc-fsf fixed
 
   26 Aug 2005; Aron Griffis <agriffis@gentoo.org> fftw-3.0.1-r2.ebuild:
   stable on ia64
index 84ef14f218f3e3eaf3385244cae289feb92b1ec9..c360fcb1fd99f198fd63a51040c1cdb96909f8b7 100644 (file)
@@ -1,12 +1,13 @@
-MD5 4a8f8342448809b69143f66d02e7f2d2 fftw-3.0.1-r1.ebuild 2759
-MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 d328e0995bfcc888fb0beb2f6ed7e685 ChangeLog 7067
 MD5 b0b309c7dfe2c8566424e91792350f95 fftw-2.1.5-r1.ebuild 4141
-MD5 981405dce8b673825ea19633b584f247 ChangeLog 6925
+MD5 4a8f8342448809b69143f66d02e7f2d2 fftw-3.0.1-r1.ebuild 2759
+MD5 caeee14797ee9f5fb1c86277b5705db5 fftw-3.0.1-r2.ebuild 2806
 MD5 7b8ca418c402f3091eeb2cefd710e739 fftw-3.0.1.ebuild 2363
-MD5 956ab2cbb5dfc9bca8e270ece7265dd8 fftw-3.0.1-r2.ebuild 2728
+MD5 1395bb17e5d04e7050eab24d5b7b25d1 files/3-tmpfile.patch 538
 MD5 236dda9695005c9f306fb2c55f020686 files/digest-fftw-2.1.5-r1 63
 MD5 cd32698a34d886267d48a8ccb99747b1 files/digest-fftw-3.0.1 63
-MD5 7718e5a1330e574b38daecb472bffa17 files/fftw-ppc-macos.patch 1356
 MD5 cd32698a34d886267d48a8ccb99747b1 files/digest-fftw-3.0.1-r1 63
-MD5 1395bb17e5d04e7050eab24d5b7b25d1 files/3-tmpfile.patch 538
 MD5 cd32698a34d886267d48a8ccb99747b1 files/digest-fftw-3.0.1-r2 63
+MD5 49836a250acfcc913276a29736c68a3b files/fftw-3.0.1-altivec.patch 2585
+MD5 7718e5a1330e574b38daecb472bffa17 files/fftw-ppc-macos.patch 1356
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
index 3b5de25737c865a54738db5b1ceb93013539bad7..b79dcf933e5def00df7ea381b6397afbb9c57c13 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.0.1-r2.ebuild,v 1.9 2005/08/26 00:11:51 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.0.1-r2.ebuild,v 1.10 2005/11/12 03:12:15 lu_zero Exp $
 
 inherit flag-o-matic eutils toolchain-funcs
 
@@ -19,6 +19,9 @@ src_unpack() {
        unpack "${P}.tar.gz"
        cd "${WORKDIR}/${P}"
        epatch ${FILESDIR}/3-tmpfile.patch
+       epatch ${FILESDIR}/${P}-altivec.patch
+       autoreconf
+       libtoolize --copy --force
        cd "${WORKDIR}"
        use ppc-macos && epatch ${FILESDIR}/${PN}-ppc-macos.patch
        mv ${P} ${P}-single
diff --git a/sci-libs/fftw/files/fftw-3.0.1-altivec.patch b/sci-libs/fftw/files/fftw-3.0.1-altivec.patch
new file mode 100644 (file)
index 0000000..a71fea0
--- /dev/null
@@ -0,0 +1,85 @@
+diff -u simd.old/altivec.c simd/altivec.c
+--- simd.old/altivec.c 2005-11-12 00:28:14.000000000 +0100
++++ simd/altivec.c     2005-11-12 00:33:36.000000000 +0100
+@@ -26,15 +26,12 @@
+ #if HAVE_ALTIVEC
+ 
+ const vector unsigned int X(altivec_ld_selmsk) = 
+-   (vector unsigned int)VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
++      VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
+ 
+ const vector unsigned int X(altivec_flipri_perm) = 
+-   (vector unsigned int)VLIT(0x04050607, 0x00010203,
+-                           0x0c0d0e0f, 0x08090a0b);
++   VLIT(0x04050607, 0x00010203, 0x0c0d0e0f, 0x08090a0b);
+ 
+-const vector float X(altivec_chsr_sgn) = 
+-   (vector float)VLIT(-1.0, 1.0, -1.0, 1.0);
+-const vector float X(altivec_chsr_msk) = 
+-   (vector float)VLIT(-0.0, 0.0, -0.0, 0.0);
++const vector float X(altivec_chsr_sgn) = VLIT(-1.0, 1.0, -1.0, 1.0);
++const vector float X(altivec_chsr_msk) = VLIT(-0.0, 0.0, -0.0, 0.0);
+ 
+ #endif
+diff -u simd.old/simd-altivec.h simd/simd-altivec.h
+--- simd.old/simd-altivec.h    2005-11-12 00:28:14.000000000 +0100
++++ simd/simd-altivec.h        2005-11-12 01:31:03.000000000 +0100
+@@ -96,8 +96,12 @@
+ 
+ #else /* !__VEC__ */
+ 
++#ifdef HAVE_ALTIVEC_H
++#include <altivec.h>
++#define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3}
++#else
+ #define VLIT(x0, x1, x2, x3) (x0, x1, x2, x3)
+-
++#endif
+ #endif
+ 
+ typedef vector float V;
+--- configure.ac.old   2003-07-04 07:18:48.000000000 +0200
++++ configure.ac       2005-11-12 00:42:11.000000000 +0100
+@@ -167,7 +167,8 @@
+       ACX_CHECK_CC_FLAGS(-faltivec, faltivec,
+           SIMD_CFLAGS="-faltivec",
+           [ACX_CHECK_CC_FLAGS(-maltivec -mabi=altivec, maltivec,
+-              SIMD_CFLAGS="-maltivec -mabi=altivec",
++              SIMD_CFLAGS="-maltivec -mabi=altivec";
++              AC_DEFINE(HAVE_ALTIVEC_H,1,[Define if gcc-fsf is in use]),
+               [AC_MSG_ERROR([Need a version of gcc with -maltivec])])])
+     fi
+ fi
+--- ../fftw-3.0.1-double/simd/simd-altivec.h   2005-11-12 01:59:11.000000000 +0100
++++ simd/simd-altivec.h        2005-11-12 03:16:00.000000000 +0100
+@@ -105,12 +105,25 @@
+ #endif
+ 
+ typedef vector float V;
+-#define VADD(a, b) vec_add(a, b)
+-#define VSUB(a, b) vec_sub(a, b)
+-#define VFMA(a, b, c) vec_madd(a, b, c)
+-#define VFNMS(a, b, c) vec_nmsub(a, b, c)
++static inline V VADD(V a,V b) 
++{
++      return vec_add(a, b);
++}
++static inline V VSUB(V a, V b)
++{
++      return vec_sub(a, b);
++}
++static inline V VFMA(V a, V b, V c)
++{
++      return vec_madd(a, b, c);
++}
++static inline V VFNMS(V a, V b, V c)
++{
++      return vec_nmsub(a, b, c);
++}
++
+ #define LDK(x) x
+-#define DVK(var, val) const V var = (vector float)VLIT(val, val, val, val)
++#define DVK(var, val) const V var = VLIT(val, val, val, val)
+ 
+ static inline V VMUL(V a, V b)
+ {