Diff luajit-2.0.3 with a luajit-2.0.3-r1

/usr/portage/dev-lang/luajit/luajit-2.0.3-r1.ebuild 2017-02-28 22:50:00.000000000 +0300
1
# Copyright 1999-2014 Gentoo Foundation
1
# Copyright 1999-2015 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=5
......
7 7

  
8 8
MY_PV="$(get_version_component_range 1-3)"
9 9
MY_P="LuaJIT-${MY_PV}"
10
if [[ $(get_version_component_range 4) != "" ]]; then
10
if [[ -n $(get_version_component_range 4) ]]; then
11 11
	HOTFIX="v${PV}"
12 12
	HOTFIX="${HOTFIX/_p/_hotfix}.patch"
13 13
fi
......
20 20
LICENSE="MIT"
21 21
# this should probably be pkgmoved to 2.0 for sake of consistency.
22 22
SLOT="2"
23
KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
23
KEYWORDS="amd64 arm ~ppc x86 ~amd64-linux ~x86-linux"
24 24
IUSE="lua52compat"
25 25

  
26 26
S="${WORKDIR}/${MY_P}"
......
29 29
	if [[ -n ${HOTFIX} ]]; then
30 30
		epatch "${DISTDIR}/${HOTFIX}"
31 31
	fi
32
	sed -i "s,PREFIX= /usr/local,PREFIX= ${EPREFIX}/usr," Makefile || die 'sed failed.'
33
	sed -i "s,/lib,/$(get_libdir)," etc/${PN}.pc || die 'sed2 failed.'
34 32
}
35 33

  
36
src_compile() {
34
_emake() {
37 35
	emake \
38 36
		Q= \
39 37
		PREFIX="${EPREFIX}/usr" \
38
		MULTILIB="$(get_libdir)" \
40 39
		DESTDIR="${D}" \
41 40
		HOST_CC="$(tc-getBUILD_CC)" \
42 41
		STATIC_CC="$(tc-getCC)" \
......
45 44
		TARGET_AR="$(tc-getAR) rcus" \
46 45
		TARGET_STRIP="true" \
47 46
		INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
48
		XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
47
		"$@"
48
}
49

  
50
src_compile() {
51
	_emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
49 52
}
50 53

  
51 54
src_install(){
52
	emake install \
53
		DESTDIR="${D}" \
54
		HOST_CC="$(tc-getBUILD_CC)" \
55
		STATIC_CC="$(tc-getCC)" \
56
		DYNAMIC_CC="$(tc-getCC) -fPIC" \
57
		TARGET_LD="$(tc-getCC)" \
58
		TARGET_AR="$(tc-getAR) rcus" \
59
		TARGET_STRIP="true" \
60
		INSTALL_LIB="${ED%/}/usr/$(get_libdir)"
55
	_emake install
61 56

  
62 57
	pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
63 58

  
Thank you!