share/mk/: Generate the fonts during the build
Alejandro Colomar
maintainerPATCH 1/2 share/mk/: Generate the fonts during the build
Suggested-by "G. Branden Robinson" <[email protected]>
Signed-off-by Alejandro Colomar <[email protected]>
---
Hi Branden, Deri,
I've removed the Tinos font from the repository. I get a few more warnings now (especially after the second patch), but the PDF looks the same visually, I think. Would you mind reviewing the patches? I removed the contents of Tinos.pfa from this patch, to avoid 7858 lines of deleted .pfa.
I would also like to remove the TINOR thing, but I don't know how. If you can send a patch for it, it would be great. If you want to have a look in git, check out this branch:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/log/?h=fonts>
Have a lovely day!
Alex
scripts/LinuxManBook/devpdf/Tinos.pfa | 7858 -----------------
scripts/LinuxManBook/devpdf/download | 1 -
.../devpdf => share/mk/build/fonts}/TINOR | 0
share/mk/build/fonts/_.mk | 21 +
share/mk/build/fonts/tinos.mk | 36 +
share/mk/build/pdf/book.mk | 7 +-
.../configure/build-depends/groff/pfbtops.mk | 15 +
.../texlive-fonts-extra/Tinos.pfb.mk | 12 +
8 files changed, 88 insertions(+), 7862 deletions(-)
delete mode 100644 scripts/LinuxManBook/devpdf/Tinos.pfa
delete mode 100755 scripts/LinuxManBook/devpdf/download
rename {scripts/LinuxManBook/devpdf => share/mk/build/fonts}/TINOR (100%)
create mode 100644 share/mk/build/fonts/_.mk
create mode 100644 share/mk/build/fonts/tinos.mk
create mode 100644 share/mk/configure/build-depends/groff/pfbtops.mk
create mode 100644 share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mkscripts/LinuxManBook/devpdf/Tinos.pfa deleted +0 -0
@@ -1,7858 +0,0 @@
scripts/LinuxManBook/devpdf/download deleted +0 -1
@@ -1 +0,0 @@ - Tinos Tinos.pfa
share/mk/build/fonts/TINOR renamed from scripts/LinuxManBook/devpdf/TINOR +0 -0
share/mk/build/fonts/_.mk new file +21 -0
@@ -0,0 +1,21 @@ +# Copyright 2021-2024, Alejandro Colomar <[email protected]> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_FONTS_INCLUDED +MAKEFILE_BUILD_FONTS_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/_.mk +include $(MAKEFILEDIR)/configure/directory_variables/src.mk +include $(MAKEFILEDIR)/src/man.mk + + +_FONTSDIR := $(builddir)/fonts + + +.PHONY: build-fonts +build-fonts: build-fonts-tinos + + +endif # include guard
share/mk/build/fonts/tinos.mk new file +36 -0
@@ -0,0 +1,36 @@ +# Copyright 2021-2024, Alejandro Colomar <[email protected]> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_FONTS_TINOS_INCLUDED +MAKEFILE_BUILD_FONTS_TINOS_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/fonts/_.mk +include $(MAKEFILEDIR)/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk +include $(MAKEFILEDIR)/configure/build-depends/groff/pfbtops.mk + + +TINOR := $(MAKEFILEDIR)/build/fonts/TINOR + + +_TINOS_PFA := $(_FONTSDIR)/Tinos.pfa +_TINOR := $(_FONTSDIR)/TINOR + +_TINOS := $(_TINOS_PFA) $(_TINOR) + + +$(_TINOS_PFA): $(TINOS_PFB) $(MK) | $$(@D)/ + $(info $(INFO_)PFBTOPS $@) + $(PFBTOPS) <$< >$@ + +$(_TINOR): $(_FONTSDIR)/%: $(MAKEFILEDIR)/build/fonts/% $(MK) | $$(@D)/ + $(info $(INFO_)CP $@) + $(CP) -T $< $@ + + +.PHONY: build-fonts-tinos +build-fonts-tinos: $(_TINOS) + + +endif # include guard
share/mk/build/pdf/book.mk +4 -3
@@ -8,6 +8,7 @@ MAKEFILE_BUILD_PDF_BOOK_INCLUDED := 1 include $(MAKEFILEDIR)/build/_.mk include $(MAKEFILEDIR)/build/man/_.mk +include $(MAKEFILEDIR)/build/fonts/_.mk include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk include $(MAKEFILEDIR)/configure/build-depends/groff/gropdf.mk include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk
@@ -27,7 +28,7 @@ _PDFDIR := $(builddir) _PDF_BOOK := $(_PDFDIR)/$(PDF_BOOK) -$(_PDF_BOOK): $(_MANPAGES) $(wildcard $(LMBDIR)/* $(LMBDIR)/*/*) | $$(@D)/ +$(_PDF_BOOK): $(_MANPAGES) $(_TINOS) $(wildcard $(LMBDIR)/*) | $$(@D)/ $(info $(INFO_)GROPDF $@) ( \ $(CAT) "$(LMBDIR)"/LMBfront.roff; \
@@ -38,8 +39,8 @@ $(_PDF_BOOK): $(_MANPAGES) $(wildcard $(LMBDIR)/* $(LMBDIR)/*/*) | $$(@D)/ | $(PIC) \ | $(TBL) \ | $(EQN) -Tpdf \ - | $(TROFF) -Tpdf -F"$(LMBDIR)" -dpaper=a4 $(TROFFFLAGS) \ - | $(GROPDF) -F"$(LMBDIR)" -pa4 $(GROPDFFLAGS) \ + | $(TROFF) -Tpdf -F$(_FONTSDIR) -dpaper=a4 $(TROFFFLAGS) \ + | $(GROPDF) -F$(_FONTSDIR) -pa4 $(GROPDFFLAGS) \ | $(SPONGE) $@
share/mk/configure/build-depends/groff/pfbtops.mk new file +15 -0
@@ -0,0 +1,15 @@ +# Copyright 2024, Alejandro Colomar <[email protected]> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_PFBTOPS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_PFBTOPS_INCLUDED := 1 + + +DEFAULT_PFBTOPSFLAGS := +EXTRA_PFBTOPSFLAGS := +PFBTOPSFLAGS := $(DEFAULT_PFBTOPSFLAGS) $(EXTRA_PFBTOPSFLAGS) +PFBTOPS := pfbtops + + +endif # include guard
share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk new file +12 -0
@@ -0,0 +1,12 @@ +# Copyright 2024, Alejandro Colomar <[email protected]> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_TINOS_PFB_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_TINOS_PFB_INCLUDED := 1 + + +TINOS_PFB := /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb + + +endif # include guard
Signature · 1 line
2.43.0
Alejandro Colomar
maintainerPATCH 2/2 share/mk/: Reorganize files for generating the PDF book
Signed-off-by Alejandro Colomar <[email protected]>
---
share/mk/build/pdf/{book.mk => book/_.mk} | 11 ++++++-----
.../LinuxManBook => share/mk/build/pdf/book}/an.tmac | 0
.../mk/build/pdf/book/front.roff | 0
.../mk/build/pdf/book}/prepare.pl | 0
share/mk/install/pdf/{pdf.mk => book.mk} | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
rename share/mk/build/pdf/{book.mk => book/_.mk} (83%)
rename {scripts/LinuxManBook => share/mk/build/pdf/book}/an.tmac (100%)
rename scripts/LinuxManBook/LMBfront.roff => share/mk/build/pdf/book/front.roff (100%)
rename {scripts/LinuxManBook => share/mk/build/pdf/book}/prepare.pl (100%)
rename share/mk/install/pdf/{pdf.mk => book.mk} (94%)share/mk/build/pdf/book/_.mk renamed from share/mk/build/pdf/book.mk +6 -5
@@ -20,7 +20,8 @@ include $(MAKEFILEDIR)/configure/build-depends/moreutils/sponge.mk include $(MAKEFILEDIR)/configure/version.mk -LMBDIR := $(CURDIR)/scripts/LinuxManBook +MKBOOKDIR := $(MAKEFILEDIR)/build/pdf/book +MKBOOK := $(wildcard $(MKBOOKDIR)/*) PDF_BOOK := $(DISTNAME).pdf
@@ -28,12 +29,12 @@ _PDFDIR := $(builddir) _PDF_BOOK := $(_PDFDIR)/$(PDF_BOOK) -$(_PDF_BOOK): $(_MANPAGES) $(_TINOS) $(wildcard $(LMBDIR)/*) | $$(@D)/ +$(_PDF_BOOK): $(_MANPAGES) $(_TINOS) $(MKBOOK) $(MK) | $$(@D)/ $(info $(INFO_)GROPDF $@) ( \ - $(CAT) "$(LMBDIR)"/LMBfront.roff; \ - $(CAT) "$(LMBDIR)"/an.tmac; \ - "$(LMBDIR)"/prepare.pl "$(_MANDIR)"; \ + $(CAT) $(MKBOOKDIR)/front.roff; \ + $(CAT) $(MKBOOKDIR)/an.tmac; \ + $(MKBOOKDIR)/prepare.pl $(_MANDIR); \ ) \ | $(PRECONV) \ | $(PIC) \
share/mk/build/pdf/book/an.tmac renamed from scripts/LinuxManBook/an.tmac +0 -0
share/mk/build/pdf/book/front.roff renamed from scripts/LinuxManBook/LMBfront.roff +0 -0
share/mk/build/pdf/book/prepare.pl renamed from scripts/LinuxManBook/prepare.pl +0 -0
share/mk/install/pdf/book.mk renamed from share/mk/install/pdf/pdf.mk +1 -1
@@ -6,7 +6,7 @@ ifndef MAKEFILE_INSTALL_PDF_BOOK_INCLUDED MAKEFILE_INSTALL_PDF_BOOK_INCLUDED := 1 -include $(MAKEFILEDIR)/build/pdf/book.mk +include $(MAKEFILEDIR)/build/pdf/book/_.mk include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk include $(MAKEFILEDIR)/configure/directory_variables/install.mk
Signature · 1 line
2.43.0