--- lua-5.1.2-r2.ebuild 2008-01-30 09:11:13.000000000 +0000 +++ lua-5.1.3.ebuild 2008-02-12 17:13:13.000000000 +0000 @@ -11,27 +11,33 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="readline static" +IUSE="deprecated readline static" DEPEND="readline? ( sys-libs/readline )" src_unpack() { - local PATCH_PV=$(get_version_component_range 1-2) + local PATCH_PV=$(get_version_component_range 1-3) unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch - # correct lua versioning (bug #173611) - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:2:1/' src/Makefile + # The number of known bugs tend to increase over time. + for i in {1..2}; do + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-bug_upstream-${i}.patch + done - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + if ! use deprecated ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-deprecated.patch + fi if ! use readline ; then epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch fi + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + # Using dynamic linked lua is not recommended upstream for performance # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 # Mainly, this is of concern if your arch is poor with GPRs, like x86