pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/50363: new options "cairo" and "pdf-doc" for graphics/gnuplot



>Number:         50363
>Category:       pkg
>Synopsis:       new options "cairo" and "pdf-doc" for graphics/gnuplot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 23 10:45:00 +0000 2015
>Originator:     Rin Okuyama
>Release:        7.99.21/pkgsrc-MAIN 20151023
>Organization:
Department of Physics, Tohoku University
>Environment:
NetBSD cubietruck 7.99.21 NetBSD 7.99.21 (CT) #0: Sun Oct 18 13:36:15 JST 2015  root@XXX:XXX evbarm
>Description:
graphics/gnuplot is built with Cairo-based terminal support, which
requires Pango/Cairo libraries. Further, it depends on LaTeX related
packages only for generating a PDF document. These are heavy burdens
for tiny systems. I've added new options "cairo" and "pdf-doc" to
determine whether these features are to be enabled or not.

Note that I avoid standard "latex" option in favor of "pdf-doc"; the
former is confusing with LaTeX terminal support for gnuplot, which is
disabled in pkgsrc.
>How-To-Repeat:
N/A
>Fix:
--- graphics/gnuplot/Makefile.orig	2015-10-23 14:18:46.000000000 +0900
+++ graphics/gnuplot/Makefile	2015-10-23 14:43:56.000000000 +0900
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.101 2015/08/18 07:31:09 wiz Exp $
 
 DISTNAME=	gnuplot-5.0.1
+PKGREVISION=	1
 API_VERSION=	${PKGVERSION_NOREV:C/([0-9])\.([0-9])\.([0-9])/\1.\2/}
 CATEGORIES+=	graphics
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=gnuplot/}
@@ -27,10 +28,6 @@
 CONFIGURE_ARGS+=	ac_cv_prog_EMACS=
 INFO_FILES=		yes
 
-# to build doc/gnuplot.pdf
-BUILD_DEPENDS+=		tex-latex-bin-[0-9]*:../../print/tex-latex-bin
-BUILD_DEPENDS+=		tex-ucs-[0-9]*:../../print/tex-ucs
-
 CONFIGURE_ARGS+=	--with-readline=bsd
 .include "../../mk/readline.buildlink3.mk"
 .include "../../mk/curses.buildlink3.mk"
@@ -45,17 +42,8 @@
 SUBST_FILES.fontpath=	src/variable.c
 SUBST_SED.fontpath=	-e 's,@PKGSRC_PREFIX@,"${PREFIX}",'
 
-post-build:
-	(cd ${WRKSRC}/docs; ${GMAKE} gnuplot.pdf)
-
-post-install:
-	(cd ${WRKSRC}/docs; \
-	${INSTALL_DATA} gnuplot.pdf ${DESTDIR}${PREFIX}/share/gnuplot/${API_VERSION})
-
 .include "options.mk"
 
 .include "../../converters/libiconv/buildlink3.mk"
-.include "../../devel/pango/buildlink3.mk"
-.include "../../graphics/cairo/buildlink3.mk"
 .include "../../graphics/plotutils/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
--- graphics/gnuplot/PLIST.orig	2015-10-23 14:18:46.000000000 +0900
+++ graphics/gnuplot/PLIST	2015-10-23 18:34:52.000000000 +0900
@@ -24,7 +24,7 @@
 share/gnuplot/${API_VERSION}/colors_mono.gp
 share/gnuplot/${API_VERSION}/colors_podo.gp
 share/gnuplot/${API_VERSION}/gnuplot.gih
-share/gnuplot/${API_VERSION}/gnuplot.pdf
+${PLIST.pdf-doc}share/gnuplot/${API_VERSION}/gnuplot.pdf
 share/gnuplot/${API_VERSION}/gnuplotrc
 share/gnuplot/${API_VERSION}/js/README
 share/gnuplot/${API_VERSION}/js/canvasmath.js
--- graphics/gnuplot/options.mk.orig	2015-10-23 14:18:46.000000000 +0900
+++ graphics/gnuplot/options.mk	2015-10-23 18:44:36.000000000 +0900
@@ -1,12 +1,19 @@
 # $NetBSD: options.mk,v 1.8 2014/05/08 20:48:55 bad Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.gnuplot
-PKG_SUPPORTED_OPTIONS=	gd lua pdf x11 qt4 wxwidgets
-PKG_SUGGESTED_OPTIONS=	gd x11
+PKG_SUPPORTED_OPTIONS=	cairo gd lua pdf pdf-doc x11 qt4 wxwidgets
+PKG_SUGGESTED_OPTIONS=	cairo gd pdf-doc x11
 
 .include "../../mk/bsd.options.mk"
 
-PLIST_VARS+=	x11 qt4
+PLIST_VARS+=	pdf-doc x11 qt4
+
+.if !empty(PKG_OPTIONS:Mcairo)
+.include "../../devel/pango/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-cairo
+.endif
 
 .if !empty(PKG_OPTIONS:Mgd)
 .include "../../graphics/gd/buildlink3.mk"
@@ -24,6 +31,18 @@
 .include "../../print/pdflib-lite/buildlink3.mk"
 .endif
 
+# to build doc/gnuplot.pdf
+.if !empty(PKG_OPTIONS:Mpdf-doc)
+PLIST.pdf-doc=	yes
+BUILD_DEPENDS+=	tex-latex-bin-[0-9]*:../../print/tex-latex-bin
+BUILD_DEPENDS+=	tex-ucs-[0-9]*:../../print/tex-ucs
+post-build:
+	(cd ${WRKSRC}/docs; ${GMAKE} gnuplot.pdf)
+post-install:
+	(cd ${WRKSRC}/docs; \
+	${INSTALL_DATA} gnuplot.pdf ${DESTDIR}${PREFIX}/share/gnuplot/${API_VERSION})
+.endif
+
 .if !empty(PKG_OPTIONS:Mx11)
 PLIST.x11=	yes
 .include "../../x11/libXaw/buildlink3.mk"
--- mk/defaults/options.description.orig	2015-10-23 18:33:23.000000000 +0900
+++ mk/defaults/options.description	2015-10-23 18:36:54.000000000 +0900
@@ -553,6 +553,7 @@
 pcre			Enable Perl-compatible regular expressions.
 pcsc			Enable PC/SC support.
 pdf			Enable PDF support.
+pdf-doc			Install PDF document.
 perl			Enable Perl support.
 pgadmin-db-designer	Enable pgAdmin database-designer functionality.
 pgsql			Enable PostgreSQL support.
@@ -771,6 +772,7 @@
 winbind			Enable name-service switch daemon support using Windows Servers.
 wmf			Enable WMF support.
 wnn4			Use wnn for Kana-to-Kanji conversion.
+wxwidgets		Enable wxWidgets support.
 x11			Enable X11 support.
 x264			Enable x264 support.
 x265			Enable x265 support.



Home | Main Index | Thread Index | Old Index