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

Collapse All | Expand All

(-)a/eclass/meson.eclass (-20 / +11 lines)
Lines 149-159 _meson_create_cross_file() { Link Here
149
149
150
	cat > "${T}/meson.${CHOST}" <<-EOF
150
	cat > "${T}/meson.${CHOST}" <<-EOF
151
	[binaries]
151
	[binaries]
152
	ar = '${AR}'
152
	ar = '$(tc-getAR)'
153
	c = '${CC}'
153
	c = '$(tc-getCC)'
154
	cpp = '${CXX}'
154
	cpp = '$(tc-getCXX)'
155
	pkgconfig = '${PKG_CONFIG}'
155
	pkgconfig = '$(tc-getPKG_CONFIG)'
156
	strip = '${STRIP}'
156
	strip = '$(tc-getSTRIP)'
157
157
158
	[properties]
158
	[properties]
159
	c_args = $(_meson_env_array "$CFLAGS")
159
	c_args = $(_meson_env_array "$CFLAGS")
Lines 201-224 meson_src_configure() { Link Here
201
		--wrap-mode nodownload
201
		--wrap-mode nodownload
202
		)
202
		)
203
203
204
	# Both meson(1) and _meson_create_cross_file need these
205
	local -x AR=$(tc-getAR)
206
	local -x CC=$(tc-getCC)
207
	local -x CXX=$(tc-getCXX)
208
	local -x PKG_CONFIG=$(tc-getPKG_CONFIG)
209
	local -x STRIP=$(tc-getSTRIP)
210
211
	if tc-is-cross-compiler; then
204
	if tc-is-cross-compiler; then
212
		_meson_create_cross_file || die "unable to write meson cross file"
205
		_meson_create_cross_file || die "unable to write meson cross file"
213
		mesonargs+=(
206
		mesonargs+=(
214
			--cross-file "${T}/meson.${CHOST}"
207
			--cross-file "${T}/meson.${CHOST}"
215
		)
208
		)
216
		# In cross mode, meson uses these as the native/build programs
217
		AR=$(tc-getBUILD_AR)
218
		CC=$(tc-getBUILD_CC)
219
		CXX=$(tc-getBUILD_CXX)
220
		PKG_CONFIG=$(tc-getBUILD_PKG_CONFIG)
221
		STRIP=$(tc-getBUILD_STRIP)
222
	fi
209
	fi
223
210
224
	# https://bugs.gentoo.org/625396
211
	# https://bugs.gentoo.org/625396
Lines 231-237 meson_src_configure() { Link Here
231
	set -- meson "${mesonargs[@]}" "$@" \
218
	set -- meson "${mesonargs[@]}" "$@" \
232
		"${EMESON_SOURCE:-${S}}" "${BUILD_DIR}"
219
		"${EMESON_SOURCE:-${S}}" "${BUILD_DIR}"
233
	echo "$@"
220
	echo "$@"
234
	"$@" || die
221
222
	if tc-is-cross-compiler; then
223
		tc-env_build "$@" || die
224
	else
225
		"$@" || die
226
	fi
235
}
227
}
236
228
237
# @FUNCTION: meson_src_compile
229
# @FUNCTION: meson_src_compile
238
- 

Return to bug 653902