Skip to content

Commit 7e33d23

Browse files
committed
texlive: work around build failure on Intel Sonoma
1 parent c76a73e commit 7e33d23

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

Formula/t/texlive.rb

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,14 @@ def install
411411
"selfautoparent:texmf", "selfautodir:share/texmf"
412412

413413
# icu4c 75+ needs C++17
414+
# TODO: Remove in 2025 release
414415
ENV.append "CXXFLAGS", "-std=gnu++17"
415416

416-
args = std_configure_args + [
417+
# Work around build failure on Intel Sonoma after updating to Xcode 16
418+
# sh: line 1: 27478 Segmentation fault: 11 luajittex -ini -jobname=luajittex -progname=luajittex luatex.ini ...
419+
ENV.O1 if DevelopmentTools.clang_build_version == 1600 && Hardware::CPU.intel?
420+
421+
args = [
417422
"--disable-dvisvgm", # needs its own formula
418423
"--disable-missing",
419424
"--disable-native-texlive-build", # needed when doing a distro build
@@ -424,7 +429,6 @@ def install
424429
"--enable-build-in-source-tree",
425430
"--enable-shared",
426431
"--enable-compiler-warnings=yes",
427-
"--with-banner-add=/#{tap.user}",
428432
"--with-system-clisp-runtime=system",
429433
"--with-system-cairo",
430434
"--with-system-freetype2",
@@ -440,6 +444,7 @@ def install
440444
"--with-system-potrace",
441445
"--with-system-zlib",
442446
]
447+
args << "--with-banner-add=/#{tap.user}" if tap
443448

444449
args << if OS.mac?
445450
"--without-x"
@@ -448,7 +453,7 @@ def install
448453
"--with-xdvi-x-toolkit=xaw"
449454
end
450455

451-
system "./configure", *args
456+
system "./configure", *args, *std_configure_args
452457
system "make"
453458
system "make", "install"
454459
system "make", "texlinks"
@@ -466,9 +471,21 @@ def install
466471
# Create tlmgr config file. This file limits the actions that the user
467472
# can perform in 'system' mode, which would write to the cellar. 'tlmgr' should
468473
# be used with --usermode whenever possible.
469-
(share/"texmf-config/tlmgr/config").write <<~EOS
470-
allowed-actions=candidates,check,dump-tlpdb,help,info,list,print-platform,print-platform-info,search,show,version,init-usertree
471-
EOS
474+
actions = %w[
475+
candidates
476+
check
477+
dump-tlpdb
478+
help
479+
info
480+
init-usertree
481+
list
482+
print-platform
483+
print-platform-info
484+
search
485+
show
486+
version
487+
]
488+
(share/"texmf-config/tlmgr/config").write "allowed-actions=#{actions.join(",")}\n"
472489

473490
# Delete some Perl scripts that are provided by existing formulae as newer versions.
474491
rm bin/"latexindent" # provided by latexindent formula
@@ -561,7 +578,7 @@ def install
561578
assert_match "revision", shell_output("#{bin}/tlmgr --version")
562579
assert_match "AMS mathematical facilities for LaTeX", shell_output("#{bin}/tlmgr info amsmath")
563580

564-
(testpath/"test.latex").write <<~EOS
581+
(testpath/"test.latex").write <<~LATEX
565582
\\documentclass[12pt]{article}
566583
\\usepackage[utf8]{inputenc}
567584
\\usepackage{amsmath}
@@ -587,7 +604,7 @@ def install
587604
\\lipsum[5]
588605
589606
\\end{document}
590-
EOS
607+
LATEX
591608

592609
assert_match "Output written on test.dvi", shell_output("#{bin}/latex #{testpath}/test.latex")
593610
assert_predicate testpath/"test.dvi", :exist?

0 commit comments

Comments
 (0)