diff --git a/templates/bash.tmpl b/templates/bash.tmpl index 69c828afea4..2c952f3530b 100644 --- a/templates/bash.tmpl +++ b/templates/bash.tmpl @@ -1,13 +1,13 @@ # Template build file for 'bash'. pkgname=bash -version=3.2 -distfiles="http://ftp.gnu.org/pub/gnu/bash/$pkgname-$version.tar.gz" +# This matches current version + latest patchlevel +bash_distver=3.2 +version=$bash_distver.039 +wrksrc=$pkgname-$bash_distver +distfiles="http://ftp.gnu.org/pub/gnu/bash/$pkgname-$bash_distver.tar.gz" +LD_LIBRARY_PATH="$XBPS_MASTERDIR/usr/lib" build_style=gnu_configure -configure_args="--enable-readline --enable-progcomp - --enable-process-substitution --enable-job-control --enable-history - --enable-help-builtin --enable-extended-glob --enable-dparen-arithmetic - --enable-directory-stack --enable-debugger --enable-cond-regexp - --enable-alias --enable-brace-expansion --enable-array-variables +configure_args="--without-bash-malloc --with-curses --bindir=$XBPS_DESTDIR/$pkgname-$version/bin" short_desc="The GNU Bourne Again Shell" maintainer="Juan RP " @@ -28,6 +28,22 @@ base_chroot=yes build_depends="bison-2.3 ncurses-5.6" run_depends="glibc-2.8 ncurses-5.3" +pre_configure() +{ + # Apply all patches for current (3.2) version. + local lpatch="039" + local URL="http://ftp.gnu.org/gnu/bash/bash-$version-patches" + + for p in $(seq -w 001 $lpatch); do + if [ ! -f "$XBPS_SRCDISTDIR/bash32-$p" ]; then + msg_normal "Fetching $pkgname-$version patch: bash32-$p." + cd $XBPS_SRCDISTDIR && $fetch_cmd $URL/bash32-$p || bye 1 + fi + msg_normal "Applying patch: bash32-$p." + cd $wrksrc && patch -s -p0 < $XBPS_SRCDISTDIR/bash32-$p || bye 1 + done +} + post_install() { # Make /bin/bash -> /bin/sh symlink.