Diff lua-5.3.5 with a lua-5.3.5-r1

/usr/portage/dev-lang/lua/lua-5.3.5-r1.ebuild 2019-12-11 02:41:00.000000000 +0300
68 68
	cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
69 69
	eautoreconf
70 70

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

  
78 71
	# custom Makefiles
79 72
	multilib_copy_sources
80 73
}
......
123 116
	emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
124 117
			V=${SLOT} gentoo_install
125 118

  
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

  
126 129
	# We want packages to find our things...
127
	cp "${FILESDIR}/lua.pc" "${WORKDIR}"
128
	sed -i \
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 \
129 135
		-e "s:^prefix= :prefix= ${EPREFIX}:" \
130 136
		-e "s:^V=.*:V= ${PATCH_PV}:" \
131 137
		-e "s:^R=.*:R= ${PV}:" \
132 138
		-e "s:/,lib,:/$(get_libdir):g" \
133
		"${WORKDIR}/lua.pc"
139
		-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
140
		-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
141
		"${WORKDIR}/lua.pc" || die
134 142

  
135 143
	insinto "/usr/$(get_libdir)/pkgconfig"
136 144
	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"
137 151
}
138 152

  
139 153
multilib_src_install_all() {
Thank you!