mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
551be3c723
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
69 lines
2.5 KiB
Makefile
69 lines
2.5 KiB
Makefile
# Created by: Michael Nottebrock <lofi@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= yahoo
|
|
PORTVERSION= 0.3.20070314
|
|
PORTREVISION= 1
|
|
CATEGORIES= net-im python
|
|
MASTER_SITES= LOCAL/lofi
|
|
PKGNAMEPREFIX= xmpppy-
|
|
DISTNAME= yahoo-transport-${PORTVERSION}
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Yahoo! transport for Jabber
|
|
|
|
OPTIONS_DEFINE= EJABBERD
|
|
EJABBERD_DESC= transport with ejabberd
|
|
|
|
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/xmpp/__init__.py:net-im/py-xmpppy \
|
|
${PYTHON_SITELIBDIR}/DNS/__init__.py:dns/py-dns
|
|
|
|
USES= python:2.7
|
|
NO_BUILD= yes
|
|
FILES= adhoc.py config.py jep0133.py roomlist.py xmlconfig.py \
|
|
yahoo_helpers.py avatar.py htmlutils.py migratespool.py toolbox.py \
|
|
yahoo.py ylib.py
|
|
FILES_CURPHOO= YahooMD5.py __init__.py cpformat.py md5crypt.py pysha.py yahoo_fn.py
|
|
PFILES= ${FILES:S.^.%%PYTHON_SITELIBDIR%%/xmpp/yahoo/.} \
|
|
${FILES_CURPHOO:S.^.%%PYTHON_SITELIBDIR%%/xmpp/yahoo/curphoo/.}
|
|
PLIST_FILES= ${PFILES} ${PFILES:S.$.c.} ${PFILES:S.$.o.} etc/${PKGBASE:S.-._.}.conf.sample
|
|
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} BINDIR=${PYTHON_SITELIBDIR}/xmpp/yahoo \
|
|
JABBER_USER=${JABBER_USER}
|
|
USE_RC_SUBR= ${PKGBASE:S/-/_/}
|
|
DDIR= ${PYTHON_SITELIBDIR}/xmpp/yahoo
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MEJABBERD}
|
|
JABBER_USER?= ejabberd
|
|
SUB_LIST+= JABBER_REQUIRE=ejabberd
|
|
.else
|
|
JABBER_USER?= jabber
|
|
SUB_LIST+= JABBER_REQUIRE=jabberd
|
|
.endif
|
|
|
|
post-patch:
|
|
@${GREP} -lr '/usr/bin/env python' ${WRKSRC} | \
|
|
${XARGS} ${REINPLACE_CMD} -e "s|/usr/bin/env python|${PYTHON_CMD}|"
|
|
@${REINPLACE_CMD} -e "s|/etc/pyyimt.conf.xml|${PREFIX}/etc/${PKGBASE:S.-._.}.conf|" \
|
|
-e 's|pid = ""|pid = "/var/jabberd/pid/PyYIMt.pid"|g' \
|
|
-e 's|spoolFile = "user.dbm"|spoolFile = "/var/spool/jabberd/yahoouser.dbm"|g' \
|
|
${WRKSRC}/config.py
|
|
@${REINPLACE_CMD} -e '/spoolFile/s|yahoouser.dbm|/var/spool/jabberd/yahoouser.dbm|' \
|
|
-e 's|<debugFile.*|<!-- <debugFile>yahooerror.log</debugFile> -->|' \
|
|
-e 's|PyYIMt.pid|/var/jabberd/pid/PyYIMt.pid|' \
|
|
${WRKSRC}/config_example.xml
|
|
|
|
do-install:
|
|
@${INSTALL} -d ${STAGEDIR}${DDIR}
|
|
${INSTALL_DATA} ${FILES:S.^.${WRKSRC}/.} ${STAGEDIR}${DDIR}/
|
|
${INSTALL_SCRIPT} ${WRKSRC}/yahoo.py ${STAGEDIR}${DDIR}/
|
|
@${MKDIR} ${STAGEDIR}${DDIR}/curphoo
|
|
${INSTALL_DATA} ${FILES_CURPHOO:S.^.${WRKSRC}/curphoo/.} ${STAGEDIR}${DDIR}/curphoo/
|
|
${INSTALL_DATA} ${WRKSRC}/config_example.xml ${STAGEDIR}${PREFIX}/etc/${PKGBASE:S.-._.}.conf.sample
|
|
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -d ${DDIR} ${STAGEDIR}${DDIR}
|
|
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -d ${DDIR} ${STAGEDIR}${DDIR}
|
|
@${CHMOD} -R a-w ${STAGEDIR}${DDIR}
|
|
|
|
.include <bsd.port.mk>
|