readline: apply 6.2 patches correctly.

This commit is contained in:
Juan RP 2012-01-30 17:04:41 +01:00
parent b35f70ccfb
commit 39891b05e7
1 changed files with 8 additions and 21 deletions

View File

@ -3,6 +3,7 @@ pkgname=readline
_dist_ver=6.2
_patch_ver=002
version=${_dist_ver}.${_patch_ver}
revision=1
#version=${_dist_ver}
wrksrc=${pkgname}-${_dist_ver}
distfiles="http://ftp.gnu.org/gnu/readline/${pkgname}-${_dist_ver}.tar.gz"
@ -24,35 +25,21 @@ long_desc="
subpackages="$pkgname-devel"
Add_dependency build ncurses-devel
pre_configure()
{
local url="http://ftp.gnu.org/gnu/$pkgname/$pkgname-6.1-patches"
pre_configure() {
local url="http://ftp.gnu.org/gnu/$pkgname/$pkgname-${_dist_ver}-patches"
if [ "${_patch_ver}" -gt 000 ]; then
for p in $(seq -w 001 ${_patch_ver}); do
cd ${XBPS_SRCDISTDIR} || return 1
[ -f ${XBPS_SRCDISTDIR}/readline61-${p} ] && continue
msg_normal " Fetching $url/readline61-$p ...\n"
$XBPS_FETCH_CMD ${url}/readline61-$p
[ -f ${XBPS_SRCDISTDIR}/readline62-${p} ] && continue
msg_normal " Fetching $url/readline62-$p ...\n"
$XBPS_FETCH_CMD ${url}/readline62-$p
done
fi
cd ${wrksrc}
for p in $(seq -w 001 ${_patch_ver}); do
patch -s -Np0 -i ${XBPS_SRCDISTDIR}/readline61-${p} && \
msg_normal " Applying patch readline61-$p.\n"
patch -s -Np0 -i ${XBPS_SRCDISTDIR}/readline62-${p} && \
msg_normal " Applying patch readline62-$p.\n"
done
sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf
}
post_install()
{
# Move shared libs to /.
mkdir -p ${DESTDIR}/lib
mv ${DESTDIR}/usr/lib/lib*.so.* ${DESTDIR}/lib
chmod 755 ${DESTDIR}/lib/*.so*
rm -f ${DESTDIR}/usr/lib/*.so
for f in history readline; do
cd ${DESTDIR}/usr/lib && \
ln -s ../../lib/lib${f}.so.6 lib${f}.so
done
}