mpv doesn't build with GCC<4.5 due to missing compiler flags.
TLS is now used in generic GL code, so require it when GL is enabled.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3718
)
mpv_check_compiler() {
- if [[ ${MERGE_TYPE} != "binary" ]] && use vaapi && use egl && ! tc-has-tls; then
- die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc && ( [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 5 ]] ) ); then
+ die "${PN} requires GCC>=4.5."
+ fi
+ if ( use opengl || use egl ) && ! tc-has-tls; then
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3."
+ fi
fi
}