diff --git a/app-editors/emacs/emacs-28.2-r15.ebuild b/app-editors/emacs/emacs-28.2-r15.ebuild index bbc032cf7b63c..2c7d3a1e56dda 100644 --- a/app-editors/emacs/emacs-28.2-r15.ebuild +++ b/app-editors/emacs/emacs-28.2-r15.ebuild @@ -142,12 +142,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -168,11 +162,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi default diff --git a/app-editors/emacs/emacs-29.4-r1.ebuild b/app-editors/emacs/emacs-29.4-r1.ebuild index 67e94a869c128..6fb6a878891ea 100644 --- a/app-editors/emacs/emacs-29.4-r1.ebuild +++ b/app-editors/emacs/emacs-29.4-r1.ebuild @@ -170,12 +170,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -197,11 +191,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.91.ebuild b/app-editors/emacs/emacs-30.0.91.ebuild index 1806d63929bfc..dd6905d7ea65e 100644 --- a/app-editors/emacs/emacs-30.0.91.ebuild +++ b/app-editors/emacs/emacs-30.0.91.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.92.ebuild b/app-editors/emacs/emacs-30.0.92.ebuild index 1806d63929bfc..dd6905d7ea65e 100644 --- a/app-editors/emacs/emacs-30.0.92.ebuild +++ b/app-editors/emacs/emacs-30.0.92.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.93.ebuild b/app-editors/emacs/emacs-30.0.93.ebuild index 1806d63929bfc..dd6905d7ea65e 100644 --- a/app-editors/emacs/emacs-30.0.93.ebuild +++ b/app-editors/emacs/emacs-30.0.93.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.9999-r1.ebuild b/app-editors/emacs/emacs-30.0.9999-r1.ebuild index 1806d63929bfc..dd6905d7ea65e 100644 --- a/app-editors/emacs/emacs-30.0.9999-r1.ebuild +++ b/app-editors/emacs/emacs-30.0.9999-r1.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-31.0.9999.ebuild b/app-editors/emacs/emacs-31.0.9999.ebuild index ebaeb7a948e3b..ec1f01bdf898a 100644 --- a/app-editors/emacs/emacs-31.0.9999.ebuild +++ b/app-editors/emacs/emacs-31.0.9999.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page