diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-23 00:55:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-02-23 00:55:28 +0000 |
commit | 0f1f3e60f484acbefccac75a3ddf22041e409b2b (patch) | |
tree | b8af06b6f486713400c6e000de01dff55bd72e19 | |
parent | old (diff) | |
download | historical-0f1f3e60f484acbefccac75a3ddf22041e409b2b.tar.gz historical-0f1f3e60f484acbefccac75a3ddf22041e409b2b.tar.bz2 historical-0f1f3e60f484acbefccac75a3ddf22041e409b2b.zip |
unify patch handling a bit
-rw-r--r-- | sys-libs/readline/readline-6.0.ebuild | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/sys-libs/readline/readline-6.0.ebuild b/sys-libs/readline/readline-6.0.ebuild index 24a7a780a141..1c6d8edd1c15 100644 --- a/sys-libs/readline/readline-6.0.ebuild +++ b/sys-libs/readline/readline-6.0.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-6.0.ebuild,v 1.1 2009/02/21 21:38:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-6.0.ebuild,v 1.2 2009/02/23 00:55:28 vapier Exp $ -inherit autotools eutils multilib toolchain-funcs flag-o-matic +inherit autoconf eutils multilib toolchain-funcs flag-o-matic # Official patches # See ftp://ftp.cwru.edu/pub/bash/readline-6.0-patches/ @@ -10,16 +10,24 @@ PLEVEL=${PV##*_p} MY_PV=${PV/_p*} MY_P=${PN}-${MY_PV} [[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + [[ ${PLEVEL} -eq 0 ]] && return 1 + local opt=$1 + eval set -- {1..${PLEVEL}} + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}\/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" + done + fi +} DESCRIPTION="Another cute console display library" HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" -SRC_URI="mirror://gnu/readline/${MY_P}.tar.gz - $(for ((i=1; i<=PLEVEL; i++)); do - printf 'ftp://ftp.cwru.edu/pub/bash/readline-%s-patches/readline%s-%03d\n' \ - ${MY_PV} ${MY_PV/\.} ${i} - printf 'mirror://gnu/bash/readline-%s-patches/readline%s-%03d\n' \ - ${MY_PV} ${MY_PV/\.} ${i} - done)" +SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" LICENSE="GPL-2" SLOT="0" @@ -38,11 +46,7 @@ src_unpack() { unpack ${MY_P}.tar.gz cd "${S}" - # Official patches - local i - for ((i=1; i<=PLEVEL; i++)); do - epatch "${DISTDIR}"/${PN}${MY_PV/\.}-$(printf '%03d' ${i}) - done + [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s) epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch epatch "${FILESDIR}"/${PN}-6.0-rlfe-build.patch #151174 epatch "${FILESDIR}"/${PN}-5.2-no-ignore-shlib-errors.patch #216952 |