Moved from dev-libs/torch to sci-libs/torch.
authorOlivier Fisette <ribosome@gentoo.org>
Wed, 29 Dec 2004 00:44:27 +0000 (00:44 +0000)
committerOlivier Fisette <ribosome@gentoo.org>
Wed, 29 Dec 2004 00:44:27 +0000 (00:44 +0000)
sci-libs/torch/ChangeLog [new file with mode: 0644]
sci-libs/torch/Manifest [new file with mode: 0644]
sci-libs/torch/files/digest-torch-3 [new file with mode: 0644]
sci-libs/torch/metadata.xml [new file with mode: 0644]
sci-libs/torch/torch-3.ebuild [new file with mode: 0644]

diff --git a/sci-libs/torch/ChangeLog b/sci-libs/torch/ChangeLog
new file mode 100644 (file)
index 0000000..bda83b8
--- /dev/null
@@ -0,0 +1,19 @@
+# ChangeLog for dev-libs/torch
+# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/torch/ChangeLog,v 1.1 2004/12/29 00:44:27 ribosome Exp $
+
+*torch-3 (28 Dec 2004)
+
+  28 Dec 2004; Olivier Fisette <ribosome@gentoo.org> +metadata.xml,
+  +torch-3.ebuild:
+  Moved from dev-libs/torch to sci-libs/torch.
+
+  01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org> torch-3.ebuild:
+  virtual/glibc -> virtual/libc
+
+*torch-3 (17 Jun 2004)
+
+  17 Jun 2004; Patrick Kursawe <phosphan@gentoo.org> metadata.xml,
+  torch-3.ebuild:
+  Initial version.
+
diff --git a/sci-libs/torch/Manifest b/sci-libs/torch/Manifest
new file mode 100644 (file)
index 0000000..dec5d9d
--- /dev/null
@@ -0,0 +1,4 @@
+MD5 07da4b452aecfa80fc8bfb412cfc96de ChangeLog 440
+MD5 d1e8aaf081a41639772ad32e8127b95c torch-3.ebuild 1933
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 b783f0f266b5452761370caf0b78e7f3 files/digest-torch-3 117
diff --git a/sci-libs/torch/files/digest-torch-3 b/sci-libs/torch/files/digest-torch-3
new file mode 100644 (file)
index 0000000..44752ac
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 73ecbab0862a6d98aa6a602a89b2ceb6 Torch3src.tgz 775622
+MD5 3e04241c606ddeb6cf0f6a5bc4b50a2e Torch3doc.tgz 1622648
diff --git a/sci-libs/torch/metadata.xml b/sci-libs/torch/metadata.xml
new file mode 100644 (file)
index 0000000..b229aec
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+</pkgmetadata>
diff --git a/sci-libs/torch/torch-3.ebuild b/sci-libs/torch/torch-3.ebuild
new file mode 100644 (file)
index 0000000..7266834
--- /dev/null
@@ -0,0 +1,70 @@
+# Copyright 1999-2004 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.1 2004/12/29 00:44:27 ribosome Exp $
+
+inherit toolchain-funcs
+
+DESCRIPTION="machine-learning library, written in simple C++"
+HOMEPAGE="http://www.torch.ch/"
+SRC_URI="http://www.torch.ch/archives/Torch${PV}src.tgz
+       doc? ( http://www.torch.ch/archives/Torch3doc.tgz )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="doc debug"
+
+DEPEND="virtual/libc"
+
+S=${WORKDIR}/Torch${PV}
+
+torch_packages="convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech"
+
+src_compile() {
+       local shalldebug="OPT"
+       use debug && shalldebug="DBG"
+       cp config/Makefile_options_Linux .
+       sed -i \
+               -e "s:^PACKAGES.*:PACKAGES = ${torch_packages}:" \
+               -e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \
+               -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = -Wall ${CFLAGS} -ffast-math -malign-double:" \
+               Makefile_options_Linux
+
+       make depend
+       emake || die "emake failed"
+}
+
+src_install() {
+       dolib lib/*/*.a
+       dodir /usr/include/torch
+       insinto /usr/include/torch
+       for directory in core ${torch_packages}; do
+               doins ${directory}/*.h
+       done
+       # prepare the options Makefile
+       sed -i \
+               -e 's:^LIBS_DIR.*:LIBS_DIR=/usr/lib:' \
+               -e 's|^INCS := .*|INCS := -I /usr/include/torch $(MYINCS)|' \
+               -e '/^INCS +=/c\' \
+               Makefile_options_Linux
+       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 -a 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\' \
+               examples/*/Makefile
+       for ex in examples/*/Makefile; do
+               echo -e '\t$(CC) $(CFLAGS_$(MODE)) $(INCS) -o $@ $< $(LIBS)' >> ${ex}
+       done
+       if use doc; then
+               cd ${WORKDIR}/docs
+               doins *.pdf
+               dohtml -r manual/.
+       fi
+}