Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 539826 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/dev-lang/lua/lua-5.2.3-r1.ebuild (-6 / +23 lines)
Lines 13-22 Link Here
13
LICENSE="MIT"
13
LICENSE="MIT"
14
SLOT="5.2"
14
SLOT="5.2"
15
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
15
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
16
IUSE="+deprecated emacs readline static"
16
IUSE="+deprecated emacs readline static crosshosted"
17
17
18
RDEPEND="readline? ( sys-libs/readline )
18
RDEPEND="readline? ( sys-libs/readline )
19
	app-admin/eselect-lua
19
	!crosshosted? ( app-admin/eselect-lua )
20
	!dev-lang/lua:0"
20
	!dev-lang/lua:0"
21
DEPEND="${RDEPEND}
21
DEPEND="${RDEPEND}
22
	sys-devel/libtool"
22
	sys-devel/libtool"
Lines 29-35 Link Here
29
src_prepare() {
29
src_prepare() {
30
	local PATCH_PV=$(get_version_component_range 1-2)
30
	local PATCH_PV=$(get_version_component_range 1-2)
31
31
32
	epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
32
	epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r666.patch
33
33
34
	[ -d "${FILESDIR}/${PV}" ] && \
34
	[ -d "${FILESDIR}/${PV}" ] && \
35
		EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
35
		EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
Lines 54-60 Link Here
54
	fi
54
	fi
55
55
56
	# upstream does not use libtool, but we do (see bug #336167)
56
	# upstream does not use libtool, but we do (see bug #336167)
57
	cp "${FILESDIR}/configure.in" "${S}"/ || die
57
	cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
58
	case "${CHOST}" in
59
		*-mingw*) echo 'LT_INIT([win32-dll])' >>"${S}/configure.ac" ;;
60
	esac
58
	eautoreconf
61
	eautoreconf
59
62
60
	# custom Makefiles
63
	# custom Makefiles
Lines 87-94 Link Here
87
	local myCFLAGS=""
90
	local myCFLAGS=""
88
	use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
91
	use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
89
92
93
	local exe_suffix=''
94
90
	case "${CHOST}" in
95
	case "${CHOST}" in
91
		*-mingw*) : ;;
96
		*-mingw*)
97
			exe_suffix='.exe'
98
			liblibs="${liblibs} -no-undefined"
99
			;;
92
		*) myCFLAGS+=" -DLUA_USE_LINUX" ;;
100
		*) myCFLAGS+=" -DLUA_USE_LINUX" ;;
93
	esac
101
	esac
94
102
Lines 98-112 Link Here
98
			LUA_LIBS="${mylibs}" \
106
			LUA_LIBS="${mylibs}" \
99
			LIB_LIBS="${liblibs}" \
107
			LIB_LIBS="${liblibs}" \
100
			V=$(get_version_component_range 1-2) \
108
			V=$(get_version_component_range 1-2) \
109
			EXE_SUFFIX="${exe_suffix}" \
101
			gentoo_all
110
			gentoo_all
102
}
111
}
103
112
104
multilib_src_install() {
113
multilib_src_install() {
114
	local exe_suffix=''
115
	case "${CHOST}" in
116
		*-mingw*) exe_suffix='.exe' ;;
117
		*) : ;;
118
	esac
119
105
	emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
120
	emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
121
			EXE_SUFFIX="${exe_suffix}" \
106
			V=${SLOT} gentoo_install
122
			V=${SLOT} gentoo_install
107
123
108
	# We want packages to find our things...
124
	# We want packages to find our things...
109
	cp "${FILESDIR}/lua.pc" "${WORKDIR}"
125
	local PATCH_PV=$(get_version_component_range 1-2)
126
	cp "${FILESDIR}/luav.pc" "${WORKDIR}/lua.pc"
110
	sed -i \
127
	sed -i \
111
		-e "s:^V=.*:V= ${PATCH_PV}:" \
128
		-e "s:^V=.*:V= ${PATCH_PV}:" \
112
		-e "s:^R=.*:R= ${PV}:" \
129
		-e "s:^R=.*:R= ${PV}:" \

Return to bug 539826