diff --git a/media-libs/mesa/mesa-8.0.2-r1.ebuild b/media-libs/mesa/mesa-8.0.2-r1.ebuild index 2ef7db7..0bf4143 100644 --- a/media-libs/mesa/mesa-8.0.2-r1.ebuild +++ b/media-libs/mesa/mesa-8.0.2-r1.ebuild @@ -169,6 +169,13 @@ src_prepare() { base_src_prepare eautoreconf + + # In order for mesa to complete it's build process we need to use a tool + # that it compiles. When we cross compile this clearly does not work + # so we require mesa to be built on the host system first. -solar + if tc-is-cross-compiler; then + sed -e 's/\.\/builtin_compiler/\.\/native_builtin_compiler/' -i src/glsl/Makefile + fi } src_configure() { @@ -255,6 +262,14 @@ src_configure() { --with-dri-drivers=${DRI_DRIVERS} \ --with-gallium-drivers=${GALLIUM_DRIVERS} \ ${myconf} + + if tc-is-cross-compiler; then + emake CC=$(tc-getBUILD_CC) \ + CXX=$(tc-getBUILD_CXX) \ + -C src/glsl builtin_compiler || die + mv src/glsl/{,native_}builtin_compiler + emake -C src/glsl clean + fi } src_install() {