blob: ee36db3600d1c39c3a0c0ad71c68ad670640abd7 (
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
|
# New ports collection makefile for: jython
# Date created: 3 April 2001
# Whom: Hye-Shik Chang <perky@python.or.kr>
#
# $FreeBSD$
#
PORTNAME= jython
PORTVERSION= 2.5.2
CATEGORIES= lang python java
MASTER_SITES= SF
DISTNAME= jython_installer-${PORTVERSION}
EXTRACT_SUFX= .jar
EXTRACT_ONLY= # none
MAINTAINER= python@FreeBSD.org
COMMENT= An implementation of Python Interpreter in Pure Java
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
USE_JAVA= yes
JAVA_VERSION= 1.5+
NO_BUILD= yes
REINPLACE_ARGS= -i ""
INST_TARGET?= lib/jython
JYTHON_PREFIX= ${PREFIX}/${INST_TARGET}
PLIST_SUB+= JYTHON_DIR=${INST_TARGET}
CACHEDIR_SPEC= -Dpython.cachedir=${WRKDIR}/jython-cachedir
do-install:
@# Do tons of backflips so that the cachedir is put into the user's home
@# directory (it's irritating to not be able to cache stuff if you're
@# not root). Furthermore, don't leave a cachedir around from either a
@# port install or a package install, but do cache the *.py files in Lib
@# during a port install or a package install.
cd ${DISTDIR} && ${JAVA} ${CACHEDIR_SPEC} \
-jar ${DISTNAME}${EXTRACT_SUFX} \
--silent -d ${JYTHON_PREFIX} -t standard
${REINPLACE_CMD} \
's/-cl/"-Dpython.cachedir=$${HOME}\/.jython-cachedir" -cl/g' \
${JYTHON_PREFIX}/jython
${REINPLACE_CMD} \
's,if expr "$$link" : '\''/'\'' > /dev/null; then,if expr "$$link" : '\''^/'\'' > /dev/null; then,' \
${JYTHON_PREFIX}/jython
${REINPLACE_CMD} 's/^python\.cachedir/#&/g' ${JYTHON_PREFIX}/registry
${JYTHON_PREFIX}/jython ${CACHEDIR_SPEC} -c None
@# Install symbolic links for convenience.
-${LN} -sf ${JYTHON_PREFIX}/jython ${PREFIX}/bin/jython
-${LN} -sf ${JYTHON_PREFIX}/registry ${PREFIX}/etc/jython.reg
.include <bsd.port.mk>
|