summaryrefslogtreecommitdiff
path: root/net-p2p/vuze/Makefile
blob: 5fe3d3ded7d7b75090f07336c66242427ecf2494 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# New ports collection makefile for:	Azureus
# Date created:				October 6, 2004
# Whom:					Jeremy Faulkner <gldisater@gldis.ca>
#
# $FreeBSD$
#

PORTNAME=	azureus
PORTVERSION=	2.5.0.0
CATEGORIES=	net-p2p java
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	Azureus_${PORTVERSION}_source

MAINTAINER=	lioux@FreeBSD.org
COMMENT=	A BitTorrent client written in Java

BUILD_DEPENDS=	\
		${JAVALIBDIR}/log4j.jar:${PORTSDIR}/devel/log4j \
		${JAVALIBDIR}/commons-cli.jar:${PORTSDIR}/java/jakarta-commons-cli \
		${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit \
		${JAVALIBDIR}/swt.jar:${PORTSDIR}/x11-toolkits/swt31 \
		${JAVALIBDIR}/seda.jar:${PORTSDIR}/net/seda
RUN_DEPENDS=	\
		${JAVALIBDIR}/swt.jar:${PORTSDIR}/x11-toolkits/swt31

ONLY_FOR_ARCHS=	i386 amd64

USE_JAVA=	yes
JAVA_BUILD=	jdk
JAVA_RUN=	jdk
JAVA_VERSION=	1.4+
JAVA_OS=	native
USE_ANT=	yes
USE_JIKES=	no

USE_ZIP=	yes
USE_DOS2UNIX=	org/gudy/azureus2/ui/swt/test/PrintTransferTypes.java \
		org/gudy/azureus2/ui/swt/Messages.java \
		org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionPlugins.java \
		org/gudy/azureus2/ui/swt/shells/MessageSlideShell.java \
		org/gudy/azureus2/ui/swt/views/TableView.java \
		org/gudy/azureus2/ui/swt/Utils.java \
		org/gudy/azureus2/platform/macosx/access/jnilib/OSXAccess.java
NO_WRKSUBDIR=	yes

JARFILE=	${PORTNAME}.jar

# build classpath from BUILD_DEPENDS
MAKE_ENV=	LANG=C
CLASSPATH_JARS=	${BUILD_DEPENDS:C/:.+$//:M*.jar}

PLIST_FILES=	%%JAVAJARDIR%%/${JARFILE} bin/${PORTNAME}

do-configure:
	${SED} -e "s+%%PREFIX%%+${PREFIX}+" -e "s+%%LOCALBASE%%+${LOCALBASE}+" \
		-e "s|%%LIBDIR%%|${LOCALBASE}/lib|" \
		-e "s|%%JAVAJARDIR%%|${JAVAJARDIR}|" \
		-e "s|%%JAVA%%|${LOCALBASE}/bin/java|" \
		-e "s|%%JAVA_VERSION%%|${JAVA_VERSION}|" \
		-e "s|%%JAVA_OS%%|${JAVA_OS}|" \
		-e "s|%%JARFILE%%|${JARFILE}|" \
		-e "s|%%SWTJAR%%|${JAVALIBDIR}/swt.jar|" \
		${FILESDIR}/${PORTNAME} > ${WRKDIR}/${PORTNAME}

do-install:
	${MKDIR} ${JAVAJARDIR}
	${INSTALL_DATA} ${WRKSRC}/dist/lib/${JARFILE} \
		${JAVAJARDIR}/
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.pre.mk>

CLASSPATH=.
.for jar in ${CLASSPATH_JARS}
CLASSPATH:=${CLASSPATH}:${jar}
.endfor

post-patch:
	@${SED} -E \
		-e 's|%%CLASSPATH%%|${CLASSPATH}|' \
		${FILESDIR}/build.xml > ${WRKSRC}/build.xml
# bash -> sh
	@${REINPLACE_CMD} -E \
		-e 's|/bin/bash|${SH}|' \
		${WRKSRC}/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java

.include <bsd.port.post.mk>