diff --git a/templates/readline/devel.template b/templates/readline/devel.template index bdcddec0d77..084cf4d6ab6 100644 --- a/templates/readline/devel.template +++ b/templates/readline/devel.template @@ -16,8 +16,11 @@ do_install() mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr mv ${SRCPKGDESTDIR}/usr/lib/*.*a ${DESTDIR}/usr/lib + cd ${DESTDIR}/usr/lib && \ + ln -s ../../lib/libreadline.so.6 libreadline.so mv ${SRCPKGDESTDIR}/usr/share/readline ${DESTDIR}/usr/share mv ${SRCPKGDESTDIR}/usr/share/man/man3 ${DESTDIR}/usr/share/man + touch -f ${DESTDIR}/usr/share/info/dir for f in history rluserman; do mv ${SRCPKGDESTDIR}/usr/share/info/${f}.info \ ${DESTDIR}/usr/share/info diff --git a/templates/readline/template b/templates/readline/template index 332567fbf95..5719a6287be 100644 --- a/templates/readline/template +++ b/templates/readline/template @@ -1,8 +1,12 @@ # Template build file for 'readline'. pkgname=readline -version=6.0 -distfiles="http://savory.googlecode.com/files/${pkgname}-${version}.tar.gz" +_dist_ver=6.0 +_patch_ver=004 +version=${_dist_ver}.${_patch_ver} +wrksrc=${pkgname}-${_dist_ver} +distfiles="http://savory.googlecode.com/files/${pkgname}-${_dist_ver}.tar.gz" build_style=gnu_configure +configure_args="--with-curses --enable-multibyte" make_build_args="SHLIB_LIBS=-lncurses" short_desc="The GNU Readline Library" maintainer="Juan RP " @@ -21,9 +25,26 @@ Add_dependency full glibc Add_dependency build ncurses Add_dependency run ncurses-libs +pre_configure() +{ + if [ "${_patch_ver}" -gt 000 ]; then + for p in $(seq -w 001 ${_patch_ver}); do + [ -f ${XBPS_SRCDISTDIR}/readline60-${p} ] && continue + wget http://ftp.gnu.org/gnu/$pkgname/$pkgname-6.0-patches/readline60-$p + done + fi + cd ${wrksrc} + for p in $(seq -w 001 ${_patch_ver}); do + patch -s -Np0 -i ${XBPS_SRCDISTDIR}/readline60-${p} && \ + msg_normal "Applying patch readline60-$p." + done + sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf +} + post_install() { - # Move shared libs into /lib. + # Move shared libs to /. mkdir -p $DESTDIR/lib - mv $DESTDIR/usr/lib/lib*.so* $DESTDIR/lib + mv $DESTDIR/usr/lib/lib*.so.* $DESTDIR/lib + rm -f ${DESTDIR}/usr/lib/lib*.so }