summaryrefslogtreecommitdiffstats
path: root/java/jode/Makefile
blob: 9c0bcefdd7d6595fb557c9f4ba5a015eecdf5076 (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
53
54
# Created by: mi
# $FreeBSD$

PORTNAME=	jode
PORTVERSION=	1.1.1.1
PORTREVISION=	4
CATEGORIES=	java devel
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/1.1.2-pre1
DISTNAME=	${PORTNAME}-${VENDOR_VERSION}

MAINTAINER=	mi@aldan.algebra.com
COMMENT=	Java package containing a decompiler and an optimizer for Java

BUILD_DEPENDS=	${GETOPT_JAR}:java/java-getopt
RUN_DEPENDS:=	${BUILD_DEPENDS}

VENDOR_VERSION=	1.1.2-pre1
USE_JAVA=	yes
JAVA_VERSION=	1.6+
NEED_JAVAC=	yes
GNU_CONFIGURE=	yes
USES=		gmake
MAKE_JOBS_UNSAFE=	yes

GETOPT_JAR=	${JAVALIBDIR}/java-getopt.jar
CLASSLIB=	${JAVA_CLASSES}:${GETOPT_JAR}
CONFIGURE_ENV+=	CLASSLIB=${CLASSLIB} JAR="${JAR}" \
		JAVA="${JAVA}" JAVAC="${JAVAC}"
CONFIGURE_ARGS+=--datadir="${JAVALIBDIR}"
# Don't create the dependencies:
MAKE_ARGS+=	JAVADEP=:
SUB_LIST+=	GETOPT_JAR=${GETOPT_JAR}
SUB_FILES=	jode
PLIST_FILES=	bin/jode %%JAVAJARDIR%%/jode-${VENDOR_VERSION}.jar

post-patch:
	${FIND} ${WRKSRC} -name '*.java*' |	\
	    ${XARGS} ${GREP} --mmap -l 'Enumeration enum ' |	\
		${XARGS} ${REINPLACE_CMD} -E	\
			-e 's,enum([ \.]),enumeration\1,g'

post-build:
	cd ${WRKSRC} && ${JAR} cvf ${PORTNAME}-${VENDOR_VERSION}.jar \
		`${FIND} jode -name \*.class`

do-install:
	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${VENDOR_VERSION}.jar \
		${STAGEDIR}/${JAVAJARDIR}/
	${INSTALL_SCRIPT} ${WRKDIR}/jode ${STAGEDIR}/${PREFIX}/bin/

test check regression-test: build
	${MAKE} -C ${WRKSRC}/test check-TESTS

.include <bsd.port.mk>
OpenPOWER on IntegriCloud