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
73 lines
1.8 KiB
Makefile
73 lines
1.8 KiB
Makefile
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= bouncy
|
|
PORTVERSION= r6
|
|
PORTREVISION= 4
|
|
CATEGORIES= games python
|
|
MASTER_SITES= http://media.pyweek.org/dl/3/bouncy/ \
|
|
SF/nemysisfreebsdp/games/${PORTNAME}/:icons
|
|
DISTFILES= ${PORTNAME}-post-${DISTVERSION}.tgz \
|
|
${PORTNAME}.png:icons
|
|
DIST_SUBDIR= python
|
|
EXTRACT_ONLY= ${PORTNAME}-post-${DISTVERSION}.tgz
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= You are a hungry rabbit. Eat food to complete the level
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/GPL.txt
|
|
|
|
RUN_DEPENDS= ${PYGAME} \
|
|
${PYTHON_PKGNAMEPREFIX}PyOpenGL>=0:graphics/py-PyOpenGL@${PY_FLAVOR}
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-post-${DISTVERSION}
|
|
|
|
USES= python:2
|
|
|
|
PORTDOCS= README.txt
|
|
|
|
INSTALLS_ICONS= yes
|
|
|
|
SUB_FILES= ${PORTNAME}
|
|
|
|
DESKTOP_ENTRIES="Bouncy the Hungry Rabbit" "" "${PORTNAME}" \
|
|
"${PORTNAME}" "Game;ArcadeGame;" ""
|
|
|
|
OPTIONS_DEFINE= DOCS SHADER
|
|
OPTIONS_DEFAULT=SHADER
|
|
|
|
SHADER_DESC= Hardware shader support
|
|
|
|
post-patch:
|
|
@${FIND} ${WRKSRC} -name '*.py' | ${XARGS} \
|
|
${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|'
|
|
@${FIND} ${WRKSRC} -name "*.bak" -delete
|
|
|
|
post-patch-SHADER-on:
|
|
@${REINPLACE_CMD} -i '' '/#try/,/# print/s/#//' ${WRKSRC}/objects.py
|
|
|
|
do-build:
|
|
@${PYTHON_CMD} -m compileall ${WRKSRC}
|
|
@${PYTHON_CMD} -O -m compileall ${WRKSRC}
|
|
|
|
do-install:
|
|
@${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
|
|
${WRKDIR}/${PORTNAME}
|
|
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
|
|
|
|
.for d in data pyglyph
|
|
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
|
|
.endfor
|
|
.for f in *.py *.pyc *.pyo
|
|
${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
|
|
.endfor
|
|
|
|
${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
|
|
${STAGEDIR}${PREFIX}/share/pixmaps/
|
|
|
|
do-install-DOCS-on:
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
|
|
|
|
.include <bsd.port.mk>
|