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
76 lines
2.6 KiB
Makefile
76 lines
2.6 KiB
Makefile
# Created by: Alexander Logvinov <ports@logvinov.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= gbirthday
|
|
PORTVERSION= 0.6.10
|
|
CATEGORIES= deskutils gnome
|
|
|
|
MAINTAINER= rm@FreeBSD.org
|
|
COMMENT= Birthday reminder for GNOME2
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= lafrech
|
|
GH_TAGNAME= 7b431aa
|
|
|
|
OPTIONS_DEFINE= MYSQL NLS NOTIFY THUNDERBIRD
|
|
OPTIONS_SUB= yes
|
|
THUNDERBIRD_DESC= Thunderbird/Sunbird support
|
|
MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=0:databases/py-MySQLdb@${PY_FLAVOR}
|
|
NLS_USES= gettext
|
|
NLS_USE= GNOME=intltool
|
|
NOTIFY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}notify>0:devel/py-notify@${PY_FLAVOR}
|
|
THUNDERBIRD_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
|
|
|
|
NO_ARCH= yes
|
|
USES= python:2.7,run
|
|
USE_GNOME= pygtk2
|
|
LANGUAGES= cs da de en es fi fr gl he it pl pt ru sk
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|.mozilla-thunderbird|.thunderbird|g' \
|
|
${WRKSRC}/src/${PORTNAME}/databases/lightning.py
|
|
@${REINPLACE_CMD} -e 's|@VER@|${PORTVERSION}|g' \
|
|
${WRKSRC}/src/${PORTNAME}/__init__.py
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|g' \
|
|
${WRKSRC}/src/gb
|
|
.if ! ${PORT_OPTIONS:MNLS}
|
|
@${REINPLACE_CMD} -e 's|_Comment|Comment|' ${WRKSRC}/${PORTNAME}.desktop.in
|
|
.endif
|
|
|
|
do-build:
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
@-intltool-merge -d ${WRKSRC}/po ${WRKSRC}/${PORTNAME}.desktop.in \
|
|
${WRKSRC}/${PORTNAME}.desktop
|
|
@(for lang in ${LANGUAGES} ; do \
|
|
cd ${WRKSRC}/po ; \
|
|
${LOCALBASE}/bin/msgfmt $$lang.po -o $$lang.mo ; \
|
|
done)
|
|
.endif
|
|
|
|
do-install:
|
|
${INSTALL_DATA} ${WRKSRC}/pics/${PORTNAME}.png ${STAGEDIR}${PREFIX}/share/pixmaps
|
|
${INSTALL_SCRIPT} ${WRKSRC}/src/gb ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
|
@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/databases
|
|
@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/pics
|
|
${INSTALL_DATA} ${WRKSRC}/src/${PORTNAME}/*.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}
|
|
${INSTALL_DATA} ${WRKSRC}/src/${PORTNAME}/databases/*.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/databases
|
|
${INSTALL_DATA} ${WRKSRC}/src/${PORTNAME}/pics/*.png ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/pics
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
@(for lang in ${LANGUAGES} ; do \
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/$$lang/LC_MESSAGES ; \
|
|
${INSTALL_DATA} ${WRKSRC}/po/$$lang.mo \
|
|
${STAGEDIR}${PREFIX}/share/locale/$$lang/LC_MESSAGES/${PORTNAME}.mo ; \
|
|
done)
|
|
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications
|
|
.else
|
|
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop.in \
|
|
${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|