From: tangxiaofeng <tangxiaofeng@kylinos.cn>
Date: Mon, 14 Sep 2026 15:07:21 +0000
Subject: Bound graphviz PDF size for LaTeX manual build

Description: Constrain the graphviz dot rendering of documentation
 schematic images to a maximum size of 12 inches while preserving
 aspect ratio (ratio=compress). Large schematics such as
 rdata_map_cells otherwise produce PDFs whose page dimensions exceed
 TeX's maximum dimension, causing a "Dimension too large" error and
 failing the latexpdf manual build.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: vendor
Forwarded: not-needed

--- yosys-0.52.orig/docs/source/_images/Makefile
+++ yosys-0.52/docs/source/_images/Makefile
@@ -33,7 +33,7 @@ TEX_FILES := $(shell find . -name *.tex)
 all_tex: $(TEX_FILES:.tex=.pdf) $(TEX_FILES:.tex=.svg)
 
 %.pdf: %.dot
-	$(FAKETIME) dot -Tpdf -o $@ $<
+	$(FAKETIME) dot -Gsize=12 -Gratio=compress -Tpdf -o $@ $<
 
 %.pdf: %.tex
 	cd $(@D) && $(FAKETIME) pdflatex $(<F) --interaction=nonstopmode

