From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 20 Jul 2021 13:49:34 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m5oFi-0002KV-Ew for lore@lore.pengutronix.de; Tue, 20 Jul 2021 13:49:34 +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 1m5oFh-0003xJ-Ep; Tue, 20 Jul 2021 13:49:33 +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 1m5oEm-00031h-EM; Tue, 20 Jul 2021 13:48:36 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m5oEl-0002Vo-Tf; Tue, 20 Jul 2021 13:48:35 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m5oEl-00AlSy-Sz; Tue, 20 Jul 2021 13:48:35 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Tue, 20 Jul 2021 13:48:35 +0200 Message-Id: <20210720114835.2565188-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708185255.3303-1-rhi@pengutronix.de> References: <20210708185255.3303-1-rhi@pengutronix.de> MIME-Version: 1.0 Subject: Re: [ptxdist] [APPLIED] ptxd_make_world_license: handle PDFs in _LICENSE_FILES 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Thanks, applied as 2179ae513a925bc4d22c791cacd7e3d8adf902ed. Michael [sent from post-receive hook] On Tue, 20 Jul 2021 13:48:35 +0200, Roland Hieber wrote: > If PDF files are found in the _LICENSE_FILES variable, include them as > literal pages in license-report.pdf with the 'pdfpages' package, which > nowadays comes preinstalled with most LaTeX distributions. > > Signed-off-by: Roland Hieber > Message-Id: <20210708185255.3303-1-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/scripts/lib/ptxd_make_license_report.sh b/scripts/lib/ptxd_make_license_report.sh > index c92dc725d1f7..bed5bd1d43c5 100644 > --- a/scripts/lib/ptxd_make_license_report.sh > +++ b/scripts/lib/ptxd_make_license_report.sh > @@ -18,6 +18,7 @@ ptxd_make_license_report_header() { > \usepackage{tikz} > \usepackage{adjustbox} > \usepackage{spverbatim} > + \usepackage{pdfpages} > \hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue} > > %% Something like this may be needed depending on the package list > @@ -209,6 +210,7 @@ ptxd_make_license_compliance_header() { > \usepackage{tikz} > \usepackage{adjustbox} > \usepackage{spverbatim} > + \usepackage{pdfpages} > \hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue} > > %% Something like this may be needed depending on the package list > diff --git a/scripts/lib/ptxd_make_world_license.sh b/scripts/lib/ptxd_make_world_license.sh > index f68b75339cb2..785254603765 100644 > --- a/scripts/lib/ptxd_make_world_license.sh > +++ b/scripts/lib/ptxd_make_world_license.sh > @@ -188,21 +188,32 @@ ptxd_make_world_license_write() { > continue > fi > title="$(basename "${license}")" > - cat <<- EOF > - \section{$(ptxd_make_latex_escape "${title}")${guess}} > - \begin{small} > - \begin{spverbatim} > - EOF > - if [ -f "${license}.utf-8" ]; then > - cat "${license}.utf-8" > - else > - cat "${license}" > - fi | sed -e 's/\f/\n/g' > - check_pipe_status || return > - cat <<- EOF > - \end{spverbatim} > - \end{small} > - EOF > + case "${license}" in > + *.pdf) > + cat <<- EOF > + \section{$(ptxd_make_latex_escape "${title}")${guess}} > + \includepdf[pages=-]{${license}} > + EOF > + ;; > + *) > + cat <<- EOF > + \section{$(ptxd_make_latex_escape "${title}")${guess}} > + \begin{small} > + \begin{spverbatim} > + EOF > + > + if [ -f "${license}.utf-8" ]; then > + cat "${license}.utf-8" > + else > + cat "${license}" > + fi | sed -e 's/\f/\n/g' > + check_pipe_status || return > + cat <<- EOF > + \end{spverbatim} > + \end{small} > + EOF > + ;; > + esac > done > } > export -f ptxd_make_world_license_write _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de