summaryrefslogtreecommitdiff
blob: e0a45fc9bded5557d48d43155a604749d307cede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/dev-perl/PDL/PDL-2.2.1.ebuild,v 1.1 2001/06/04 06:41:14 achim Exp $

A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="PDL Perl Module"
SRC_URI="http://cpan.valueclick.com/modules/by-module/PDL/${A}"
HOMEPAGE="http://cpan.valueclick.com/modules/by-module/PDL/${P}.readme"

DEPEND=">=sys-devel/perl-5
	>=sys-libs/ncurses-5.2
	>=dev-perl/ExtUtils-F77-1.13
	opengl? ( virtual/opengl virtual/glu )"

src_unpack() {

  unpack ${A}
  cp ${FILESDIR}/perldl.conf ${S}
  #open gl does not work at the moment
  if [ "`use opengl`" ]
  then
     echo "Disabled at the moment"
    sed -e "s:WITH_3D => undef:WITH_3D => 1:" ${FILESDIR}/perldl.conf > ${S}/perldl.conf
  else
    sed -e "s:WITH_3D => undef:WITH_3D => 0:" ${FILESDIR}/perldl.conf > ${S}/perldl.conf
  fi

}

src_compile() {

    perl Makefile.PL
    try make
    make test

}

src_install () {

    try make PREFIX=${D}/usr INSTALLMAN3DIR=/usr/share/man/man3 \
	INSTALLMAN1DIR=${D}/usr/share/man/man1 install

    dodoc COPYING Changes DEPENDENCIES DEVELOPMENT README MANIFEST*
    dodoc Release_Notes TODO
    mv ${D}/usr/lib/perl5/site_perl/5.6.0/${CHOST%%-*}-linux/PDL/HtmlDocs ${D}/usr/doc/${P}/html
    mydir=${D}/usr/doc/${P}/html/PDL
    for i in ${mydir}/* ${mydir}/IO/* ${mydir}/Fit/* ${mydir}/Pod/* ${mydir}/Graphics/* 
    do
	dosed ${i/${D}}
    done
    dosed /usr/lib/perl5/site_perl/5.6.0/${CHOST%%-*}-linux/PDL/pdldoc.db 

}