1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/editors/zim/Makefile
William Grzybowski 1e34739b64 Use setuptools for all Python ports.
Setuptools is the preferred method to manage Python distributions after
many changes to the packaging ecosystem over the past couple of years.

Only ports using USE_PYDISTUTILS= yes are affected by this commit, ports using
USE_PYDISTUTILS= easy_install remains the same however this usage is now
deprecated and should be converted to USE_PYDISTUTILS= yes.

Some Python distributions do not work with setuptools out of the box because
they extend the install command from distutils and not setuptools, and
so they need to be patched accordingly.

pip (which leverages setuptools) works around the issue by using eggs, however
we want to get rid of those as well, as support for "flat" installation is
unavailable or has other issues associated with it.

This work allows us to unify how python packages are built, ensure that Python
distributions are installed consistently, reduces complexity for Python port
maintainers and paves the way for simplifying the Python ports framework in
the future.

With hat on:	python
Reviewed by:	koobs, antoine
Exp-run:	bdrewery
Approved by:	bdrewery (portmgr)
2013-12-15 16:22:17 +00:00

77 lines
2.0 KiB
Makefile

# Created by: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
# $FreeBSD$
PORTNAME= zim
PORTVERSION= 0.60
CATEGORIES= editors python
MASTER_SITES= http://www.zim-wiki.org/downloads/
MAINTAINER= acm@FreeBSD.org
COMMENT= Desktop wiki editor
LICENSE= GPLv2
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xdg>=0:${PORTSDIR}/devel/py-xdg \
${LOCALBASE}/bin/xdg-open:${PORTSDIR}/devel/xdg-utils \
${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3
INSTALLS_ICONS= yes
USES= gettext desktop-file-utils
USE_GNOME= gtk20 pygtk2 pygobject
USE_PYTHON= -2.7
USE_PYDISTUTILS= yes
MAN1= zim.1
OPTIONS_DEFINE= GNUR LATEX GRAPHVIZ SCROT GNUPLOT BZR GIT MERCURIAL DITAA
OPTIONS_EXCLUDE=DOCS NLS
GNUR_DESC= Support of plot editor based on GNU R
SCROT_DESC= Screenshot taking and inserting support
BZR_DESC= Version control for notebooks using bzr
GIT_DESC= Version control for notebooks using git
MERCURIAL_DESC= Version control for notebooks using hg
DITAA_DESC= Diagram editor support
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGNUR}
RUN_DEPENDS+= R:${PORTSDIR}/math/R
.endif
.if ${PORT_OPTIONS:MLATEX}
USE_TEX= latex
.endif
.if ${PORT_OPTIONS:MGRAPHVIZ}
RUN_DEPENDS+= fdp:${PORTSDIR}/graphics/graphviz
.endif
.if ${PORT_OPTIONS:MSCROT}
RUN_DEPENDS+= scrot:${PORTSDIR}/graphics/scrot
.endif
.if ${PORT_OPTIONS:MGNUPLOT}
RUN_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
.endif
.if ${PORT_OPTIONS:MBZR}
RUN_DEPENDS+= bzr:${PORTSDIR}/devel/bzr
.endif
.if ${PORT_OPTIONS:MGIT}
RUN_DEPENDS+= git:${PORTSDIR}/devel/git
.endif
.if ${PORT_OPTIONS:MMERCURIAL}
RUN_DEPENDS+= hg:${PORTSDIR}/devel/mercurial
.endif
.if ${PORT_OPTIONS:MDITAA}
RUN_DEPENDS+= ditaa:${PORTSDIR}/graphics/ditaa
.endif
post-patch:
@${REINPLACE_CMD} \
-e 's|share/man|man|' \
-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
${WRKSRC}/setup.py
@${REINPLACE_CMD} -e "s|decode('utf-8')|decode('utf-8','replace')|g" ${WRKSRC}/zim/utils.py
post-install:
-@update-desktop-database
.include <bsd.port.mk>