summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2013-10-21 01:08:41 +0000
committerRafael Martins <rafaelmartins@gentoo.org>2013-10-21 01:08:41 +0000
commit652ff8aee7210896f7a8cd1b1a8819e276442b8d (patch)
tree9271c4d094310a480fdc7a0fdd4de5e44829ec2e /dev-lang/luajit/luajit-2.0.2.ebuild
parentI have no clue why, but this is how it wants to be installed (diff)
downloadgentoo-2-652ff8aee7210896f7a8cd1b1a8819e276442b8d.tar.gz
gentoo-2-652ff8aee7210896f7a8cd1b1a8819e276442b8d.tar.bz2
gentoo-2-652ff8aee7210896f7a8cd1b1a8819e276442b8d.zip
Version bump.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'dev-lang/luajit/luajit-2.0.2.ebuild')
-rw-r--r--dev-lang/luajit/luajit-2.0.2.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/dev-lang/luajit/luajit-2.0.2.ebuild b/dev-lang/luajit/luajit-2.0.2.ebuild
new file mode 100644
index 000000000000..7cdc7bbee419
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/luajit/luajit-2.0.2.ebuild,v 1.1 2013/10/21 01:08:41 rafaelmartins Exp $
+
+EAPI=5
+
+inherit eutils multilib pax-utils versionator toolchain-funcs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ $(get_version_component_range 4) != "" ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+ sed -i "s,PREFIX= /usr/local,PREFIX= ${EPREFIX}/usr," Makefile || die 'sed failed.'
+ sed -i "s,/lib,/$(get_libdir)," etc/${PN}.pc || die 'sed2 failed.'
+}
+
+src_compile() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install(){
+ emake install \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)"
+
+ pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+ cd "${S}"/doc
+ dohtml -r *
+}