summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-07-24 18:37:44 +0000
committerJustin Lecher <jlec@gentoo.org>2010-07-24 18:37:44 +0000
commitf66cbd23f9d120bac6a1822840c55b6c4cc240ab (patch)
tree3fba7e4b133da45020dce0ed04989d2eb7352d1b /sci-libs/torch
parentFix for compilation with USE=ffmpeg, #327517 (diff)
downloadgentoo-2-f66cbd23f9d120bac6a1822840c55b6c4cc240ab.tar.gz
gentoo-2-f66cbd23f9d120bac6a1822840c55b6c4cc240ab.tar.bz2
gentoo-2-f66cbd23f9d120bac6a1822840c55b6c4cc240ab.zip
Parallel build fix
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/torch')
-rw-r--r--sci-libs/torch/ChangeLog6
-rw-r--r--sci-libs/torch/files/3.1-prll.patch40
-rw-r--r--sci-libs/torch/torch-3.1.ebuild18
-rw-r--r--sci-libs/torch/torch-3.ebuild11
4 files changed, 62 insertions, 13 deletions
diff --git a/sci-libs/torch/ChangeLog b/sci-libs/torch/ChangeLog
index f9b1cf6c8e5d..67255a49e8c0 100644
--- a/sci-libs/torch/ChangeLog
+++ b/sci-libs/torch/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-libs/torch
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/ChangeLog,v 1.8 2010/03/15 04:48:17 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/ChangeLog,v 1.9 2010/07/24 18:37:44 jlec Exp $
+
+ 24 Jul 2010; Justin Lecher <jlec@gentoo.org> +files/3.1-prll.patch,
+ torch-3.ebuild, torch-3.1.ebuild:
+ Parallel build fix
15 Mar 2010; Sébastien Fabbro <bicatali@gentoo.org> torch-3.1.ebuild:
Now install headers, thanks Joshua Rich for the patch, bug #309225
diff --git a/sci-libs/torch/files/3.1-prll.patch b/sci-libs/torch/files/3.1-prll.patch
new file mode 100644
index 000000000000..02193c310bc4
--- /dev/null
+++ b/sci-libs/torch/files/3.1-prll.patch
@@ -0,0 +1,40 @@
+diff --git a/Makefile b/Makefile
+index 8771305..a39977f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,10 +5,19 @@ include Makefile_options_$(OS)
+ SUBDIRS := core
+ SUBDIRS += $(PACKAGES)
+
+-all:
+- @echo ">>> Try to compile Torch <<<"
+- @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@) || exit 10 ; done
+- @echo ">> !!! Ok !!! <<<"
++.PHONY: subdirs $(SUBDIRS)
++
++core: $(PACKAGES)
++
++all: subdirs
++
++subdirs: $(SUBDIRS)
++
++$(SUBDIRS):
++ @\mkdir -p $(OBJS_DIR)
++ @\mkdir -p $(LIBS_DIR)
++ $(MAKE) -C $@ depend
++ $(MAKE) -C $@
+
+ clean:
+ @echo ">>> Atomise all <<<"
+diff --git a/core/Makefile b/core/Makefile
+index 588d366..42b8a11 100644
+--- a/core/Makefile
++++ b/core/Makefile
+@@ -11,6 +11,7 @@ all: $(LIBTORCH)
+ $(LIBTORCH): $(OBJS)
+ @echo "Archiving..."
+ @$(AR) $(LIBTORCH) $(OBJS)
++ @ranlib $(LIBTORCH)
+
+ $(OBJS_DIR)/%.o: %.cc
+ @echo $<
diff --git a/sci-libs/torch/torch-3.1.ebuild b/sci-libs/torch/torch-3.1.ebuild
index 59c8b6d82ad5..d650dfb5a4fd 100644
--- a/sci-libs/torch/torch-3.1.ebuild
+++ b/sci-libs/torch/torch-3.1.ebuild
@@ -1,10 +1,12 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/torch-3.1.ebuild,v 1.2 2010/03/15 04:48:17 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/torch-3.1.ebuild,v 1.3 2010/07/24 18:37:44 jlec Exp $
-inherit toolchain-funcs multilib
+EAPI="3"
-DESCRIPTION="machine-learning library, written in simple C++"
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Machine-learning library, written in simple C++"
HOMEPAGE="http://www.torch.ch/"
SRC_URI="http://www.torch.ch/archives/Torch${PV%.1}src.tgz
doc? ( http://www.torch.ch/archives/Torch3doc.tgz )"
@@ -18,6 +20,10 @@ S=${WORKDIR}/Torch${PV%.1}
TORCH_PACKAGES="convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech"
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-prll.patch
+}
+
src_compile() {
local shalldebug="OPT"
use debug && shalldebug="DBG"
@@ -27,10 +33,10 @@ src_compile() {
sed -i \
-e "s:^PACKAGES.*:PACKAGES = ${TORCH_PACKAGES}:" \
-e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \
- -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = ${CFLAGS} -ffast-math ${extraflags}:" \
- Makefile_options_Linux
+ -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = ${CXXFLAGS} -ffast-math ${extraflags} -fPIC:" \
+ -e "s:g++:$(tc-getCXX):g" \
+ Makefile_options_Linux || die
- emake -j1 depend || die
emake || die "emake failed"
}
diff --git a/sci-libs/torch/torch-3.ebuild b/sci-libs/torch/torch-3.ebuild
index f335d2b1e0ff..280d41d18db0 100644
--- a/sci-libs/torch/torch-3.ebuild
+++ b/sci-libs/torch/torch-3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/torch-3.ebuild,v 1.5 2009/09/23 20:09:57 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/torch-3.ebuild,v 1.6 2010/07/24 18:37:44 jlec Exp $
inherit toolchain-funcs multilib
@@ -52,11 +52,10 @@ src_install() {
dodir /usr/share/${PN}
insinto /usr/share/${PN}
doins Makefile_options_Linux
- dodoc LICENSE
dodir /usr/share/doc/${PF}
insinto /usr/share/doc/${PF}
- cp -pPR examples ${D}/usr/share/doc/${PF}
- cd ${D}/usr/share/doc/${PF}
+ cp -pPR examples "${D}"/usr/share/doc/${PF}
+ cd "${D}"/usr/share/doc/${PF}
sed -i \
-e 's|^TORCHDIR.*|TORCHDIR := /usr/share/torch|' \
-e '/MAKE/c\\' -e '/VERSION_KEY/c\\' \
@@ -65,7 +64,7 @@ src_install() {
echo -e '\t$(CC) $(CFLAGS_$(MODE)) $(INCS) -o $@ $< $(LIBS)' >> ${ex}
done
if use doc; then
- cd ${WORKDIR}/docs
+ cd "${WORKDIR}"/docs
doins *.pdf
dohtml -r manual/.
fi