aboutsummaryrefslogtreecommitdiffstats
path: root/editors/spe/Makefile
blob: c9a25e43dfa6c58f06fc66dc69404b41e1ef1bee (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Created by: Nicola Vitale <nivit@email.it>
# $FreeBSD$

PORTNAME=   SPE
PORTVERSION=    0.8.4.h
PORTREVISION=   8
CATEGORIES= editors devel python
MASTER_SITES=   ${MASTER_SITE_BERLIOS}
MASTER_SITE_SUBDIR= python
DISTNAME=   ${PORTNAME:tl}-${PORTVERSION}-wx2.6.1.0

MAINTAINER= nivit@FreeBSD.org
COMMENT=    Stani's Python Editor

BROKEN=     Unfetchable
NO_BUILD=   yes

USES=       python
USE_WX=     3.0+
WX_COMPS=   python

OPTIONS_DEFINE= ENCRYPTED_DEBUG DOCS EXAMPLES
ENCRYPTED_DEBUG_DESC=   Enable encrypted debug in SPE

REINPLACE_ARGS= -i.bak -E -e "1s,^(\#!.* )python$$,\1 -S PYTHONPATH=${DATADIR} ${PYTHON_CMD},1"

WRKSRC=     ${WRKDIR}/${PORTNAME:tl}-${PORTVERSION}
SPEDOCS=    ${DATADIR}/_spe/doc
SPEXAMPLES= ${DATADIR}/_spe/examples
SPESCRIPTS= spe SPE.py SPE_DEBUG.py

LN_OPTS=    -sf
RM_OPTS=    -R

DESKTOP_ENTRIES=    "SPE (Stani's Python Editor)" \
            "Integrated Python Development Environment" \
            "${DATADIR}/_spe/images/spe.png" \
            "spe" \
            "Development;IDE;Debugger;GUIDesigner;" \
            true

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MENCRYPTED_DEBUG}
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/Crypto/__init__.py:${PORTSDIR}/security/py-pycrypto
.endif

post-patch:
    @cd ${WRKSRC}/_spe && ${REINPLACE_CMD} ${SPESCRIPTS} && ${RM} ${RM_OPTS} *.bak

do-install:
    @${MKDIR} ${STAGEDIR}${DATADIR}
    @cd ${WRKSRC} && ${COPYTREE_SHARE} _spe ${STAGEDIR}${DATADIR} && \
    ${LN} ${LN_OPTS} ${DATADIR}/_spe/spe ${STAGEDIR}${PREFIX}/bin/spe

# documentation
.if ${PORT_OPTIONS:MDOCS}
    ${MV} ${STAGEDIR}${SPEDOCS} ${STAGEDIR}${DOCSDIR} && \
    ${LN} ${LN_OPTS} ${DOCSDIR} ${STAGEDIR}${SPEDOCS}
.else
    @${RM} ${RM_OPTS} ${STAGEDIR}${SPEDOCS}
.endif
# examples
.if ${PORT_OPTIONS:MEXAMPLES}
    ${MV} ${STAGEDIR}${SPEXAMPLES} ${STAGEDIR}${EXAMPLESDIR} && \
    ${LN} ${LN_OPTS} ${EXAMPLESDIR} ${STAGEDIR}${SPEXAMPLES}
.else
    @${RM} ${RM_OPTS} ${STAGEDIR}${SPEXAMPLES}
.endif
    cd ${STAGEDIR}${DATADIR}/_spe/ && \
    ${CHMOD} ${BINMODE} ${SPESCRIPTS}

.include <bsd.port.mk>