aboutsummaryrefslogtreecommitdiffstats
path: root/net/azureus
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2005-01-14 06:16:14 +0800
committerlioux <lioux@FreeBSD.org>2005-01-14 06:16:14 +0800
commit97e99dc24eb82566e8788c4416069f0f1b4db3c2 (patch)
tree8569a826791daed469a7a93faa6c98971e9f34c1 /net/azureus
parentae60bbc2ef2a74928374d5ac948ed837a241a25b (diff)
downloadfreebsd-ports-gnome-97e99dc24eb82566e8788c4416069f0f1b4db3c2.tar.gz
freebsd-ports-gnome-97e99dc24eb82566e8788c4416069f0f1b4db3c2.tar.zst
freebsd-ports-gnome-97e99dc24eb82566e8788c4416069f0f1b4db3c2.zip
o Build an azureus jar with a native jdk instead of downloading the
jar o Use a custom made ant build.xml for building. Written with help from [1] o Clean up CLASSPATH, we do not need swt-pi-mozilla.jar o Bump PORTREVISION Reviewed by: jrandom [1]
Diffstat (limited to 'net/azureus')
-rw-r--r--net/azureus/Makefile44
-rw-r--r--net/azureus/distinfo4
-rw-r--r--net/azureus/files/azureus2
-rw-r--r--net/azureus/files/build.xml46
4 files changed, 83 insertions, 13 deletions
diff --git a/net/azureus/Makefile b/net/azureus/Makefile
index 08bd0b5844d1..dd78176d02ba 100644
--- a/net/azureus/Makefile
+++ b/net/azureus/Makefile
@@ -7,28 +7,35 @@
PORTNAME= azureus
PORTVERSION= 2.2.0.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTNAME= Azureus${PORTVERSION}.jar
-EXTRACT_SUFX=
-EXTRACT_ONLY=
+DISTNAME= Azureus_${PORTVERSION}_source
MAINTAINER= lioux@FreeBSD.org
COMMENT= A BitTorrent client written in Java
-RUN_DEPENDS= ${LOCALBASE}/eclipse:${PORTSDIR}/java/eclipse
+BUILD_DEPENDS= \
+ ${LOCALBASE}/eclipse/plugins/org.eclipse.swt.gtk_${ECLIPSE_VERSION}/ws/gtk/swt-pi.jar:${PORTSDIR}/java/eclipse \
+ ${LOCALBASE}/eclipse/plugins/org.eclipse.swt.gtk_${ECLIPSE_VERSION}/ws/gtk/swt.jar:${PORTSDIR}/java/eclipse
+RUN_DEPENDS= \
+ ${BUILD_DEPENDS}
-NO_BUILD= yes
ONLY_FOR_ARCHS= i386
USE_JAVA= yes
JAVA_VERSION= 1.4+
JAVA_OS= native
+USE_ANT= yes
-DATADIR= ${JAVASHAREDIR}/${PORTNAME}
-JARFILE= Azureus2.jar
+USE_ZIP= yes
+NO_WRKSUBDIR= yes
+
+JARFILE= ${PORTNAME}.jar
+
+# build classpath from BUILD_DEPENDS
+CLASSPATH_JARS= ${BUILD_DEPENDS:C/:.+$//:M*.jar}
PLIST_FILES= %%JAVAJARDIR%%/${JARFILE} bin/${PORTNAME}
@@ -38,11 +45,28 @@ do-configure:
-e "s|%%JAVA%%|${LOCALBASE}/bin/java|" \
-e "s|%%JAVA_VERSION%%|${JAVA_VERSION}|" \
-e "s|%%JAVA_OS%%|${JAVA_OS}|" \
+ -e "s|%%JARFILE%%|${JARFILE}|" \
${FILESDIR}/${PORTNAME} > ${WRKDIR}/${PORTNAME}
do-install:
${MKDIR} ${JAVAJARDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DISTNAME} ${JAVAJARDIR}/${JARFILE}
+ ${INSTALL_DATA} ${WRKSRC}/dist/lib/${JARFILE} \
+ ${JAVAJARDIR}/
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+ECLIPSE_PORT= ${PORTSDIR}/java/eclipse
+ECLIPSE_VERSION!= cd ${ECLIPSE_PORT} && ${MAKE} -V PORTVERSION
+
+CLASSPATH=.
+.for jar in ${CLASSPATH_JARS}
+CLASSPATH:=${CLASSPATH}:${jar}
+.endfor
+
+post-patch:
+ @${SED} -E \
+ -e 's|%%CLASSPATH%%|${CLASSPATH}|' \
+ ${FILESDIR}/build.xml > ${WRKSRC}/build.xml
+
+.include <bsd.port.post.mk>
diff --git a/net/azureus/distinfo b/net/azureus/distinfo
index 513f3b506cca..637f181436b5 100644
--- a/net/azureus/distinfo
+++ b/net/azureus/distinfo
@@ -1,2 +1,2 @@
-MD5 (Azureus2.2.0.2.jar) = 75c4e2c9abae9863d8cdd56dc1af3d21
-SIZE (Azureus2.2.0.2.jar) = 4194432
+MD5 (Azureus_2.2.0.2_source.zip) = aa8d7cc80af517363b911876615960ed
+SIZE (Azureus_2.2.0.2_source.zip) = 3318102
diff --git a/net/azureus/files/azureus b/net/azureus/files/azureus
index 5871a852c4f8..b58835467a73 100644
--- a/net/azureus/files/azureus
+++ b/net/azureus/files/azureus
@@ -15,7 +15,7 @@ ECLIPSE_WS=`echo "${ECLIPSE_SWT}" | sed -e "s+^${ECLIPSE_BASE}/plugins/org.eclip
ECLIPSE_SWT_JAR=${ECLIPSE_SWT}/ws/${ECLIPSE_WS}
LIB_PATH=${ECLIPSE_SWT}/os/freebsd/x86/
-CLASS_PATH=:%%JAVAJARDIR%%/Azureus2.jar:${ECLIPSE_SWT_JAR}/swt-mozilla.jar:${ECLIPSE_SWT_JAR}/swt-pi.jar:${ECLIPSE_SWT_JAR}/swt.jar
+CLASS_PATH=:%%JAVAJARDIR%%/%%JARFILE%%:${ECLIPSE_SWT_JAR}/swt-pi.jar:${ECLIPSE_SWT_JAR}/swt.jar
if [ "${DEBUG}" ]
then
diff --git a/net/azureus/files/build.xml b/net/azureus/files/build.xml
new file mode 100644
index 000000000000..fc1523321b80
--- /dev/null
+++ b/net/azureus/files/build.xml
@@ -0,0 +1,46 @@
+<!-- Under a BSDL license. Copyright by Mario S F Ferreira <lioux@FreeBSD.org> 2005- -->
+<!-- Under a BSDL license. Copyright by jrandom 2005- -->
+<!-- $FreeBSD$ -->
+<project basedir="." default="dist" name="azureus">
+ <description>
+ Builds Azureus
+ </description>
+ <!-- set global properties for this build -->
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile -->
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init" description="compile the source " >
+ <!-- Compile the java code from ${src} into ${build} -->
+ <javac srcdir="." destdir="${build}">
+ <include name="**/*.java"/>
+ <exclude name="**/Win32*.java"/>
+ <exclude name="**/swt/osx/**"/>
+ <classpath path="%%CLASSPATH%%"/>
+ </javac>
+ </target>
+
+ <target name="dist" depends="compile" description="generate the distribution" >
+ <!-- Create the distribution directory -->
+ <mkdir dir="${dist}/lib"/>
+
+ <copy todir="${build}">
+ <fileset dir="." includes="**/*.gif **/*.jpg, **/*.png **/*.properties" />
+ </copy>
+ <!-- Put everything in ${build} into the azureus.jar file -->
+ <jar jarfile="${dist}/lib/azureus.jar" basedir="${build}"/>
+ </target>
+
+ <target name="clean" description="clean up" >
+ <!-- Delete the ${build} and ${dist} directory trees -->
+ <delete dir="${build}"/>
+ <delete dir="${dist}"/>
+ </target>
+</project>