aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/swt/Makefile
blob: eda496c851c2e2f594753afb947b00bed3bb8f55 (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
# Created by: Robert C. Noland III <rnoland@FreeBSD.org>
# $FreeBSD$

PORTNAME=	swt
DISTVERSION=	4.7.3a
CATEGORIES=	x11-toolkits devel java
MASTER_SITES=	http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-201803300640/
DISTNAME=	swt-${DISTVERSION}-${DIST_EXT}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Standard Widget Toolkit for Java

LICENSE=	EPL

ONLY_FOR_ARCHS=	amd64 i386

USES=		gl gnome pkgconfig zip:infozip

SWT_VERSION=	4763
OUTPUT_JAR=	swt.jar

USE_GL=		glu gl
USE_GNOME=	gtk20
USE_JAVA=	yes
USE_XORG=	xtst
JAVA_VERSION=	1.6+
JAVA_OS=	native
USE_ANT=	yes
MAKE_ARGS+=	-Doutput.jar=${OUTPUT_JAR}
MAKEFILE=	make_freebsd.mak
USE_LDCONFIG=	yes
PLIST_SUB=	BUILD=${SWT_VERSION}
PLIST_FILES=	${JAVAJARDIR}/${OUTPUT_JAR} \
		lib/libswt-atk-gtk-${SWT_VERSION}.so \
		lib/libswt-awt-gtk-${SWT_VERSION}.so \
		lib/libswt-gtk-${SWT_VERSION}.so \
		lib/libswt-glx-gtk-${SWT_VERSION}.so \
		lib/libswt-pi-gtk-${SWT_VERSION}.so

NO_WRKSUBDIR=	yes

OPTIONS_DEFINE=	CAIRO
OPTIONS_DEFAULT=	CAIRO

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MCAIRO}
LIB_DEPENDS+=	libcairo.so:graphics/cairo
PLIST_FILES+=	lib/libswt-cairo-gtk-${SWT_VERSION}.so
MAKE_CAIRO=	make_cairo
.endif

MAKE_ENV+=	MAKE_CAIRO=${MAKE_CAIRO} \
		MAKE_MOZILLA=${MAKE_MOZILLA} \
		JAVA_HOME=${JAVA_HOME}

.if (${ARCH} == "amd64")
DIST_EXT=	gtk-linux-x86_64
.else
DIST_EXT=	gtk-linux-x86
.endif

post-extract:
	@(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip")
	@${RM} ${WRKSRC}/*.o ${WRKSRC}/*.so ${WRKSRC}/*.jar
	@${CP} ${FILESDIR}/build.xml ${WRKSRC}/build.xml

post-patch:
	${SED} -e 's|freebsd|dragonfly|g' ${WRKSRC}/make_freebsd.mak \
		> ${WRKSRC}/make_dragonfly.mak

do-install:
	@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
	${INSTALL_LIB} ${WRKSRC}/libswt-*.so ${STAGEDIR}${PREFIX}/lib
	${INSTALL_DATA} ${WRKSRC}/${OUTPUT_JAR} ${STAGEDIR}${JAVAJARDIR}/

.include <bsd.port.mk>