perl: fix cross compilation and create libperl.so symlink as well.

This commit is contained in:
Juan RP 2015-02-15 13:20:20 +01:00
parent 05f5b6e455
commit 5fa37384d3

View File

@ -188,8 +188,8 @@ do_build() {
export LIB=$XBPS_CROSS_BASE/usr/lib
export INCLUDE=$XBPS_CROSS_BASE/usr/include
make SHRPLDFLAGS='-shared -Wl,-soname,libperl.so.${revision}.${patchlevel}' \
CROSS_PERL=$HOST_PERL libperl.so.${version%.*} ${makejobs}
make SHRPLDFLAGS="-shared -Wl,-soname,libperl.so.${version%.*}" \
CROSS_PERL=$HOST_PERL libperl.so ${makejobs}
cp -fr $HOST_PERL_LIBS/auto/* lib/auto/
mkdir -p lib/$XBPS_CROSS_TRIPLET
@ -250,7 +250,14 @@ do_install() {
find ${DESTDIR} -name .packlist -delete
# Make a symlink so that libperl.so is accesible.
rm -f ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so
if [ "$CROSS_BUILD" ]; then
mv ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so \
${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so.${version%.*}
else
rm -f ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so
fi
rm -f ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so
ln -sfr ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so.${version%.*} \
${DESTDIR}/usr/lib/libperl.so.${version%.*}
ln -s libperl.so.${version%.*} ${DESTDIR}/usr/lib/libperl.so
}