# Description: Perl programming language # URL: http://www.perl.org/ # Maintainer: CRUX System Team, core-ports at crux dot nu # Arch Maintainer: CRUX-ARM System Team, devel@crux-arm.nu # Depends on: db gdbm name=perl version=5.10.0 release=1 source=(http://www.cpan.org/src/5.0/$name-$version.tar.gz \ $name-$version-cross_compile-1.patch) build() { cd $name-$version patch -p1 -i $SRC/$name-$version-cross_compile-1.patch # avoid to use target generate_uudmap binary sed -i Makefile.SH \ -e 's|generate_uudmap\\$(EXE_EXT): .*|generate_uudmap\\$(EXE_EXT):|' \ -e 's|\\$(CC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap\\$(OBJ_EXT)|\\$(HOSTCC) -o generate_uudmap \\$(LDFLAGS) generate_uudmap.c|' # avoid ./perl sed -i Makefile.SH \ -e 's|./perl installman |echo installman|' \ -e 's|./perl |./miniperl-cross |g' sed -i utils/Makefile.SH \ -e 's|../miniperl|../miniperl-cross |g' # DynaLoader.a with -fPIC, so it can be linked into a shared lib later sed -i Makefile.SH \ -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \ -e "s@static_target='static'@static_target='static_pic'@g" cd Cross make HOSTCC="gcc" ARCH=arm CROSS_COMPILE="$CTARGET-" make DESTDIR=$PKG install ln -sf perl$version $PKG/usr/bin/perl ln -sf c2ph $PKG/usr/bin/pstruct ln -sf s2p $PKG/usr/bin/psed #ln -sf c2ph.1pm $PKG/usr/man/man1/pstruct.1pm #ln -sf s2p.1pm $PKG/usr/man/man1/psed.1pm find $PKG \ -iname 'TODO*' -or \ -iname 'Change*' -or \ -iname 'README*' -or \ -name '*.bs' -or \ -name .packlist -or \ -name perllocal.pod | xargs rm find $PKG -depth -empty -exec rmdir {} \; chmod -R +w $PKG }