CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
binutils: update to 2.22. Removed host's texinfo dependency.
[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, devel at crux-arm dot nu
5 # Depends on: db gdbm
6
7 name=perl
8 version=5.10.0
9 release=3
10 source=(http://www.cpan.org/src/5.0/$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 # Use of safe cflags to build perl-cross on the host, and don't use msoft-float
18 export CFLAGS=${CFLAGS/-march=armv7-a -mfpu=vfpv3-d16 -mthumb/}
19
20 # Removed references to softfp
21 sed "s|\-msoft\-float||g" -i Cross/Makefile
22
23 # avoid to use target generate_uudmap binary
24 sed -i Makefile.SH \
25 -e 's|generate_uudmap\\$(EXE_EXT): .*|generate_uudmap\\$(EXE_EXT):|' \
26 -e 's|\\$(CC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap\\$(OBJ_EXT)|\\$(HOSTCC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap.c|'
27
28 # avoid ./perl
29 sed -i Makefile.SH \
30 -e 's|./perl installman |echo installman|' \
31 -e 's|./perl |./miniperl-cross |g'
32
33 sed -i utils/Makefile.SH \
34 -e 's|../miniperl|../miniperl-cross |g'
35
36 # DynaLoader.a with -fPIC, so it can be linked into a shared lib later
37 sed -i Makefile.SH \
38 -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
39 -e "s@static_target='static'@static_target='static_pic'@g"
40
41 cd Cross
42 make HOSTCC="gcc" ARCH=arm CROSS_COMPILE="$CTARGET-"
43 make DESTDIR=$PKG install
44
45 ln -sf perl$version $PKG/usr/bin/perl
46 ln -sf c2ph $PKG/usr/bin/pstruct
47 ln -sf s2p $PKG/usr/bin/psed
48 #ln -sf c2ph.1pm $PKG/usr/man/man1/pstruct.1pm
49 #ln -sf s2p.1pm $PKG/usr/man/man1/psed.1pm
50
51 find $PKG \
52 -iname 'TODO*' -or \
53 -iname 'Change*' -or \
54 -iname 'README*' -or \
55 -name '*.bs' -or \
56 -name .packlist -or \
57 -name perllocal.pod | xargs rm
58 find $PKG -depth -empty -exec rmdir {} \;
59 chmod -R +w $PKG
60 }