freebsd-ports/math/gnuplot/Makefile
Mark Linimon b09666fc1e - Fix possibility of "infinite make fork" when "Registering install for ..."
EMACS ports.  [1]

 - Allow building a port as root using an NFS-mounted /usr/ports if the
   server maps root to a UID other than root. [2]

 - Make 'BROKEN' and 'IGNORED' ports exit their "make install" with a fail
   status rather than success. [3]

 - Improve behavior when dealing with versioned dependencies. [4]

 - Fix false positives in check-conflicts target. [5]

 - Remove obsolete bzip2 code. [6]

 - Add physical category net-p2p. [7]

 - Don't fetch INDEXFILE if not necessary; respect FETCH_ENV. [8], [11]

 - INDEX can now be moved outside of ports tree. [9]

 - Add ghostscript-gpl. [10]

 - Remove obsolete USE_MESA. [12]

 - Force pkg_install tools from ports on FreeBSD 4.10 and older. [13]

 - Document ALWAYS_KEEP_DISTFILES. [14]

 - Remove USE_REINPLACE from bsd.port.mk USE_DOS2UNIX patch. [15]

PR:	ports/37596 [1], ports/57259 [2], ports/63216 [3],
	ports/89448 [4], ports/89710 [5], ports/88996 [6],
	ports/89260 [7], ports/89363 [8], ports/89809 [9],
	ports/89853 [10], ports/91086 [11], ports/91710 [12],
	ports/91727 [13], ports/92111 [14], ports/92124 [15]
Submitted by:	Jay Sachs <jay at eziba dot com> [1], sem [1, 3, 8, 12],
		Andrew Heybey <ath at niksun dot com> [2], Jamie Jones
		<jamie at thompson dot bishopston dot net>, tobez [4], Mark
		Andrews <Mark_Andrews at isc dot org> [5], edwin [6, 11, 15],
		pav [7, 13], Peter Jeremy <PeterJeremy at optushome dot com
		dot au> [9], Ulrich Spoerlein <q at galgenberg dot net> [10],
		netchild [11], erwin [14]
Reviewed by:	kris, clement (partially)
2006-01-28 02:11:35 +00:00

123 lines
3.0 KiB
Makefile

# New ports collection makefile for: gnuplot
# Date created: 19 April 1998
# Whom: chuckr
#
# $FreeBSD$
#
PORTNAME= gnuplot
PORTVERSION= 4.0.0
PORTREVISION= 4
CATEGORIES= math graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= glewis@FreeBSD.org
COMMENT= A command-driven interactive function plotting program
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --without-tutorial \
--without-linux-vga \
--with-lasergnu
OPTIONS= GD "Enable GD support" on \
HISTOGRAMS "Enable stacked histograms" off \
PDF "Enable PDF support" on \
PNG "Enable PNG support" on \
READLINE "Enable readline support" on
MAN1= gnuplot.1 lasergnu.1
INFO= gnuplot
.if exists(${PREFIX}/bin/emacs) || exists(${PREFIX}/bin/xemacs)
USE_EMACS= yes
EMACS_PORT_NAME= emacs21
EMACS_NO_BUILD_DEPENDS= yes
EMACS_NO_RUN_DEPENDS= yes
CONFIGURE_ARGS+= --with-lisp-files
.else
PLIST_SUB+= EMACS_SITE_LISPDIR="@comment "
CONFIGURE_ARGS+= --without-lisp-files
.endif
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_READLINE)
.if ${OSVERSION} < 500018
LIB_DEPENDS+= readline.5:${PORTSDIR}/devel/readline
CONFIGURE_ARGS+= --with-readline="${LOCALBASE}"
.else
CONFIGURE_ARGS+= --with-readline=gnu
.endif
.endif
.if !defined(WITHOUT_X11)
USE_XLIB= yes
PLIST_SUB+= X11=""
.else
CONFIGURE_ARGS+= --without-x
PLIST_SUB+= X11="@comment "
.endif
.if defined(WITHOUT_GD)
CONFIGURE_ARGS+= --without-gd
.else
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
CONFIGURE_ARGS+= --with-gd=${LOCALBASE}
.endif
.if defined(WITHOUT_PDF)
CONFIGURE_ARGS+= --without-pdf
.else
LIB_DEPENDS+= pdf.7:${PORTSDIR}/print/pdflib
CONFIGURE_ARGS+= --with-pdf=${LOCALBASE}
.endif
.if defined(WITHOUT_PNG)
CONFIGURE_ARGS+= --without-png
.else
LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
CONFIGURE_ARGS+= --with-png=${LOCALBASE}
.endif
.if defined(WITH_HISTOGRAMS)
PATCH_SITES= http://www.bmsc.washington.edu/people/merritt/gnuplot/
PATCHFILES= datastrings_4.0.patch histograms_4.0.patch
PATCH_DIST_STRIP= -p1
USE_AUTOTOOLS= autoconf:259
CONFIGURE_ARGS+= --enable-datastrings \
--enable-histograms
PLIST_SUB+= HISTOGRAMS=""
.else
PLIST_SUB+= HISTOGRAMS="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|)/@PACKAGE@/@PKG_MAJOR@|)|g' ${WRKSRC}/src/Makefile.in
@${FIND} "${WRKSRC}" -name '*.orig' -delete
.if !defined(NOPORTDOCS)
post-build:
@cd ${WRKSRC}/docs && ${MAKE} groff html
.endif
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/src/lasergnu ${PREFIX}/bin
.if exists(${PREFIX}/bin/emacs) || exists(${PREFIX}/bin/xemacs)
${INSTALL_DATA} ${WRKSRC}/lisp/gnuplot*.el ${EMACS_SITE_LISPDIR}
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/demo && ${FIND} . \
| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
@${MKDIR} ${DOCSDIR}/psdoc
cd ${WRKSRC}/docs && ${INSTALL_DATA} gnuplot.txt gnuplot.html \
gnuplot.dvi gnuplot.ps ${DOCSDIR}
cd ${WRKSRC}/docs/psdoc && ${INSTALL_DATA} README ps_* ${DOCSDIR}/psdoc
.endif
.include <bsd.port.post.mk>