/[gentoo-x86]/sci-libs/torch/torch-3.1.ebuild
Gentoo

Contents of /sci-libs/torch/torch-3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 3 20:20:35 2012 UTC (7 years, 11 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +9 -12 lines
keyword amd64-linux x86-linux

(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/torch-3.1.ebuild,v 1.3 2010/07/24 18:37:44 jlec Exp $
4
5 EAPI=4
6
7 inherit eutils multilib toolchain-funcs
8
9 DESCRIPTION="Machine-learning library, written in simple C++"
10 HOMEPAGE="http://www.torch.ch/"
11 SRC_URI="http://www.torch.ch/archives/Torch${PV%.1}src.tgz
12 doc? ( http://www.torch.ch/archives/Torch3doc.tgz )"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="debug doc examples"
18
19 S=${WORKDIR}/Torch${PV%.1}
20
21 TORCH_PACKAGES="convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech"
22
23 src_prepare() {
24 epatch "${FILESDIR}"/${PV}-prll.patch
25 }
26
27 src_compile() {
28 local shalldebug="OPT"
29 use debug && shalldebug="DBG"
30 # -malign-double makes no sense on a 64-bit arch
31 use amd64 || extraflags="-malign-double"
32 cp config/Makefile_options_Linux .
33 sed -i \
34 -e "s:^PACKAGES.*:PACKAGES = ${TORCH_PACKAGES}:" \
35 -e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \
36 -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = ${CXXFLAGS} -ffast-math ${extraflags} -fPIC:" \
37 -e "s:g++:$(tc-getCXX):g" \
38 Makefile_options_Linux || die
39
40 emake || die "emake failed"
41 }
42
43 src_install() {
44 dolib.a lib/*/*.a
45 insinto /usr/include/torch
46 for directory in core ${TORCH_PACKAGES}; do
47 doins ${directory}/*.h
48 done
49
50 if use examples; then
51 insinto /usr/share/doc/${PF}
52 doins -r examples
53 fi
54
55 use doc && dodoc "${WORKDIR}"/docs/*pdf \
56 && dohtml -r "${WORKDIR}"/docs/manual/*
57 }

  ViewVC Help
Powered by ViewVC 1.1.20