mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] ptxd_make_world_license: handle PDFs in _LICENSE_FILES
Date: Tue, 20 Jul 2021 13:48:35 +0200	[thread overview]
Message-ID: <20210720114835.2565188-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20210708185255.3303-1-rhi@pengutronix.de>

Thanks, applied as 2179ae513a925bc4d22c791cacd7e3d8adf902ed.

Michael

[sent from post-receive hook]

On Tue, 20 Jul 2021 13:48:35 +0200, Roland Hieber <rhi@pengutronix.de> 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 <rhi@pengutronix.de>
> Message-Id: <20210708185255.3303-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> 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


      parent reply	other threads:[~2021-07-20 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 18:52 [ptxdist] [PATCH v2 1/2] " Roland Hieber
2021-07-08 18:52 ` [ptxdist] [PATCH v2 2/2] python3-pycryptodomex: fix license identifier Roland Hieber
2021-07-20 11:48   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-20 11:48 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210720114835.2565188-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=rhi@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox