public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-visualization/gnuplot/files/, sci-visualization/gnuplot/
Date: Sun, 19 Nov 2017 11:46:50 +0000 (UTC)	[thread overview]
Message-ID: <1511091975.87d20a9ab246fda845fad3456e412a8b32fc8895.ulm@gentoo> (raw)

commit:     87d20a9ab246fda845fad3456e412a8b32fc8895
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 11:18:34 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 11:46:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87d20a9a

sci-visualization/gnuplot: Fix building with USE="doc".

- Do not require picins.sty.
- Build documentation without figures if cairo is disabled.

Closes: https://bugs.gentoo.org/577828
Package-Manager: Portage-2.3.14, Repoman-2.3.6

 .../gnuplot/files/gnuplot-5.0.6-no-picins.patch    | 27 ++++++++++++++++++++++
 sci-visualization/gnuplot/gnuplot-5.0.6.ebuild     | 15 ++++++++----
 sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild  | 15 ++++++++----
 3 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/sci-visualization/gnuplot/files/gnuplot-5.0.6-no-picins.patch b/sci-visualization/gnuplot/files/gnuplot-5.0.6-no-picins.patch
new file mode 100644
index 00000000000..87408aebd44
--- /dev/null
+++ b/sci-visualization/gnuplot/files/gnuplot-5.0.6-no-picins.patch
@@ -0,0 +1,27 @@
+Do not require picins.sty.
+https://bugs.gentoo.org/577828#c4
+
+--- gnuplot-5.0.6-orig/docs/Makefile.am
++++ gnuplot-5.0.6/docs/Makefile.am
+@@ -189,7 +189,6 @@
+ 	  touch figures.idx ; \
+ 	  rm -f pdffigures.tex ; \
+ 	  ( echo "\usepackage{graphicx}" > pdffigures.tex ; \
+-	    echo "\usepackage{picins}" >> pdffigures.tex ; \
+ 	  ) ; \
+ 	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) $< ; \
+ 	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) $< ; \
+--- gnuplot-5.0.6-orig/docs/doc2tex.c
++++ gnuplot-5.0.6/docs/doc2tex.c
+@@ -170,9 +170,9 @@
+     case 'F':			/* embedded figure */
+ 	    if (figures) {
+ 		line[strlen(line)-1]=NUL;
+-		(void) fputs("\\parpic[r][rt]{\\includegraphics[width=3in,keepaspectratio]{",b);
++		(void) fputs("\\begin{figure}[htb]\n\\centering\\includegraphics[width=3in,keepaspectratio]{",b);
+ 		fputs(line+1, b);
+-		(void) fputs("}}\n",b);
++		(void) fputs("}\n\\end{figure}\n",b);
+ 	    }
+ 	    break;
+ 

diff --git a/sci-visualization/gnuplot/gnuplot-5.0.6.ebuild b/sci-visualization/gnuplot/gnuplot-5.0.6.ebuild
index cac060cf8d0..2a7de7b82e7 100644
--- a/sci-visualization/gnuplot/gnuplot-5.0.6.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.0.6.ebuild
@@ -66,10 +66,10 @@ GP_VERSION="${PV%.*}"
 E_SITEFILE="lisp/50${PN}-gentoo.el"
 TEXMF="${EPREFIX}/usr/share/texmf-site"
 
-PATCHES=( "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch )
-
 src_prepare() {
-	default
+	eapply "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch
+	eapply "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
+	eapply_user
 
 	if [[ -z ${PV%%*9999} ]]; then
 		local dir
@@ -162,7 +162,14 @@ src_compile() {
 	if use doc; then
 		# Avoid sandbox violation in epstopdf/ghostscript
 		addpredict /var/cache/fontconfig
-		emake -C docs gnuplot.pdf
+		if use cairo; then
+			emake -C docs pdf
+		else
+			ewarn "Cannot build figures unless cairo is enabled."
+			ewarn "Building documentation without figures."
+			emake -C docs pdf_nofig
+			mv docs/nofigures.pdf docs/gnuplot.pdf || die
+		fi
 		emake -C tutorial pdf
 	fi
 }

diff --git a/sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild b/sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild
index e06fd330630..ef281474464 100644
--- a/sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild
@@ -66,10 +66,10 @@ GP_VERSION="${PV%.*}"
 E_SITEFILE="lisp/50${PN}-gentoo.el"
 TEXMF="${EPREFIX}/usr/share/texmf-site"
 
-PATCHES=( "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch )
-
 src_prepare() {
-	default
+	eapply "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch
+	eapply "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
+	eapply_user
 
 	if [[ -z ${PV%%*9999} ]]; then
 		local dir
@@ -162,7 +162,14 @@ src_compile() {
 	if use doc; then
 		# Avoid sandbox violation in epstopdf/ghostscript
 		addpredict /var/cache/fontconfig
-		emake -C docs gnuplot.pdf
+		if use cairo; then
+			emake -C docs pdf
+		else
+			ewarn "Cannot build figures unless cairo is enabled."
+			ewarn "Building documentation without figures."
+			emake -C docs pdf_nofig
+			mv docs/nofigures.pdf docs/gnuplot.pdf || die
+		fi
 		emake -C tutorial pdf
 	fi
 }


             reply	other threads:[~2017-11-19 11:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 11:46 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-12  8:37 [gentoo-commits] repo/gentoo:master commit in: sci-visualization/gnuplot/files/, sci-visualization/gnuplot/ Ulrich Müller
2019-07-23  7:19 Ulrich Müller
2020-11-06 12:57 Ulrich Müller
2020-11-07  4:07 Ulrich Müller
2020-12-23 11:10 Ulrich Müller
2021-08-03  6:08 Ulrich Müller
2021-10-18  9:01 Ulrich Müller
2023-05-29 16:56 Ulrich Müller
2023-10-09 19:31 Ulrich Müller
2024-08-03  9:57 Ulrich Müller
2025-04-14  7:19 Ulrich Müller

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=1511091975.87d20a9ab246fda845fad3456e412a8b32fc8895.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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