touchups
authorMike Frysinger <vapier@gentoo.org>
Tue, 26 Oct 2004 13:47:31 +0000 (13:47 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 26 Oct 2004 13:47:31 +0000 (13:47 +0000)
dev-libs/torch/torch-3.ebuild

index 97f32bf92cd182c684efefe4726c02d0f9f9c4c4..a03055711eecf19f05e8ce3bd225c09a0fc623c9 100644 (file)
@@ -1,11 +1,13 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/torch/torch-3.ebuild,v 1.3 2004/07/02 04:55:59 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/torch/torch-3.ebuild,v 1.4 2004/10/26 13:47:31 vapier 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 )"
+       doc? ( http://www.torch.ch/archives/Torch3doc.tgz )"
 
 LICENSE="BSD"
 SLOT="0"
@@ -22,10 +24,11 @@ src_compile() {
        local shalldebug="OPT"
        use debug && shalldebug="DBG"
        cp config/Makefile_options_Linux .
-       sed -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:" \
-        -i 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"
@@ -39,9 +42,11 @@ src_install() {
                doins ${directory}/*.h
        done
        # prepare the options Makefile
-       sed -e 's:^LIBS_DIR.*:LIBS_DIR=/usr/lib:' \
+       sed -i \
+               -e 's:^LIBS_DIR.*:LIBS_DIR=/usr/lib:' \
                -e 's|^INCS := .*|INCS := -I /usr/include/torch $(MYINCS)|' \
-               -e '/^INCS +=/c\' -i Makefile_options_Linux
+               -e '/^INCS +=/c\' \
+               Makefile_options_Linux
        dodir /usr/share/${PN}
        insinto /usr/share/${PN}
        doins Makefile_options_Linux
@@ -50,9 +55,10 @@ src_install() {
        insinto /usr/share/doc/${PF}
        cp -a examples ${D}/usr/share/doc/${PF}
        cd ${D}/usr/share/doc/${PF}
-       sed -e 's|^TORCHDIR.*|TORCHDIR := /usr/share/torch|' \
+       sed -i \
+               -e 's|^TORCHDIR.*|TORCHDIR := /usr/share/torch|' \
                -e '/MAKE/c\' -e '/VERSION_KEY/c\' \
-               -i examples/*/Makefile
+               examples/*/Makefile
        for ex in examples/*/Makefile; do
                echo -e '\t$(CC) $(CFLAGS_$(MODE)) $(INCS) -o $@ $< $(LIBS)' >> ${ex}
        done