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
10 source=(http://www.cpan.org/src/5.0/$name-$version.tar.gz \
11 $name-$version-cross_compile-1.patch)
15 patch -p1 -i $SRC/$name-$version-cross_compile-1.patch
17 # Use of safe cflags to build perl-cross on the host, and don't use msoft-float
18 export CFLAGS=${CFLAGS/-msoft-float/}
20 # avoid to use target generate_uudmap binary
22 -e 's|generate_uudmap\\$(EXE_EXT): .*|generate_uudmap\\$(EXE_EXT):|' \
23 -e 's|\\$(CC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap\\$(OBJ_EXT)|\\$(HOSTCC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap.c|'
27 -e 's|./perl installman |echo installman|' \
28 -e 's|./perl |./miniperl-cross |g'
30 sed -i utils/Makefile.SH \
31 -e 's|../miniperl|../miniperl-cross |g'
33 # DynaLoader.a with -fPIC, so it can be linked into a shared lib later
35 -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
36 -e "s@static_target='static'@static_target='static_pic'@g"
39 make HOSTCC="gcc" ARCH=arm CROSS_COMPILE="$CTARGET-"
40 make DESTDIR=$PKG install
42 ln -sf perl$version $PKG/usr/bin/perl
43 ln -sf c2ph $PKG/usr/bin/pstruct
44 ln -sf s2p $PKG/usr/bin/psed
45 #ln -sf c2ph.1pm $PKG/usr/man/man1/pstruct.1pm
46 #ln -sf s2p.1pm $PKG/usr/man/man1/psed.1pm
50 -iname 'Change*' -or \
51 -iname 'README*' -or \
54 -name perllocal.pod | xargs rm
55 find $PKG -depth -empty -exec rmdir {} \;