# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.0.1_beta20031003-r2.ebuild,v 1.7 2005/02/06 01:01:06 j4rg0n Exp $ inherit eutils DESCRIPTION="A powerful light-weight programming language designed for extending applications" HOMEPAGE="http://www.lua.org/" SRC_URI="http://www.lua.org/ftp/lua-5.0.1.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha -hppa ~mips ppc ~sparc ~x86 ~amd64" IUSE="readline" DEPEND=">=sys-apps/sed-4 sys-apps/findutils" S=${WORKDIR}/lua-5.0.1 src_unpack() { unpack ${A} #FIXME: hppa arch needs to update the patch -- I can't test (twp) #patch works on amd64 - aliz 2004-02-06 epatch ${FILESDIR}/lua-5.0.1-pic.patch cd ${S} sed -i config \ -e 's:^#\(LOADLIB= -DUSE_DLOPEN=1\):\1:' \ -e 's:^#\(DLLIB= -ldl\):\1:' \ -e 's:^#\(MYLDFLAGS= -Wl,-E\):\1:' \ -e 's:^#\(POPEN= -DUSE_POPEN=1\)$:\1:' \ -e "s:^\(MYCFLAGS= \)-O2:\1${CFLAGS}:" \ -e 's:^\(INSTALL_ROOT= \)/usr/local:\1$(DESTDIR)/usr:' \ -e 's:^\(INSTALL_MAN= $(INSTALL_ROOT)\)/man/man1:\1/share/man/man1:' sed -i doc/readme.html \ -e 's:\(/README\)\("\):\1.gz\2:g' if use readline ; then sed -i config \ -e "s:^#\(USERCONF=-DLUA_USERCONFIG='\"\$(LUA)/etc/saconfig.c\"' -DUSE_READLINE\):\1:" \ -e 's:^#\(EXTRA_LIBS= -lm -ldl -lreadline\) # \(-lhistory -lcurses -lncurses\):\1 \2:' fi cat >etc/lua.pc <