blob: 698e9deacad2757d3e42fcf11d9e21df45fe1779 (
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/perl/perl-5.8.0-r3.ebuild,v 1.7 2002/12/11 16:00:48 mcummings Exp $
IUSE="berkdb gdbm"
S=${WORKDIR}/${P}
DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language"
SRC_URI="ftp://ftp.perl.org/pub/CPAN/src/${P}.tar.gz"
HOMEPAGE="http://www.perl.org"
LICENSE="Artistic GPL-2"
SLOT="0"
KEYWORDS="~x86 ~sparc ~ppc ~alpha"
DEPEND="sys-apps/groff berkdb? ( >=sys-libs/db-3.2.3h-r3 =sys-libs/db-1.85-r1 ) gdbm? ( >=sys-libs/gdbm-1.8.0 )"
RDEPEND="berkdb? ( >=sys-libs/db-3.2.3h-r3 =sys-libs/db-1.85-r1 ) gdbm? ( >=sys-libs/gdbm-1.8.0 )"
src_compile() {
local myconf
if [ "`use gdbm`" ]
then
myconf="-Di_gdbm"
fi
if [ "`use berkdb`" ]
then
myconf="${myconf} -Di_db -Di_ndbm"
else
myconf="${myconf} -Ui_db -Ui_ndbm"
fi
if [ "`use sparc`" ]
then
myconf="${myconf} -Ud_longdbl"
fi
if [ "`use sparc64`" ]
then
myconf="${myconf} -Ud_longdbl"
fi
cd ${S}
rm -f config.sh Policy.sh
sh Configure -des \
-Darchname=${CHOST%%-*}-linux \
-Dcccdlflags='-fPIC' \
-Dccdlflags='-rdynamic' \
-Dcc=gcc \
-Dprefix='/usr' \
-Dvendorprefix='/usr' \
-Dsiteprefixx='/usr' \
-Dlocincpth=' ' \
-Doptimize="${CFLAGS}" \
-Duselargefiles \
-Duseshrplib \
-Dman3ext=3pm \
-Dlibperl=libperl.so \
-Dd_dosuid \
-Dd_semctl_semun \
-Dcf_by=Gentoo \
-Ud_csh \
${myconf} || die
make -f Makefile depend || die "Couldn't make libperl.so depends"
make -f Makefile libperl.so || die "Unable to make libperl.so"
mv libperl.so ${WORKDIR}
cd ${WORKDIR}
rm -rf ${S}
unpack ${A}
cd ${S}
cat > config.over <<EOF
installprefix=${D}/usr
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!"\`
installman1dir=`echo $installman1dir | sed "s!/share/share/!/share/!"`
installman3dir=`echo $installman3dir | sed "s!/share/share/!/share/!"`
installman1dir=\`echo \$installman1dir | sed "s!/usr/man/!/usr/share/man/!"\`
installman3dir=\`echo \$installman3dir | sed "s!/usr/man/!/usr/share/man/!"\`
man1ext=1
man3ext=3pm
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 \
-Darchname=${CHOST%%-*}-linux \
-Dcc=gcc \
-Dprefix='/usr' \
-Dvendorprefix='/usr' \
-Dsiteprefixx='/usr' \
-Dlocincpth=' ' \
-Doptimize="${CFLAGS}" \
-Duselargefiles \
-Dd_dosuid \
-Dd_semctl_semun \
-Dman3ext=3pm \
-Dcf_by=Gentoo \
-Ud_csh \
${myconf} || die "Unable to configure"
# emake || die "Unable toe make"
make || die "Unable to make"
make -i test CCDLFLAGS=
}
src_install () {
cd ${S}
insinto /usr/lib/perl5/${PV}/${CHOST%%-*}-linux/CORE/
doins ${WORKDIR}/libperl.so
dosym /usr/lib/perl5/${PV}/${CHOST%%-*}-linux/CORE/libperl.so /usr/lib/libperl.so
#Fix for "stupid" modules and programs
dodir /usr/lib/perl5/site_perl/${PV}/${CHOST%%-*}-linux
make DESTDIR=${D} INSTALLMAN1DIR=${D}/usr/share/man/man1 INSTALLMAN3DIR=${D}/usr/share/man/man3 install || die "Unable to make install"
cp -f utils/h2ph utils/h2ph_patched
patch -p1 < ${FILESDIR}/perl-5.8.0-RC2-special-h2ph-not-failing-on-machine_ansi_header.patch
LD_LIBRARY_PATH=. ./perl -Ilib utils/h2ph_patched -a -d ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux <<EOF
asm/termios.h
syscall.h
syslimits.h
syslog.h
sys/ioctl.h
sys/socket.h
sys/time.h
wait.h
EOF
#This is to fix a missing c flag for backwards compat
cp ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm.bak
sed -e "s:ccflags=':ccflags='-DPERL5 :" ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm.bak > ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm
cp ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm.bak
sed -e "s:cppflags=':cppflags='-DPERL5 :" ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm.bak > ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm
rm -f ${D}/usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm.bak
rm -f ${D}/usr/lib/perl5/${PV}/Config.pm.4install
# A poor fix for the miniperl issues
sed -e 's:./miniperl:/usr/bin/perl:' ${D}/usr/lib/perl5/${PV}/ExtUtils/xsubpp > ${D}/usr/lib/perl5/${PV}/ExtUtils/xsubpp.bak
mv ${D}/usr/lib/perl5/${PV}/ExtUtils/xsubpp.bak ${D}/usr/lib/perl5/${PV}/ExtUtils/xsubpp
chmod 444 ${D}/usr/lib/perl5/${PV}/ExtUtils/xsubpp
sed -e 's:./miniperl:/usr/bin/perl:' ${D}/usr/bin/xsubpp > ${D}/usr/bin/xsubpp.bak
mv ${D}/usr/bin/xsubpp.bak ${D}/usr/bin/xsubpp
chmod 755 ${D}/usr/bin/xsubpp
./perl installman --man1dir=${D}/usr/share/man/man1 --man1ext=1 --man3dir=${D}/usr/share/man/man3 --man3ext=3
# This removes ${D} from Config.pm
dosed /usr/lib/perl5/${PV}/${CHOST%%-*}-linux/Config.pm
dosed /usr/lib/perl5/${PV}/${CHOST%%-*}-linux/.packlist
dodoc Changes* Artistic Copying README Todo* AUTHORS
prepalldocs
# HTML Documentation
# We expect errors, warnings, and such with the following.
dodir /usr/share/doc/${PF}/html
./perl installhtml \
--podroot=. \
--podpath=lib:ext:pod:vms \
--recurse \
--htmldir=${D}/usr/share/doc/${PF}/html \
--libpods=perlfunc:perlguts:perlvar:perlrun:perlop
}
|