Use https by default
[gentoo.git] / dev-java / netbeans-javadoc / netbeans-javadoc-8.0.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6 inherit eutils java-pkg-2 java-ant-2
7
8 DESCRIPTION="Netbeans JavaDocs"
9 HOMEPAGE="http://netbeans.org/"
10 SLOT="8.0"
11 SOURCE_URL="http://download.netbeans.org/netbeans/8.0.2/final/zip/netbeans-8.0.2-201411181905-src.zip"
12 SRC_URI="${SOURCE_URL}
13         https://dev.gentoo.org/~fordfrog/distfiles/netbeans-8.0.2-build.xml.patch.bz2
14         http://hg.netbeans.org/binaries/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip"
15 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
16 KEYWORDS="amd64 x86"
17 IUSE=""
18 S="${WORKDIR}"
19
20 DEPEND="virtual/jdk:1.7
21         app-arch/unzip
22         dev-java/javahelp:0
23         dev-java/junit:4
24         ~dev-java/netbeans-apisupport-${PV}
25         ~dev-java/netbeans-cnd-${PV}
26         ~dev-java/netbeans-dlight-${PV}
27         ~dev-java/netbeans-enterprise-${PV}
28         ~dev-java/netbeans-ergonomics-${PV}
29         ~dev-java/netbeans-extide-${PV}
30         ~dev-java/netbeans-groovy-${PV}
31         ~dev-java/netbeans-harness-${PV}
32         ~dev-java/netbeans-ide-${PV}
33         ~dev-java/netbeans-java-${PV}
34         ~dev-java/netbeans-javacard-${PV}
35         ~dev-java/netbeans-mobility-${PV}
36         ~dev-java/netbeans-nb-${PV}
37         ~dev-java/netbeans-php-${PV}
38         ~dev-java/netbeans-platform-${PV}
39         ~dev-java/netbeans-profiler-${PV}
40         ~dev-java/netbeans-websvccommon-${PV}"
41 RDEPEND=""
42
43 JAVA_PKG_BSFIX="off"
44
45 src_unpack() {
46         unpack $(basename ${SOURCE_URL})
47
48         einfo "Deleting bundled jars..."
49         find -name "*.jar" -type f -delete
50
51         unpack netbeans-8.0.2-build.xml.patch.bz2
52
53         pushd "${S}" >/dev/null || die
54         ln -s "${DISTDIR}"/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip o.apache.tools.ant.module/external/ant-libs-1.9.4.zip || die
55         popd >/dev/null || die
56 }
57
58 src_prepare() {
59         einfo "Deleting bundled class files..."
60         find -name "*.class" -type f | xargs rm -vf
61
62         epatch netbeans-8.0.2-build.xml.patch
63
64         # Support for custom patches
65         if [ -n "${NETBEANS80_PATCHES_DIR}" -a -d "${NETBEANS80_PATCHES_DIR}" ] ; then
66                 local files=`find "${NETBEANS80_PATCHES_DIR}" -type f`
67
68                 if [ -n "${files}" ] ; then
69                         einfo "Applying custom patches:"
70
71                         for file in ${files} ; do
72                                 epatch "${file}"
73                         done
74                 fi
75         fi
76
77         einfo "Symlinking external libraries..."
78         java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
79         java-pkg_jar-from --build-only --into libs.junit4/external junit-4 junit.jar junit-4.10.jar
80
81         einfo "Linking in other clusters..."
82         mkdir "${S}"/nbbuild/netbeans || die
83         pushd "${S}"/nbbuild/netbeans >/dev/null || die
84
85         ln -s /usr/share/netbeans-apisupport-${SLOT} apisupport || die
86         cat /usr/share/netbeans-apisupport-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
87         touch nb.cluster.apisupport.built
88
89         ln -s /usr/share/netbeans-cnd-${SLOT} cnd || die
90         cat /usr/share/netbeans-cnd-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
91         touch nb.cluster.cnd.built
92
93         ln -s /usr/share/netbeans-dlight-${SLOT} dlight || die
94         cat /usr/share/netbeans-dlight-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
95         touch nb.cluster.dlight.built
96
97         ln -s /usr/share/netbeans-enterprise-${SLOT} enterprise || die
98         cat /usr/share/netbeans-enterprise-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
99         touch nb.cluster.enterprise.built
100
101         ln -s /usr/share/netbeans-ergonomics-${SLOT} ergonomics || die
102         cat /usr/share/netbeans-ergonomics-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
103         touch nb.cluster.ergonomics.built
104
105         ln -s /usr/share/netbeans-extide-${SLOT} extide || die
106         cat /usr/share/netbeans-extide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
107         touch nb.cluster.extide.built
108
109         ln -s /usr/share/netbeans-groovy-${SLOT} groovy || die
110         cat /usr/share/netbeans-groovy-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
111         touch nb.cluster.groovy.built
112
113         ln -s /usr/share/netbeans-harness-${SLOT} harness || die
114         cat /usr/share/netbeans-harness-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
115         touch nb.cluster.harness.built
116
117         ln -s /usr/share/netbeans-ide-${SLOT} ide || die
118         cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
119         touch nb.cluster.ide.built
120
121         ln -s /usr/share/netbeans-java-${SLOT} java || die
122         cat /usr/share/netbeans-java-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
123         touch nb.cluster.java.built
124
125         ln -s /usr/share/netbeans-javacard-${SLOT} javacard || die
126         cat /usr/share/netbeans-javacard-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
127         touch nb.cluster.javacard.built
128
129         ln -s /usr/share/netbeans-mobility-${SLOT} mobility || die
130         cat /usr/share/netbeans-mobility-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
131         touch nb.cluster.mobility.built
132
133         ln -s /usr/share/netbeans-nb-${SLOT}/nb nb || die
134         cat /usr/share/netbeans-nb-${SLOT}/nb/moduleCluster.properties >> moduleCluster.properties || die
135         touch nb.cluster.nb.built
136
137         ln -s /usr/share/netbeans-php-${SLOT} php || die
138         cat /usr/share/netbeans-php-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
139         touch nb.cluster.php.built
140
141         ln -s /usr/share/netbeans-platform-${SLOT} platform || die
142         cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
143         touch nb.cluster.platform.built
144
145         ln -s /usr/share/netbeans-profiler-${SLOT} profiler || die
146         cat /usr/share/netbeans-profiler-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
147         touch nb.cluster.profiler.built
148
149         ln -s /usr/share/netbeans-websvccommon-${SLOT} websvccommon || die
150         cat /usr/share/netbeans-websvccommon-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
151         touch nb.cluster.websvccommon.built
152
153         java-pkg-2_src_prepare
154 }
155
156 src_compile() {
157         eant -f nbbuild/build.xml bootstrap || die
158         ANT_OPTS="-Xmx1536m" eant -f nbbuild/javadoctools/build.xml build-javadoc
159 }
160
161 src_install() {
162         rm nbbuild/build/javadoc/*.zip
163         java-pkg_dojavadoc nbbuild/build/javadoc
164 }