CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Imported core-cross ports from 2.5
[crossrootfs.git] / perl / Pkgfile
1 # Description: Perl programming language
2 # URL: http://www.perl.org/
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
5 # Depends on: db gdbm
6
7 name=perl
8 version=5.10.0
9 release=1
10 source=(ftp://ftp.perl.org/pub/CPAN/src/$name-$version.tar.gz \
11 $name-$version-cross_compile-1.patch)
12
13 build() {
14 cd $name-$version
15 patch -p1 -i $SRC/$name-$version-cross_compile-1.patch
16
17 # avoid to use target generate_uudmap binary
18 sed -i Makefile.SH \
19 -e 's|generate_uudmap\\$(EXE_EXT): .*|generate_uudmap\\$(EXE_EXT):|' \
20 -e 's|\\$(CC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap\\$(OBJ_EXT)|\\$(HOSTCC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap.c|'
21
22 # avoid ./perl
23 sed -i Makefile.SH \
24 -e 's|./perl installman |echo installman|' \
25 -e 's|./perl |./miniperl-cross |g'
26
27 sed -i utils/Makefile.SH \
28 -e 's|../miniperl|../miniperl-cross |g'
29
30 # DynaLoader.a with -fPIC, so it can be linked into a shared lib later
31 sed -i Makefile.SH \
32 -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
33 -e "s@static_target='static'@static_target='static_pic'@g"
34
35 cd Cross
36 make HOSTCC="gcc" ARCH=arm CROSS_COMPILE="$CTARGET-"
37 make DESTDIR=$PKG install
38
39 ln -sf perl$version $PKG/usr/bin/perl
40 ln -sf c2ph $PKG/usr/bin/pstruct
41 ln -sf s2p $PKG/usr/bin/psed
42 #ln -sf c2ph.1pm $PKG/usr/man/man1/pstruct.1pm
43 #ln -sf s2p.1pm $PKG/usr/man/man1/psed.1pm
44
45 find $PKG \
46 -iname 'TODO*' -or \
47 -iname 'Change*' -or \
48 -iname 'README*' -or \
49 -name '*.bs' -or \
50 -name .packlist -or \
51 -name perllocal.pod | xargs rm
52 find $PKG -depth -empty -exec rmdir {} \;
53 chmod -R +w $PKG
54 }