Diff lua-5.2.4 with a lua-5.2.4-r1

/usr/portage/dev-lang/lua/lua-5.2.4-r1.ebuild 2019-03-25 08:39:00.000000000 +0300
64 64
	fi
65 65

  
66 66
	# upstream does not use libtool, but we do (see bug #336167)
67
	cp "${FILESDIR}/configure.in" "${S}"/ || die
67
	cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
68 68
	eautoreconf
69 69

  
70
	# A slotted Lua uses different directories for headers & names for
71
	# libraries, and pkgconfig should reflect that.
72
	sed -r -i \
73
		-e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
74
		-e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
75
		"${S}"/etc/lua.pc
76

  
77 70
	# custom Makefiles
78 71
	multilib_copy_sources
79 72
}
......
122 115
	emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
123 116
			V=${SLOT} gentoo_install
124 117

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

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

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

  
138 152
multilib_src_install_all() {
Thank you!