blob: e733d8e4c2fb1c0a4f377895006a1ee9e44b66ee (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-devel/perl/perl-5.6.0-r5.ebuild,v 1.1 2001/01/15 22:52:38 achim Exp $
P=perl-5.6.0
A=${P}.tar.gz
S=${WORKDIR}/perl-5.6.0
DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language"
SRC_URI="ftp://ftp.perl.org/pub/perl/CPAN/src/${A}"
HOMEPAGE="http://www.perl.org"
DEPEND=">=sys-libs/db-3.1.17
>=sys-libs/gdbm-1.8.0"
src_compile() {
# this is gross -- from Christian Gafton, Red Hat
cat > config.over <<EOF
installprefix=${D}/usr
test -d \$installprefix || mkdir \$installprefix
test -d \$installprefix/bin || mkdir \$installprefix/bin
installarchlib=\`echo \$installarchlib | sed "s!\$prefix!\$installprefix!"\`
installbin=\`echo \$installbin | sed "s!\$prefix!\$installprefix!"\`
installman1dir=\`echo \$installman1dir | sed "s!\$prefix!\$installprefix!"\`
installman3dir=\`echo \$installman3dir | sed "s!\$prefix!\$installprefix!"\`
installprivlib=\`echo \$installprivlib | sed "s!\$prefix!\$installprefix!"\`
installscript=\`echo \$installscript | sed "s!\$prefix!\$installprefix!"\`
installsitelib=\`echo \$installsitelib | sed "s!\$prefix!\$installprefix!"\`
installsitearch=\`echo \$installsitearch | sed "s!\$prefix!\$installprefix!"\`
EOF
sh Configure -des -Dprefix=/usr -Dd_dosuid \
-Dd_semctl_semun -Di_db -Di_gdbm -Duselargefiles \
-Darchname=${CHOST%%-*}-linux
#-Dusethreads -Duse505threads \
#Optimize ;)
cp config.sh config.sh.orig
sed -e "s/optimize='-O2'/optimize=\'${CFLAGS}\'/" config.sh.orig > config.sh
#THIS IS USED LATER:
export PARCH=`grep myarchname config.sh | cut -f2 -d"'"`
try make
# Parallell make failes
make test
}
src_install() {
try make install
install -m 755 utils/pl2pm $D/usr/bin/pl2pm
export D
# Generate *.ph files with a trick. Is this sick or what?
# Yes it is, and thank you Christian for getting sick just so we can
# run perl :)
make all -f - <<EOF
STDH =\$(wildcard /usr/include/linux/*.h) \$(wildcard /usr/include/asm/*.h) \
\$(wildcard /usr/include/scsi/*.h)
GCCDIR = \$(shell gcc --print-file-name include)
PERLLIB = \$(D)/usr/lib/perl5/%{perlver}%{perlrel}
PERL = PERL5LIB=\$(PERLLIB) \$(D)/usr/bin/perl
PHDIR = \$(PERLLIB)/\${PARCH}-linux
H2PH = \$(PERL) \$(D)/usr/bin/h2ph -d \$(PHDIR)/
all: std-headers gcc-headers fix-config
std-headers: \$(STDH)
cd /usr/include && \$(H2PH) \$(STDH:/usr/include/%%=%%)
gcc-headers: \$(GCCH)
cd \$(GCCDIR) && \$(H2PH) \$(GCCH:\$(GCCDIR)/%%=%%)
fix-config: \$(PHDIR)/Config.pm
\$(PERL) -i -p -e "s|\$(D)||g;" \$<
EOF
#MainDir=$(pwd)
#cd modules
#for module in * ; do
# eval $($MainDir/perl '-V:installarchlib')
# mkdir -p $D/$installarchlib
# try make -C $module install PREFIX=$D/usr \
# INSTALLMAN3DIR=$D/usr/man/man3
#done
#cd $MainDir
#man pages
./perl installman --man1dir=${D}/usr/man/man1 --man1ext=1 --man3dir=${D}/usr/man/man3 --man3ext=3
# This removes ${D} from Config.pm
dosed /usr/lib/perl5/5.6.0/${CHOST%%-*}-linux/Config.pm
dosed /usr/lib/perl5/5.6.0/${CHOST%%-*}-linux/.packlist
# DOCUMENTATION
dodoc Changes* Artistic Copying README Todo* AUTHORS
# HTML Documentation
dodir /usr/doc/${PF}/html
./perl installhtml --recurse --htmldir=${D}/usr/doc/${PF}/html
prepalldocs
}
|