blob: d8d7f6ca2e3efcc1e132a3c76fa01b3d97fe5c4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Created by: Simon Olofsson <simon@olofsson.de>
# $FreeBSD$
PORTNAME= imgv
PORTVERSION= 3.1.6
DISTVERSIONSUFFIX= -src
PORTREVISION= 8
CATEGORIES= graphics python
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Unique and feature rich Image Viewer
LICENSE= GPLv2
RUN_DEPENDS= ${PYGAME} \
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR}
NO_ARCH= yes
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USES= python:2.7 shebangfix
SHEBANG_FILES= imgv.py
post-patch:
@${REINPLACE_CMD} -e \
's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/gl.py
do-configure:
@${ECHO_CMD} -n > ${WRKSRC}/__init__.py
do-install:
(cd ${WRKSRC} && ${INSTALL_SCRIPT} imgv.py \
${STAGEDIR}${PREFIX}/bin/imgv)
@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/imgv
(cd ${WRKSRC} && ${FIND} . -maxdepth 1 -type f \
-name "*.py" -a ! -name "setup.py" -a ! -name "imgv.py" | \
${XARGS} -J % ${INSTALL_DATA} % \
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/imgv)
@${MKDIR} ${STAGEDIR}${DATADIR}/data
(cd ${WRKSRC}/data && ${INSTALL_DATA} * \
${STAGEDIR}${DATADIR}/data)
@(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -m compileall \
-d ${PYTHONPREFIX_SITELIBDIR} \
-f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
@(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O -m compileall \
-d ${PYTHONPREFIX_SITELIBDIR} \
-f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
.include <bsd.port.mk>
|