1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00
freebsd-ports/games/anki/Makefile
Mathieu Arnold 551be3c723 Convert Python ports to FLAVORS.
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
2017-11-30 15:50:30 +00:00

53 lines
1.6 KiB
Makefile

# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$
PORTNAME= anki
PORTVERSION= 2.0.36
PORTREVISION= 2
CATEGORIES= games python
MASTER_SITES= http://ankisrs.net/download/mirror/
DIST_SUBDIR= python
MAINTAINER= trebbu@googlemail.com
COMMENT= Flashcard trainer with spaced repetition
LICENSE= AGPLv3+
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= lame:audio/lame \
mplayer:multimedia/mplayer \
${PYTHON_PKGNAMEPREFIX}pyaudio>0:audio/py-pyaudio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlalchemy10>0:databases/py-sqlalchemy10@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}beautifulsoup32>=0:www/py-beautifulsoup32@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httplib2>0:www/py-httplib2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}send2trash>0:deskutils/py-send2trash@${PY_FLAVOR}
USES= desktop-file-utils pyqt:4 python:2 shared-mime-info shebangfix tar:tgz
SHEBANG_FILES= tools/build_ui.sh tools/tests.sh
USE_PYQT= network_run webkit_run
USE_QT4= network_run webkit_run
OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
NLS_USES= gettext-runtime gettext-tools
NO_ARCH= yes
post-patch:
@${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|; \
s|/usr/share/anki|${DATADIR}|' \
${WRKSRC}/runanki
@${REINPLACE_CMD} -e \
's|/usr/share/anki/locale|${PREFIX}/share/locale|' \
${WRKSRC}/anki/lang.py
post-patch-NLS-off:
@${REINPLACE_CMD} -i '' '/mkdir -p qt-locale/,/cp -av locale/s/^/#/' \
${WRKSRC}/Makefile
do-build:
@${PYTHON_CMD} -m compileall ${WRKSRC}
@${PYTHON_CMD} -O -m compileall ${WRKSRC}
.include <bsd.port.mk>