Diff lua-5.2.4-r1 with a lua-5.3.3

/usr/portage/dev-lang/lua/lua-5.3.3.ebuild 2019-10-11 18:40:00.000000000 +0300
7 7

  
8 8
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
9 9
HOMEPAGE="http://www.lua.org/"
10
TEST_PV="5.2.2" # no 5.2.3-specific release yet
11
TEST_A="${PN}-${TEST_PV}-tests.tar.gz"
12
PKG_A="${P}.tar.gz"
13
SRC_URI="
14
	http://www.lua.org/ftp/${PKG_A}
15
	test? ( https://www.lua.org/tests/${TEST_A} )"
10
SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
16 11

  
17 12
LICENSE="MIT"
18
SLOT="5.2"
13
SLOT="5.3"
19 14
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
20
IUSE="+deprecated emacs readline static test test-complete"
21
RESTRICT="!test? ( test )"
15
IUSE="+deprecated emacs readline static"
22 16

  
23 17
RDEPEND="readline? ( sys-libs/readline:0= )
24 18
	app-eselect/eselect-lua
......
116 110
	emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
117 111
			V=${SLOT} gentoo_install
118 112

  
119
	case $SLOT in
120
		0)
121
			LIBNAME="lua"
122
			INCLUDEDIR_SUFFIX=''
123
			;;
124
		*)	LIBNAME="lua${SLOT}"
125
			INCLUDEDIR_SUFFIX="/lua${SLOT}"
126
			;;
127
	esac
128

  
129 113
	# We want packages to find our things...
130
	# A slotted Lua uses different directories for headers & names for
131
	# libraries, and pkgconfig should reflect that.
132
	local PATCH_PV=$(get_version_component_range 1-2)
133
	cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
134
	sed -r -i \
114
	cp "${FILESDIR}/lua.pc" "${WORKDIR}"
115
	sed -i \
135 116
		-e "s:^prefix= :prefix= ${EPREFIX}:" \
136 117
		-e "s:^V=.*:V= ${PATCH_PV}:" \
137 118
		-e "s:^R=.*:R= ${PV}:" \
138 119
		-e "s:/,lib,:/$(get_libdir):g" \
139
		-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
140
		-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
141
		"${WORKDIR}/lua.pc" || die
120
		"${WORKDIR}/lua.pc"
142 121

  
143 122
	insinto "/usr/$(get_libdir)/pkgconfig"
144 123
	newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
145
	# Copy Debian's symlink support:
146
	# https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
147
	# FreeBSD calls the pkgconfig 'lua-5.3.pc'
148
	# Older systems called it 'lua53.pc'
149
	dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
150
	dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
151 124
}
152 125

  
153 126
multilib_src_install_all() {
......
160 133

  
161 134
# Makefile contains a dummy target that doesn't do tests
162 135
# but causes issues with slotted lua (bug #510360)
163
src_test() {
164
	debug-print-function ${FUNCNAME} "$@"
165
	cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
166
	# https://www.lua.org/tests/
167
	# There are two sets:
168
	# basic
169
	# complete.
170
	#
171
	# The basic subset is selected by passing -e'_U=true'
172
	# The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
173
	# attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
174
	use test-complete || TEST_OPTS="-e_U=true"
175
	TEST_MARKER="${T}/test.failed"
176
	rm -f "${TEST_MARKER}"
177

  
178
	# If we are failing, set the marker file, and only check it after done all ABIs
179
	abi_src_test() {
180
		debug-print-function ${FUNCNAME} "$@"
181
		TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
182
		eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
183
		grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
184
		return 0
185
	}
186

  
187
	multilib_foreach_abi abi_src_test
188

  
189
	if [ -e "${TEST_MARKER}" ]; then
190
		cat "${TEST_MARKER}"
191
		die "Tests failed"
192
	fi
193
}
136
src_test() { :; }
Thank you!