aboutsummaryrefslogtreecommitdiffstats
path: root/java/openjfx8-devel/Makefile
blob: c9437251a5c0263e0708dd2fe345935907285b94 (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
# Created by: Tobias Kortkamp <t@tobik.me>
# $FreeBSD$

PORTNAME=   openjfx8
PORTVERSION=    20160228
PORTREVISION=   3
CATEGORIES= java x11-toolkits devel
MASTER_SITES=   https://bitbucket.org/tobik/openjfx-rt/get/ \
        http://bitbucket.org/tobik/openjfx-rt/get/
PKGNAMESUFFIX=  -devel
DISTNAME=   freebsd${PORTVERSION}
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    JavaFX (OpenJFX) SDK overlay for OpenJDK 8

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/LICENSE

BUILD_DEPENDS=  apache-ant>0:devel/apache-ant \
        antlr3>0:devel/antlr3 \
        gradle:devel/gradle \
        ${JAVALIBDIR}/junit.jar:java/junit \
        swt-devel>0:x11-toolkits/swt-devel
RUN_DEPENDS=    swt-devel>0:x11-toolkits/swt-devel

USES=       jpeg
USE_GL=     yes
USE_GNOME=  gtk20
USE_JAVA=   yes
USE_LDCONFIG=   yes
JAVA_VERSION=   1.8

ONLY_FOR_ARCHS= i386 amd64
PLIST_SUB=  ARCH=${ARCH} \
        JAVA_HOME=${JAVA_HOME}

WRKSRC= ${WRKDIR}/tobik-openjfx-rt-2de985ca8377

# NOTE: This port won't build if openjfx8-devel is currently
# installed.  This is not a problem in Poudriere or Synth but
# something to be aware of if you're trying to build this port in a
# non-pristine environment.

post-patch:
# Fix build directories which are now language specific with Gradle 4.0
    @${REINPLACE_CMD} -E -e 's|%%PREFIX%%|${PREFIX}|g' \
        -e 's|"(\$$buildDir/classes)/main"|"\1/java/main"|g' \
        -e 's|"(modules/.*/build/classes)/main"|"\1/java/main"|g' \
        ${WRKSRC}/build.gradle ${WRKSRC}/buildSrc/build.gradle

do-build:
# Gradle creates ${HOME}/.gradle, pretend home is somewhere else
    @${MKDIR} ${WRKDIR}/dot-gradle
    @(cd ${WRKSRC}; ${SETENV} GRADLE_USER_HOME=${WRKDIR}/dot-gradle gradle --no-daemon zips)

do-install:
    @(${MKDIR} ${STAGEDIR}${JAVA_HOME} \
        && ${TAR} -C ${STAGEDIR}${JAVA_HOME} \
            -xf ${WRKSRC}/build/bundles/javafx-sdk-overlay.zip)

    @${FIND} ${STAGEDIR}${JAVA_HOME}/jre -name '*.so' -exec ${STRIP_CMD} \{\} \;

.include <bsd.port.mk>