summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-mathematics/freemat/ChangeLog7
-rw-r--r--sci-mathematics/freemat/files/freemat-4.1-python3.patch24
-rw-r--r--sci-mathematics/freemat/freemat-4.1.ebuild38
-rw-r--r--sci-mathematics/freemat/metadata.xml4
4 files changed, 55 insertions, 18 deletions
diff --git a/sci-mathematics/freemat/ChangeLog b/sci-mathematics/freemat/ChangeLog
index fe6473d81072..e2c40cda99ac 100644
--- a/sci-mathematics/freemat/ChangeLog
+++ b/sci-mathematics/freemat/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-mathematics/freemat
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/ChangeLog,v 1.26 2012/04/05 20:43:03 grozin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/ChangeLog,v 1.27 2012/04/12 23:38:41 bicatali Exp $
+
+ 12 Apr 2012; Sébastien Fabbro <bicatali@gentoo.org> freemat-4.1.ebuild,
+ +files/freemat-4.1-python3.patch, metadata.xml:
+ Fix python3 generation (bug #411699), add vtk flag to avoid automagic, prefix
+ fixes for liffi and messages
*freemat-4.1 (05 Apr 2012)
diff --git a/sci-mathematics/freemat/files/freemat-4.1-python3.patch b/sci-mathematics/freemat/files/freemat-4.1-python3.patch
new file mode 100644
index 000000000000..a7aad97cfc7d
--- /dev/null
+++ b/sci-mathematics/freemat/files/freemat-4.1-python3.patch
@@ -0,0 +1,24 @@
+diff -Nur tools.orig/jitgen.py tools/jitgen.py
+--- tools.orig/jitgen.py 2012-04-13 00:25:18.000000000 +0100
++++ tools/jitgen.py 2012-04-13 00:25:40.000000000 +0100
+@@ -39,7 +39,7 @@
+ f.write("// \n\n// Here, each function gets prototyped.\n");
+ f.close()
+
+-os.path.walk(sys.argv[1], visit, '')
++os.walk(sys.argv[1], visit, '')
+
+ f = open(sys.argv[2],'a')
+ f.write("static const char* jit_scalar_list[] = {");
+diff -Nur tools.orig/siggen.py tools/siggen.py
+--- tools.orig/siggen.py 2012-04-13 00:25:18.000000000 +0100
++++ tools/siggen.py 2012-04-13 00:25:53.000000000 +0100
+@@ -81,7 +81,7 @@
+ function_name = fsplit[1]
+ function_internal_name = fsplit[2];
+ if (function_name == '') or (function_internal_name == ''):
+- print 'MISSING Function Name: <%s> <%s> <%s>'%(fline,function_name,function_internal_name)
++ print('MISSING Function Name: <%s> <%s> <%s>'%(fline,function_name,function_internal_name))
+ inputs = iline.split()
+ inputs = inputs[1:]
+ outputs = oline.split()
diff --git a/sci-mathematics/freemat/freemat-4.1.ebuild b/sci-mathematics/freemat/freemat-4.1.ebuild
index 71c8bf1dd5a9..029913d5f3c1 100644
--- a/sci-mathematics/freemat/freemat-4.1.ebuild
+++ b/sci-mathematics/freemat/freemat-4.1.ebuild
@@ -1,10 +1,11 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/freemat-4.1.ebuild,v 1.1 2012/04/05 20:43:03 grozin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/freemat-4.1.ebuild,v 1.2 2012/04/12 23:38:41 bicatali Exp $
-EAPI="4"
-inherit eutils cmake-utils fdo-mime
+EAPI=4
+inherit eutils cmake-utils fdo-mime python
+RESTRICT_PYTHON_ABIS="2.4 2.5"
MY_PN=FreeMat
MY_P=${MY_PN}-${PV}
@@ -12,7 +13,7 @@ DESCRIPTION="Environment for rapid engineering and scientific processing"
HOMEPAGE="http://freemat.sourceforge.net/"
SRC_URI="mirror://sourceforge/freemat/${MY_P}-Source.tar.gz"
-IUSE="volpack"
+IUSE="volpack vtk"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
@@ -24,15 +25,18 @@ RDEPEND="dev-libs/libpcre
sci-libs/matio
sci-libs/umfpack
sys-libs/ncurses
- virtual/lapack
virtual/glu
+ virtual/lapack
+ virtual/libffi
virtual/opengl
x11-libs/qt-gui:4
x11-libs/qt-opengl:4
x11-libs/qt-svg:4
- volpack? ( media-libs/volpack )"
+ volpack? ( media-libs/volpack )
+ vtk? ( sci-libs/vtk )"
DEPEND="${RDEPEND}
+ dev-lang/python
dev-util/pkgconfig"
S="${WORKDIR}/${MY_P}-Source"
@@ -43,22 +47,26 @@ src_prepare(){
"${FILESDIR}"/${P}-have_fftw.patch \
"${FILESDIR}"/${P}-local_libffi.patch \
"${FILESDIR}"/${P}-portaudio.patch \
- "${FILESDIR}"/${P}-use_llvm.patch
-}
-
-src_configure() {
+ "${FILESDIR}"/${P}-use_llvm.patch \
+ "${FILESDIR}"/${P}-python3.patch
rm -f CMakeCache.txt
find . -type f -name '*.moc.cpp' -exec rm -f {} \;
find . -type f -name 'add.so' -exec rm -f {} \;
- mycmakeargs="${mycmakeargs}
+}
+
+src_configure() {
+ mycmakeargs+=(
-DUSE_LLVM=OFF
+ -DUSE_ITK=OFF
-DFORCE_BUNDLED_PCRE=OFF
-DFORCE_BUNDLED_UMFPACK=OFF
-DFORCE_BUNDLED_PORTAUDIO=OFF
-DFORCE_BUNDLED_ZLIB=OFF
-DFORCE_BUNDLED_AMD=OFF
- -DFFI_INCLUDE_DIR="$(echo /usr/$(get_libdir)/libffi-*/include)"
- $(cmake-utils_use_with volpack VOLPACK)"
+ -DFFI_INCLUDE_DIR="$(pkg-config --cflags-only-I libffi | sed -e s/-I//)"
+ $(cmake-utils_use_with volpack VOLPACK)
+ $(cmake-utils_use_with vtk VTK)
+ )
cmake-utils_src_configure
}
@@ -72,9 +80,9 @@ src_install() {
pkg_postinst() {
fdo-mime_desktop_database_update
elog "Before using ${MY_PN}, do (as a normal user)"
- elog "FreeMat -i /usr/share/${MY_P}"
+ elog "FreeMat -i ${EROOT}usr/share/${MY_P}"
elog "Then start ${MY_PN}, choose Tools -> Path Tool,"
- elog "select /usr/share/${MY_P}/toolbox and Add With Subfolders"
+ elog "select ${EROOT}usr/share/${MY_P}/toolbox and Add With Subfolders"
}
pkg_postrm() {
diff --git a/sci-mathematics/freemat/metadata.xml b/sci-mathematics/freemat/metadata.xml
index 3a5318af5683..9ca12c9cbaeb 100644
--- a/sci-mathematics/freemat/metadata.xml
+++ b/sci-mathematics/freemat/metadata.xml
@@ -11,7 +11,7 @@
and visualization capabilities.
</longdescription>
<use>
- <flag name='volpack'>Add volume rendering
- via <pkg>media-libs/volpack</pkg></flag>
+ <flag name='volpack'>Add volume rendering via <pkg>media-libs/volpack</pkg></flag>
+ <flag name='vtk'>Add 3D capabilities via <pkg>sci-libs/vtk</pkg></flag>
</use>
</pkgmetadata>