1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/math/py-matplotlib/Makefile
Niclas Zeising 39fc32e828 The FreeBSD x11@ and graphics team proudly presents
a zeising, kwm production, with help from dumbbell, bdrewery:

NEW XORG ON FREEBSD 9-STABLE AND 10-STABLE

This update switches over to use the new xorg stack by default on FreeBSD 9
and 10 stable, on osversions where vt(9) is available.
It is still possible to use the old stack by specifying WITHOUT_NEW_XORG in
/etc/make.conf .
FreeBSD 8-STABLE and released versions of FreeBSD still use
the old version.
A package repository with binary packages for new xorg will
be available soon.

This patch also contains updates of libxcb and related ports, pixman, as well
as some drivers and utilities.

Bump portrevisions for xf86-* ports, as well as virtualbox-ose-additions due
to xserver version change.

Apart from these updates, the way shared libraries are handled has been
changed for all xorg ports, as well as libxml2 and freetype, which means
ltverhack is gone and as a consequence shared libraries have been bumped.
The plan is that this change will make library bumps less likely in the
future.
All affected ports have had their portrevisions bumped as a consequence of
this.

Fix some issues where WITH_NEW_XORG weren't detected properly on CURRENT.

Update instructions, hardware support, and more notes can be found on
https://wiki.freebsd.org/Graphics

Thanks to:	all testers, bdrewery and the FreeBSD x11@ team
exp-run by:	bdrewery [1]
PR:		ports/187602 [1]
Approved by:	portmgr (bdrewery), core (jhb)
2014-04-16 18:28:47 +00:00

122 lines
3.2 KiB
Makefile

# Created by: ijliao
# $FreeBSD$
PORTNAME= matplotlib
PORTVERSION= 1.2.0
PORTREVISION= 5
CATEGORIES= math python
MASTER_SITES= http://cloud.github.com/downloads/matplotlib/matplotlib/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= mainland@apeiron.net
COMMENT= Plotting library uses a syntax familiar to MATLAB users
BUILD_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}dateutil>=1.4:${PORTSDIR}/devel/py-dateutil \
${PYTHON_PKGNAMEPREFIX}pytz>=0:${PORTSDIR}/devel/py-pytz
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
libpng15.so:${PORTSDIR}/graphics/png
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= pkgconfig shebangfix
SHEBANG_FILES= examples/pylab_examples/unicode_demo.py \
examples/animation/old_animation/movie_demo.py
USE_PYTHON= yes
USE_PYDISTUTILS=yes
PYDISTUTILS_AUTOPLIST=yes
CFLAGS+= -I${LOCALBASE}/include
OPTIONS_DEFINE= EXAMPLES GTKBACKEND GTKAGGBACKEND TKAGGBACKEND WXAGGBACKEND
OPTIONS_DEFAULT= GTKBACKEND GTKAGGBACKEND TKAGGBACKEND
GTKBACKEND_DESC= GTK backend support
GTKAGGBACKEND_DESC= GTKAgg backend support
TKAGGBACKEND_DESC= TKAgg backend support
WXAGGBACKEND_DESC= WXAgg backend support
PORTEXAMPLES= *
UNIQUENAME= ${PORTNAME}
.include <bsd.port.options.mk>
.if defined(PACKAGE_BUILDING) && \
( ${PORT_OPTIONS:MGTKBACKEND} || ${PORT_OPTIONS:MGTKAGGBACKEND} || \
${PORT_OPTIONS:MTKAGGBACKEND} || ${PORT_OPTIONS:MWXAGGBACKEND} )
BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
.endif
.if ${PORT_OPTIONS:MGTKBACKEND} || ${PORT_OPTIONS:MGTKAGGBACKEND}
USE_GNOME= gtk20 pygtk2
.endif
.if ${PORT_OPTIONS:MGTKBACKEND}
GTK_BACKEND= True
PLIST_SUB+= GTKBACKEND=""
.else
GTK_BACKEND= False
PLIST_SUB+= GTKBACKEND="@comment "
.endif
.if ${PORT_OPTIONS:MGTKAGGBACKEND}
GTKAGG_BACKEND= True
PLIST_SUB+= GTKAGGBACKEND=""
.else
GTKAGG_BACKEND= False
PLIST_SUB+= GTKAGGBACKEND="@comment "
.endif
.if ${PORT_OPTIONS:MTKAGGBACKEND}
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
USES+= tk:run
TKAGG_BACKEND= True
PLIST_SUB+= TKAGGBACKEND=""
.else
TKAGG_BACKEND= False
PLIST_SUB+= TKAGGBACKEND="@comment "
.endif
.if ${PORT_OPTIONS:MWXAGGBACKEND}
USE_WX= 2.8+
WX_COMPS= python:lib
CONFIGURE_ENV+= WX_CONFIG="${WX_CONFIG}"
WXAGG_BACKEND= True
.else
WXAGG_BACKEND= False
.endif
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
post-extract:
${CHMOD} -R ga+r ${WRKDIR}
post-patch:
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
-e 's|%%TCL_INCLUDEDIR%%|${TCL_INCLUDEDIR}|g' \
-e 's|%%TK_INCLUDEDIR%%|${TK_INCLUDEDIR}|g' \
-e 's|%%TCL_LIBDIR%%|${TCL_LIBDIR}|g' \
-e 's|%%TK_LIBDIR%%|${TK_LIBDIR}|g' \
-e 's|%%TCL_VER%%|${TCL_SHLIB_VER}|g' \
-e 's|%%TK_VER%%|${TK_SHLIB_VER}|g' \
${WRKSRC}/setupext.py
${REINPLACE_CMD} -e 's|%%GTK_BACKEND%%|${GTK_BACKEND}|g' \
-e 's|%%GTKAGG_BACKEND%%|${GTKAGG_BACKEND}|g' \
-e 's|%%TKAGG_BACKEND%%|${TKAGG_BACKEND}|g' \
-e 's|%%WXAGG_BACKEND%%|${WXAGG_BACKEND}|g' \
${WRKSRC}/setup.cfg
.if ${PORT_OPTIONS:MEXAMPLES}
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${CP} -R ${WRKSRC}/examples/ ${STAGEDIR}${EXAMPLESDIR}
.endif
.include <bsd.port.mk>