From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 25 May 2023 00:36:24 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q1x5l-00CoWt-RZ for lore@lore.pengutronix.de; Thu, 25 May 2023 00:36:24 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q1x5j-0007mY-KC; Thu, 25 May 2023 00:36:23 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1x3o-0006ZO-8O; Thu, 25 May 2023 00:34:24 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q1x3n-002aXy-KC; Thu, 25 May 2023 00:34:23 +0200 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1q1x3m-004teH-6k; Thu, 25 May 2023 00:34:22 +0200 From: Roland Hieber To: ptxdist@pengutronix.de Date: Thu, 25 May 2023 00:34:11 +0200 Message-Id: <20230524223413.1079888-5-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524223413.1079888-1-rhi@pengutronix.de> References: <20230524223413.1079888-1-rhi@pengutronix.de> MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH v2 5/7] htmldoc: new package: HTML-to-PDF/PostScript/EPUB converter X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Roland Hieber --- PATCH v2: - fix configure options for host and target package (disable debug, sanitizier, maintainer) - depend on zlib, which is implicity found by autoconf PATCH v1: https://lore.ptxdist.org/ptxdist/20230515072054.1997217-5-rhi@pengutronix.de --- ...-build-install-docs-or-desktop-files.patch | 28 ++++++++ patches/htmldoc-1.9.16/series | 4 ++ rules/host-htmldoc.in | 7 ++ rules/host-htmldoc.make | 33 +++++++++ rules/htmldoc.in | 11 +++ rules/htmldoc.make | 69 +++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 patches/htmldoc-1.9.16/0001-Makefile-don-t-build-install-docs-or-desktop-files.patch create mode 100644 patches/htmldoc-1.9.16/series create mode 100644 rules/host-htmldoc.in create mode 100644 rules/host-htmldoc.make create mode 100644 rules/htmldoc.in create mode 100644 rules/htmldoc.make diff --git a/patches/htmldoc-1.9.16/0001-Makefile-don-t-build-install-docs-or-desktop-files.patch b/patches/htmldoc-1.9.16/0001-Makefile-don-t-build-install-docs-or-desktop-files.patch new file mode 100644 index 000000000000..940a09ceeb1a --- /dev/null +++ b/patches/htmldoc-1.9.16/0001-Makefile-don-t-build-install-docs-or-desktop-files.patch @@ -0,0 +1,28 @@ +From: Roland Hieber +Date: Sun, 14 May 2023 23:57:58 +0200 +Subject: [PATCH] Makefile: don't build/install docs or desktop files + +htmldoc is configured without GUI, so no desktop data is needed. +Furthermore it will try to call the built binary to build the docs, +which will not work in cross builds. + +Forwarded: not-needed +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index d846bf7621e5..31211a244b62 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -19,8 +19,8 @@ include Makedefs + # Subdirectories... + # + +-DIRS = htmldoc doc +-INSTALLDIRS = fonts data desktop doc htmldoc ++DIRS = htmldoc ++INSTALLDIRS = fonts data htmldoc + + + # diff --git a/patches/htmldoc-1.9.16/series b/patches/htmldoc-1.9.16/series new file mode 100644 index 000000000000..e9d04563df1d --- /dev/null +++ b/patches/htmldoc-1.9.16/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Makefile-don-t-build-install-docs-or-desktop-files.patch +# fdcadd964bbc6253264d4d6326477667 - git-ptx-patches magic diff --git a/rules/host-htmldoc.in b/rules/host-htmldoc.in new file mode 100644 index 000000000000..fb97aaef2a40 --- /dev/null +++ b/rules/host-htmldoc.in @@ -0,0 +1,7 @@ +## SECTION=hosttools_noprompt + +config HOST_HTMLDOC + tristate + default y if ALLYES + select HOST_ZLIB + select HOST_LIBJPEG diff --git a/rules/host-htmldoc.make b/rules/host-htmldoc.make new file mode 100644 index 000000000000..46488b956765 --- /dev/null +++ b/rules/host-htmldoc.make @@ -0,0 +1,33 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Roland Hieber +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +HOST_PACKAGES-$(PTXCONF_HOST_HTMLDOC) += host-htmldoc + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +HOST_HTMLDOC_CONF_TOOL := autoconf +HOST_HTMLDOC_CONF_OPT := \ + $(HOST_AUTOCONF) \ + --disable-debug \ + $(GLOBAL_LARGE_FILE_OPTION) \ + --disable-ssl \ + --disable-gnutls \ + --disable-cdsassl \ + --disable-maintainer \ + --disable-sanitizer \ + --without-gui + +# vim: syntax=make diff --git a/rules/htmldoc.in b/rules/htmldoc.in new file mode 100644 index 000000000000..3ed1869b638f --- /dev/null +++ b/rules/htmldoc.in @@ -0,0 +1,11 @@ +## SECTION=shell_and_console + +config HTMLDOC + tristate + select LIBJPEG + select ZLIB + prompt "htmldoc" + help + HTMLDOC is a program that reads HTML and Markdown source files + and generates corresponding EPUB, HTML, PostScript, or PDF + files with an optional table of contents. diff --git a/rules/htmldoc.make b/rules/htmldoc.make new file mode 100644 index 000000000000..d9485c792883 --- /dev/null +++ b/rules/htmldoc.make @@ -0,0 +1,69 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Roland Hieber +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_HTMLDOC) += htmldoc + +# +# Paths and names +# +HTMLDOC_VERSION := 1.9.16 +HTMLDOC_MD5 := 9d82dd05321ca44594d9d1841868b2d5 +HTMLDOC := htmldoc-$(HTMLDOC_VERSION) +HTMLDOC_SUFFIX := tar.gz +HTMLDOC_URL := https://github.com/michaelrsweet/htmldoc/releases/download/v$(HTMLDOC_VERSION)/$(HTMLDOC)-source.$(HTMLDOC_SUFFIX) +HTMLDOC_SOURCE := $(SRCDIR)/$(HTMLDOC).$(HTMLDOC_SUFFIX) +HTMLDOC_DIR := $(BUILDDIR)/$(HTMLDOC) +HTMLDOC_LICENSE := GPL-2.0-only +HTMLDOC_LICENSE_FILES := \ + file://README.md;startline=123;endline=124;md5=a2aaa1a54649f92a3f27ab9953505863 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +HTMLDOC_CONF_TOOL := autoconf +HTMLDOC_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --disable-debug \ + $(GLOBAL_LARGE_FILE_OPTION) \ + --disable-ssl \ + --disable-gnutls \ + --disable-cdsassl \ + --disable-maintainer \ + --disable-sanitizer \ + --without-gui + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/htmldoc.targetinstall: + @$(call targetinfo) + + @$(call install_init, htmldoc) + @$(call install_fixup, htmldoc,PRIORITY,optional) + @$(call install_fixup, htmldoc,SECTION,base) + @$(call install_fixup, htmldoc,AUTHOR,"Roland Hieber ") + @$(call install_fixup, htmldoc,DESCRIPTION,missing) + + @$(call install_copy, htmldoc, 0, 0, 0755, -, /usr/bin/htmldoc) + @$(call install_tree, htmldoc, 0, 0, -, /usr/share/htmldoc/fonts) + @$(call install_tree, htmldoc, 0, 0, -, /usr/share/htmldoc/data) + + @$(call install_finish, htmldoc) + + @$(call touch) + +# vim: syntax=make -- 2.39.2